// -- POLITICA DE PRIVACIDAD
//*********************************************************
function politicas(politicasweb){
//	politicasweb = 'politicas.html';
	coordenada_x = (screen.width) ? (screen.width- 500)/2 : 0;
	coordenada_y = (screen.height) ? (screen.height- 600)/2 : 0;
	window.open(politicasweb, 'politicapop', 'top=' + coordenada_y +',left=' + coordenada_x + ',width=500,height=500,directories=no,menubar=no,location=no,resizable=no,status=no,toolbar=no,scrollbars=yes');
}

// -- INTERCAMBIOS WINDOW
//*********************************************************
function intercambiospopup(intercambiosweb){
	coordenada_x = (screen.width) ? (screen.width- 520)/2 : 0;
	coordenada_y = (screen.height) ? (screen.height- 600)/2 : 0;
	window.open(intercambiosweb, 'intercambiospop', 'top=' + coordenada_y +',left=' + coordenada_x + ',width=520,height=600,directories=no,menubar=no,location=no,resizable=no,status=no,toolbar=no,scrollbars=yes');
}

// -- CONTADOR DE CARACTERES
//*********************************************************
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit)
		field.value = field.value.substring(0, maxlimit);
	else 
		countfield.value = maxlimit - field.value.length;
}

//-- AGREGAR A FAVORITOS
function bookmark(){ 
	if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>="4.0")) { 
    	var url="http://www.juegosdemotos.tk/"; 
		var titulo = "JuegosdeMotos.tk - Juegos de Motos Online";
		window.external.AddFavorite(url,titulo); 
   } 
   else { 
      if(navigator.appName == "Netscape") 
         alert ("Presiona CTRL-D para agregar a JuegosDeMotos.tk a tus Favoritos! \n Usa las teclas de Manzana-D en tu Mac!"); 
   } 
}

//-- HACER PAGINA DE INICIO
//*********************************************************
function inicio()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage("http://www.juegosdemotos.tk/");
}