var Idioma_Aux=0;

function mnuCabecera(Cad, Url, Opc)
{
	var Valor;
	Valor = getCookie("Grafton");

	if (!Valor) Valor=2;
	
	if (Opc == Valor)
	{
	if ( Url )
		document.write ('<TR><TD WIDTH=164><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=LEFT WIDTH=100%><TR><td height="23" CLASS=category_blocks><img src="./imagenes/gris_red_izq.jpg" height="23"></td><TD WIDTH=100% height="19" ALIGN=center VALIGN=MIDDLE NOWRAP CLASS=category_blocks><DIV CLASS=container_block><A HREF="' + Url + '" CLASS=categories TARGET="_self">' + Cad + '</A></DIV></TD><td height="23"><img src="./imagenes/gris_red_dcha.jpg" height="23"></td></TR></TABLE></TD></TR>');
	else
		document.write ('<TR><TD WIDTH=164><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=LEFT WIDTH=100%><TR><td height="23" CLASS=category_blocks><img src="./imagenes/gris_red_izq.jpg" height="23"></td><TD WIDTH=100% height="19" ALIGN=center VALIGN=MIDDLE NOWRAP CLASS=category_blocks><DIV CLASS=container_block ><b>' + Cad + '</b></DIV></TD><td height="23" width="8"><img src="./imagenes/gris_red_dcha.jpg" height="23"></td></TR></TABLE></TD></TR>');
	}
}

function mnuOpcion(Cad, Url, Opc)
{
	var Valor;
	Valor = getCookie("Grafton");
	if (!Valor) Valor=2;
	
	if (Opc == Valor)
		document.write ('<TR><TD WIDTH=164><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=LEFT WIDTH=100%><TR><TD WIDTH=100% height="16" ALIGN=left VALIGN=MIDDLE CLASS=subcategory_blocks><A HREF="' + Url + '" CLASS=subcategories TARGET="_self"> · ' + Cad + '</A></DIV></TD></TR></TABLE></TD></TR>');
}


function mnuSepara()
{
	document.write ('<TR HEIGHT=5><TD></TD></TR>');
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function Cambia (opc)
{
	document.cookie='Grafton=' + opc;
	document.location.href='default.htm';
}


function Cabecera()
{

	var Valor;
	Valor = getCookie("Grafton");
	if (!Valor) Valor=2;

	document.write ('<tr valign=middle align=center>');
	//document.write ('<td width="55" rowspan=95 background="imagenes/left.jpg"><img src="imagenes/spacer.gif" width="15"></td>');
	document.write ('<td colspan=5 valign="middle"><!---cabecera--->');
	document.write ('<table id="tabla_01" width="870" height="145" border="0" cellpadding="0" cellspacing="0">');
	document.write ('<tr>');
	//document.write ('<td align="left"> <div align="left" width="870" height="126"><a href="default.htm"><img src="imagenes/logo.gif" alt="Centro de Estudios GRAFTON" border="0" align="left" ></a></div></td>');
	//document.write ('<td align="left"> <div align="left" width="0" height="0"><a href="default.htm"><img src="imagenes/Teacher_0.jpg" width="107" height="107" alt="Centro de Estudios GRAFTON" border="0" align="middle" ></a></div></td>');
	//document.write ('<td align="left"> <div align="left" width="50" height="50"><a href="default.htm"><img src="imagenes/Teacher_0.jpg" width="128" height="107" alt="Centro de Estudios GRAFTON" border="0" align="middle" ></a></div></td>');
	
	document.write ('<td align="left"> <div align="left" width="870" height="126"><a href="default.htm"><img src="imagenes/logo.gif" alt="Centro de Estudios GRAFTON" border="0" align="left"></a><a href="refuerzo.htm"><img src="imagenes/particular1.jpg" width="132" height="127" alt="Clases de refuerzo escolar de todas las asignaturas tanto individuales como en grupo" border="0" align="middle" ></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="ingenieria.htm"><img src="imagenes/integrator.jpg" width="127" height="127" alt="Cursos de ingeniería, derivadas e integrales" border="0" align="middle"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="modulos.htm"><img src="imagenes/modulos.jpg" width="122" height="126" border="0" align="middle" alt="Preparación de la prueba de acceso a módulos de grado superior"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mayores.htm"><img src="imagenes/universidad.jpg" width="122" height="126" border="0" align="middle" alt="Preparación de la prueba de acceso a la Universidad para mayores de 25 años"></a>&nbsp&nbsp</div></td>');
	
	//Banner
	//document.write ('<td align="left"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="468" height="60" id="468x60_malaria" align="middle">');
	//document.write ('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="imagenes/publi/468x60_malaria.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="imagenes/publi/468x60_malaria.swf" quality="high" bgcolor="#ffffff" width="468" height="60" name="468x60_malaria" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
	//Fin de Banner 
	document.write ('</tr>');
	document.write ('<tr >');
	document.write ('<td colspan=2 height="23" class=cCabecera>');
	document.write ('<div  align="center" class="ficha_enlaceQ"> <span class="unnamed1color"> ');

//idiomas
//document.write ('<a class="ficha_enlaceQ" href="javascript:CambioIdioma(1)">&nbsp;&nbsp;<img width=18 height=18 src="imagenes/spa.gif"></a>&nbsp;&nbsp;<a class="ficha_enlaceQ" href="javascript:CambioIdioma(2)">&nbsp;&nbsp;<img width=18 height=18 src="imagenes/eng.gif"></a>&nbsp;&nbsp;|');

//	if (Valor == 1 )
//		document.write ('<a class="ficha_enlaceQ" href="javascript:Cambia(2)">Particulares</a>&nbsp;&nbsp; |&nbsp;&nbsp; ');
//	else
//		document.write ('<a class="ficha_enlaceQ" href="javascript:Cambia(1)">Empresas</a>&nbsp;&nbsp; |&nbsp;&nbsp; ');


	document.write ('<a class="ficha_enlaceQ" href="default.htm">Inicio</a>&nbsp;&nbsp; |&nbsp;&nbsp; ');
	<!---document.write ('<a class="ficha_enlaceQ" href="conocenos.htm">Conócenos</a>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; ');--->
	document.write ('<a class="ficha_enlaceQ" href="mapaweb.htm">Mapa Web</a>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; ');
	document.write ('<a class="ficha_enlaceQ" href="contacto.htm">Localización / Contacto</a>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; ');
//	document.write ('<a class="ficha_enlaceQ" href="contacto.htm">Información de lunes a jueves de 09:00 a 20:00</a>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; ');
	document.write ('</span></div></td>');
	document.write ('</tr>');
	document.write ('</table><!--- fin cabecera---></td>');
	//document.write ('<td width="56" rowspan=95 background="imagenes/right.gif"><img src="imagenes/spacer.gif" width="10"></td>');
	document.write ('</tr>');

}

function Menu()
{
//	1 > empresa || 2 > particular
	mnuCabecera("Empresa","", 1);
	mnuOpcion("Inglés","inglesprofesional.htm", 1);
	mnuOpcion("<b>Servicios de traducción</b>","traduccion.htm", 1);
	mnuOpcion("Cursos FORCEM","forcem.htm", 1);
	mnuOpcion("Informática","informatica.htm", 1);
//	mnuOpcion("Cursos personalizados",12, 1);


	mnuCabecera("Trabajadores","", 1);
	mnuOpcion("Cursos FORCEM","forcem.htm", 1);
	mnuOpcion("Informática","informatica.htm", 1);
//	mnuOpcion("Autónomos",12, 1);
//	mnuOpcion("Idiomas",12,1 );


	mnuCabecera("Inglés","inglesprofesional.htm", 1);


	mnuCabecera("Refuerzo Escolar","refuerzo.htm", 2);
	mnuOpcion("Primaria","primaria.htm", 2);
	mnuOpcion("Secundaria","secundaria.htm", 2);
	mnuOpcion("Bachillerato","bachillerato.htm", 2);
//	mnuOpcion("Selectividad","selectividad.htm", 2);
//	mnuOpcion("Cursos de verano 2009","verano.htm", 2);
	mnuSepara();
	
	
//	mnuCabecera("Informática","informatica.htm");
//	mnuOpcion("Empresa",12);
//	mnuOpcion("Particulares",12);
//	mnuSepara();

	mnuCabecera("Clases Particulares","particulares.htm", 2);
	mnuSepara();

	mnuCabecera("Ingeniería","ingenieria.htm", 2);
	mnuOpcion("Técnica Industrial","ITIndustrial.htm", 2);
//	mnuOpcion("Telecomunicaciones","ITelecomunicacion.htm", 2);
	mnuOpcion("Técnica Telecomunicaciones","ITTeleco.htm", 2);
	mnuOpcion("Técnica Informática","ITInformatica.htm", 2);
	mnuOpcion("Derivadas e Integrales","derivadas.htm", 2);
	mnuSepara();


	mnuCabecera("Cursos Bonificados","tematico.htm", 2);
	mnuSepara();

	mnuCabecera("Oposiciones","oposiciones.htm", 2);
	mnuSepara();

	mnuCabecera("Learn Spanish","spanish.htm", 2);
	mnuSepara();


}


function MenuSelector()
{
//1 > empresa || 2 > particular

	mnuCabecera("Empresa","", 1);
	mnuOpcion("Inglés","inglesprofesional.htm", 1);
	mnuOpcion("<b>Servicios de traducción</b>","traduccion,htm", 1);
	mnuOpcion("Cursos FORCEM","forcem.htm", 1);
	mnuSepara();

	mnuCabecera("Trabajadores","", 1);
	mnuOpcion("Cursos FORCEM","forcem.htm", 1);
	mnuOpcion("Informática","informatica.htm", 1);
	mnuSepara();

	mnuCabecera("Refuerzo Escolar","", 2);
	mnuOpcion("Primaria","primaria.htm", 2);
	mnuOpcion("Secundaria","secundaria.htm", 2);
	mnuOpcion("Bachillerato","bachillerato.htm", 2);
	mnuOpcion("Selectividad","selectividad.htm", 2);
	mnuSepara();
	
	mnuCabecera("Ingeniería","", 2);
	mnuOpcion("Técnica Industrial","ingtecindustrial.htm", 2);
	mnuOpcion("Telecomunicaciones","teleco.htm", 2);
	mnuOpcion("Técnica Telecomunicaciones","telecotec.htm", 2);
	mnuOpcion("Técnica Informática","informaticatec.htm", 2);
	mnuSepara();
	
	mnuCabecera("Refuerzo Escolar","", 2);
	mnuOpcion("Primarasf as dfia","primariaasfd.htm", 2);
	mnuOpcion("Secundaria","secundaria.htm", 2);
	mnuOpcion("Bachillerato","bachillerato.htm", 2);
	mnuOpcion("Selectividad","selectividad.htm", 2);
	mnuSepara();

	mnuCabecera("Inglés","", 2);
	mnuOpcion("Exámenes oficiales",12, 2);
	mnuOpcion("Inglés en familia",12, 2);
	mnuSepara();

	mnuCabecera("Español<br>para extranjeros","es_extranjeros.htm", 2);
	mnuSepara();

}



function InfoGeneral()
{
	document.write ('<div align="center"><br>');
	document.write ('<table width="96%"  border="0" cellpadding="0" cellspacing="0" bordercolor="EBEAEA"><tr><td>');

	document.write ('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"');
	document.write ('  <tr valign="middle"><td bgcolor="4B597E" height="23" width="8"><img src="./imagenes/redo_izq.jpg" height="23" width="8"></td><td height="23" bgcolor="4B597E">');
	//Cabecera de la información
	document.write ('<div align="center"><A CLASS="cCabDerecha" HREF="mayores.htm">Universidad + 25</font></span></div>');
	document.write ('</td><td height="23" width="8"><img src="./imagenes/redo_dcha.jpg" height="23" width="8"></td></tr>');
	document.write ('  <tr><td align="center" valign="top" colspan=2>');
	document.write (' <TABLE WIDTH=100% border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">');

	//repetir tantas veces como informaciones se deseen 
	//document.write ('<TR><TD width="5" height="10"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="20"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Información General</A>');
	//document.write ('</strong></TD></TR>');
	//hasta aquí      
	//document.write ('<TR><TD width="5" height="20"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="25"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Abierta matrícula curso 2009/2010</A>');
	//document.write ('</strong></TD></TR>');

	//document.write ('<TR><TD width="5" height="20"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="25"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Gestionamos tu acceso a la Universidad</A>');
	//document.write ('</strong></TD></TR>');

	document.write ('</TABLE>');

	document.write ('</td></tr></table></td></tr></table></div>');
}

function InfoGeneral2()
{
	document.write ('<div align="center"><br>');
	document.write ('<table width="96%"  border="0" cellpadding="0" cellspacing="0" bordercolor="EBEAEA"><tr><td>');

	document.write ('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"');
	document.write ('  <tr valign="middle"><td bgcolor="4B597E" height="23" width="8"><img src="./imagenes/redo_izq.jpg" height="23" width="8"></td><td height="23" width="100%" bgcolor="4B597E">');
	//Cabecera de la información
	document.write ('<div align="center"><A CLASS="cCabDerecha" HREF="modulos.htm">Grado Superior</font></span></div>');
	document.write ('</td><td height="23" width="8"><img src="./imagenes/redo_dcha.jpg" height="23" width="8"></td></tr>');
	document.write ('  <tr><td align="center" valign="top" colspan=3>');
	document.write (' <TABLE WIDTH=100% border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">');

	//repetir tantas veces como informaciones se deseen 
	//document.write ('<TR><TD width="5" height="10"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="20"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Información General</A>');
	//document.write ('</strong></TD></TR>');
	//hasta aquí      
	//document.write ('<TR><TD width="5" height="10"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="10"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Comunidades Autónomas</A>');
	//document.write ('</strong></TD></TR>');

	//document.write ('<TR><TD width="5" height="20"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="25"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Gestionamos tu acceso a la Universidad</A>');
	//document.write ('</strong></TD></TR>');

	document.write ('</TABLE>');

	document.write ('</td></tr></table></td></tr></table></div>');
}

function InfoGeneral3()
{
	document.write ('<div align="center"><br>');
	document.write ('<table width="96%"  border="0" cellpadding="0" cellspacing="0" bordercolor="EBEAEA"><tr><td>');

	document.write ('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" >');
	document.write ('  <tr valign="middle"><td height="23" width="8" bgcolor="4B597E"><img src="./imagenes/redo_izq.jpg" height="23" width="8"></td><td height="23" width="100%" bgcolor="4B597E">');
	//Cabecera de la información
	document.write ('<div align="center"><A CLASS="cCabDerecha" HREF="auxenfermeria.htm">Auxiliar enfermería</a></div>');
	document.write ('</td><td height="23" width="8"><img src="./imagenes/redo_dcha.jpg" height="23" width="8"></td></tr>');
	document.write ('  <tr><td align="center" valign="top" colspan=3>');
	document.write (' <TABLE WIDTH=100% border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">');

	//repetir tantas veces como informaciones se deseen 
	document.write ('<TR><TD width="5" height="10"  align="left" valign="middle"></TD><TD width="957" height="10"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Zona Solidaria</A>');
	document.write ('</strong></TD></TR>');
	//hasta aquí      
	//document.write ('<TR><TD width="5" height="20"  align="left" valign="middle"><div align="center">&middot;</div></TD><TD width="957" height="25"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Trabaja con nosotros</A>');
	//document.write ('</strong></TD></TR>');

	document.write ('</TABLE>');

	document.write ('</td></tr></table></td></tr></table></div>');
}


function InfoGeneral4()
{
	document.write ('<div align="center">');
	document.write ('<table width="96%"  border="0" cellpadding="0" cellspacing="0" bordercolor="EBEAEA"><tr><td>');

	document.write ('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" >');
	document.write ('  <tr valign="middle"><td height="23" width="8" bgcolor="4B597E"><img src="./imagenes/redo_izq.jpg" height="23" width="8"></td><td height="23" width="100%" bgcolor="4B597E">');
	//Cabecera de la información
	document.write ('<div align="center"><A CLASS="cCabDerecha" HREF="trabajo.htm">Ofertas de trabajo</a></div>');
	document.write ('</td><td height="23" width="8"><img src="./imagenes/redo_dcha.jpg" height="23" width="8"></td></tr>');
	document.write ('  <tr><td align="center" valign="top" colspan=3>');
	document.write (' <TABLE WIDTH=100% border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">');

	//repetir tantas veces como informaciones se deseen 
	document.write ('<TR><TD width="5" height="10"  align="left" valign="middle"><div align="center"></div></TD><TD width="957" height="10"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Información General</A>');
	document.write ('</strong></TD></TR>');
	//hasta aquí      
	
	document.write ('</TABLE>');

	document.write ('</td></tr></table></td></tr></table></div>');
}



function InfoGeneral5()
{
	document.write ('<div align="center">');
	document.write ('<table width="96%"  border="0" cellpadding="0" cellspacing="0" bordercolor="EBEAEA"><tr><td>');

	document.write ('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" >');
	document.write ('  <tr valign="middle"><td height="23" width="8" bgcolor="4B597E"><img src="./imagenes/redo_izq.jpg" height="23" width="8"></td><td height="23" width="100%" bgcolor="4B597E">');
	//Cabecera de la información
	document.write ('<div align="center"><A CLASS="cCabDerecha" HREF="nosotros.htm">Acerca de nosotros</A></div>');
	document.write ('</td><td height="23" width="8"><img src="./imagenes/redo_dcha.jpg" height="23" width="8"></td></tr>');
	document.write ('  <tr><td align="center" valign="top" colspan=3>');
	document.write (' <TABLE WIDTH=100% border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">');

	//repetir tantas veces como informaciones se deseen 
	document.write ('<TR><TD width="5" height="10"  align="left" valign="middle"><div align="center"></div></TD><TD width="957" height="10"  align="left" valign="middle" class="Estilo2 Estilo1"><strong>');
	//document.write ('<A class="enlace_enlaces" HREF="verano.htm" >Información General</A>');
	document.write ('</strong></TD></TR>');
	//hasta aquí      
	
	document.write ('</TABLE>');

	document.write ('</td></tr></table></td></tr></table></div>');
}


function Pie()
{
	//de momento en blanco
	document.write ('<div align="center">91.877.12.25 - 91.881.27.47<br><a href=mailto:grafton@grafton.es>grafton@grafton.es</a></div>');
}


function ObtenerP(nParametro) 
{ 
//Capturamos la URL 
var callingURL = document.location.href; 

//Separamos los parametros 
var cgiString = callingURL.substring(callingURL.indexOf('?')+1,callingURL.length); 

// Para manejar control ya que el arreglo empieza en cero restaremos 1 al parametro recibido 
nParametro -=1; 

// Dividimos mediante la función split los parámetros separados por ampersam 
var col_array=cgiString.split("&"); 
var part_num=0; 
 
// Ahora hacemos un recorrido del arreglo y buscamos el # de parametro solicitado! 
while (part_num < col_array.length) 
{ if ( part_num == nParametro ) 
return col_array[part_num]; 
else 
part_num+=1; 
} 

// evaluar que devolver cuando no lo 
// encuentra... 
return 0; 
} 



function getCookie(name){
  var cname = name + "=";               
  var dc = document.cookie;             
  if (dc.length > 0) {              
    begin = dc.indexOf(cname);       
    if (begin != -1) {           
      begin += cname.length;       
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    } 
  }
  return null;
}


function setCookie(name, value, expires, path, domain, secure) {
  document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  ((path == null) ? "" : "; path=" + path) +
  ((domain == null) ? "" : "; domain=" + domain) +
  ((secure == null) ? "" : "; secure");
}


function CambioIdioma(idioma)
{
	document.cookie='Grafton_ID=' + idioma;
	ControlIdioma();
	Idioma_Aux=idioma;
}

function ControlIdioma()
{

	var Valor;
	if (Idioma_Aux!=0)
	{
		capa=eval("id_" + Idioma_Aux);
		if (capa) capa.style.display="none";
	}

	Valor = getCookie("Grafton_ID");
	if (!Valor) Valor=1;

	capa=eval("id_" + Valor);
	if (capa) capa.style.display="";


}

