function setBookmark(url,str){
	if(str=='')str=url;
	if (document.all)window.external.AddFavorite(url,str);
	else alert('Presione las teclas CTRL + D para agregar a sus favoritos');
}

// Aumentar y disminuir letra

var tamanoLetrapordefecto = 4;
var tamanoLetra = tamanoLetrapordefecto;
var tamanoLetraminimo = 3;
var tamanoLetramaximo = 7;
var identidadLetra;

function aumentar() {
    if (tamanoLetra < tamanoLetramaximo) {
    tamanoLetra += 1;
    identidadLetra = document.getElementById('mainblock_int');
    identidadLetra.className = 'tamanoletra' + tamanoLetra;
    }
}

function disminuir() {
    if (tamanoLetra > tamanoLetraminimo) {
    tamanoLetra -= 1;
    identidadLetra = document.getElementById('mainblock_int');
    identidadLetra.className = 'tamanoletra' + tamanoLetra;
    }
}

function aumentar2() {
    if (tamanoLetra < tamanoLetramaximo) {
    tamanoLetra += 1;
    identidadLetra = document.getElementById('mainblock');
    identidadLetra.className = 'tamanoletra' + tamanoLetra;
    }
}

function disminuir2() {
    if (tamanoLetra > tamanoLetraminimo) {
    tamanoLetra -= 1;
    identidadLetra = document.getElementById('mainblock');
    identidadLetra.className = 'tamanoletra' + tamanoLetra;
    }
}

function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	alert("Email incorrecto")
	return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	alert("Email incorrecto")
	return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	alert("Email incorrecto")
	return false
	}

	if (str.indexOf(at,(lat+1))!=-1){
	alert("Email incorrecto")
	return false
	}

	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	alert("Email incorrecto")
	return false
	}

	if (str.indexOf(dot,(lat+2))==-1){
	alert("Email incorrecto")
	return false
	}

	if (str.indexOf(" ")!=-1){
	alert("Email incorrecto")
	return false
	}

	return true					
	}

function ValidateForm(){
	var emailID=document.recomendar.email

	if ((emailID.value==null)||(emailID.value=="")){
		alert("Por favor, ingrese su email")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
}
