ns4 = (document.layers)? true:false
ie4 = (document.all && (navigator.userAgent.indexOf("Mac") == -1))? true:false
ns6 = ((document.getElementById)&&(!ie4))? true:false
mac = (navigator.userAgent.indexOf("Mac") != -1); 

var timerID=0;
var aspetta=""
var larghezza=100     						// dimensioni  del  layer
var ok=false

function wrTopFlash( iSeccion, sPath, sImage ) {

	document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>');
	document.write('<td valign="top">');
	document.write('<table width="717" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="2" background="img/nav_top_bk.gif" colspan="2"><img src="../img/pix.gif" width="244" height="156" alt="" border="0"><br></td></tr>' );
	document.write('<tr><td valign="top" colspan="2"><img src="img/nav_bot_bk.gif" border="0" width="717" height="34"></td></tr>');

	document.write('<tr><td valign="top"><img src="img/tit_' + sImage + '.gif" alt="" border="0"></td><td valign="top">');

	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="700" height="104">' );

	if ( sPath == "" || sPath == null) {
		document.write('<param name=movie value="botonera.swf?akamai=false&seccion=' + iSeccion + '">');
		document.write('<param name=quality value=high>');
		document.write('<embed src="botonera.swf?akamai=false&seccion=' + iSeccion + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="700" height="104">');
	}
	else {
		document.write('<param name=movie value="' + sPath + 'botonera.swf?akamai=false&seccion=' + iSeccion + '&path=' + sPath + '">');
		document.write('<param name=quality value=high>');
		document.write('<embed src="' + sPath + 'botonera.swf?akamai=false&seccion=' + iSeccion + '&path=' + sPath + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="700" height="104">');
	}

	document.write('</embed>');
	document.write('<param name=wmode value=Opaque></object>');

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

	document.write('</td>');
	document.write('<td valign="top" background="img/nav_px_bk.gif" width="60%"><img src="../img/pix.gif" width="1" alt="" border="0" height="233"></td>');
	document.write('<td valign="top"><img src="img/nav_dx.gif" alt="" border="0" width="42" height="233"></td>');
	document.write('</tr></table>');

}

function wrTop(testPag,titImg){
var str=""; 
	 str+='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
	 str+='<td valign="top">';
	 str+='<table width="717" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="2" background="img/nav_top_bk.gif" colspan="2"><img src="../img/pix.gif" width="244" height="156" alt="" border="0"><br></td></tr>';
	 str+='<tr><td valign="top" colspan="2"><img src="img/nav_bot_bk.gif" border="0" width="717" height="34"></td></tr>';
	 if(testPag=='0'){
	  str+='<tr><td valign="top"><img src="img/tit_'+titImg+'.gif" alt="" border="0"></td><td valign="top"><img src="img/nav_bar.gif" alt="" border="0" usemap="#menuInt"></td>';
}else {
	 str+='<tr><td valign="top"><a href="'+titImg+'.htm" onmouseover="showImg(\'nameImg\',\'tit_'+titImg+'_over.gif\')" onmouseout="showImg(\'nameImg\',\'tit_'+titImg+'.gif\')"><img src="img/tit_'+titImg+'.gif" alt="" border="0"  name="nameImg"></a></td><td valign="top"><img src="img/nav_bar.gif" alt="" border="0" usemap="#menuInt"></td>';
} 
	 str+='</tr></table>';
	 str+='</td>';
	 str+='<td valign="top" background="img/nav_px_bk.gif" width="60%"><img src="../img/pix.gif" width="1" alt="" border="0" height="233"></td>';
	 str+='<td valign="top"><img src="img/nav_dx.gif" alt="" border="0" width="42" height="233"></td>';
	 str+='</tr></table>';
 document.write(str);
}


function creo(){
//funzione che inizializa le clip
creoClip();
        
		if(ns4){
		 linkarea=new Layer(larghezza);
		 linkarea.onmouseover=ShowLyr;
		 linkarea.onmouseout=hide;
		 linkarea.document.close();
		 linkarea.visibility="hidden";
		 }
		 else {
		       if(ie4 || mac){linkarea.style.position="absolute";}
			   else{linkarea=document.getElementById('linkarea')
			   linkarea.style.position="absolute" 
			   }
			 linkarea.style.width=larghezza;
			 linkarea.onmouseover=ShowLyr;
		     linkarea.onmouseout=hide;  
		}
  }



function show(posLeft,posTop,numText,bkLayer,widthDiv) {

var menuArray= new Array();
menuArray[0]='<a href="'+path+'world/profile.htm" class="menuHP'+classeTesto+'">IDENTIKIT</a><br><a href="'+path+'world/story.htm" class="menuHP'+classeTesto+'">LA HISTORIA</a><br><a href="'+path+'world/genealogy.htm" class="menuHP'+classeTesto+'">LAS FAMILIAS</a><BR><a href="'+path+'world/backstage.htm" class="menuHP'+classeTesto+'">C&Oacute;MO SE HACE W.I.T.C.H.</a>';
menuArray[1]='<a href="'+path+'fun/charm.htm" class="menuHP'+classeTesto+'">HORÓSCOPO & C.</a><BR><a href="'+path+'fun/style.htm" class="menuHP'+classeTesto+'">ESTILO W.I.T.C.H.</a><BR><a href="'+path+'fun/potion.htm" class="menuHP'+classeTesto+'">HACIENDO MAGIA</a><BR><a href="'+path+'fun/gadgets.htm" class="menuHP'+classeTesto+'">SORPRESAS ONLINE</a>';
menuArray[2]='<a href="'+path+'vote/vote.htm" class="menuHP'+classeTesto+'">ENCUESTA</a><br><a href="'+path+'logindiary.html" class="menuHP'+classeTesto+'">DIARIO SECRETO</a><br><a href="'+path+'vote/art.htm" class="menuHP'+classeTesto+'">ARTE WITCH</a><br><a href="'+path+'vote/messages.htm" class="menuHP'+classeTesto+'">CALDERO DE LOS MENSAJES</a>';
menuArray[3]='<a href="'+path+'withus/subscribed.htm" class="menuHP'+classeTesto+'">SUSCRÍBETE</a><BR><a href="'+path+'withus/registered.htm" class="menuHP'+classeTesto+'">REGÍSTRATE</a><BR><a href="mailto:correo@revistawitch.com" class="menuHP'+classeTesto+'">ESCRÍBENOS</a><BR><a href="'+path+'withus/news.htm" class="menuHP'+classeTesto+'">NOTICIAS</a><BR><a href="javascript:Apri(12);" class="menuHP'+classeTesto+'">WITCH MOBILE</a>';


var menuArrayMac= new Array();
menuArrayMac[0]='world';
menuArrayMac[1]='fun';
menuArrayMac[2]='vote';
menuArrayMac[3]='withus';


widthInt = widthDiv - 10

if(HomePage){
	var OpenstrBot = '<table width="'+widthDiv+'" height="85" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="img/cornice_tops.gif" width="5" height="5" alt="" border="0"></td><td background="img/pixel_top.gif"><img src="img/pixel_top.gif" width="1" height="5" alt="" border="0"></td><td><img src="img/lyr_ang_top_hp.gif" width="5" height="5" alt="" border="0"></td></tr><tr><td background="img/pixel_s.gif"><img src="img/pixel_s.gif" width="5" height="1" alt="" border="0"></td><td class="menuHP" valign="top" bgcolor="#'+bkLayer+'"><table width="'+widthInt+'" height="75" border="0" cellspacing="2" cellpadding="2"><tr><td valign="top">';

	var ClosestrBot = '</td></tr></table></td><td background="img/pixel_d.gif"><img src="img/pixel_d.gif" width="5" height="1" alt="" border="0"></td></tr><tr><td><img src="img/cornice_bass.gif" width="5" height="5" alt="" border="0"></td><td background="img/pixel_bas.gif"><img src="img/pixel_bas.gif" width="1" height="5" alt="" border="0"></td><td><img src="img/lyr_ang_bot_hp.gif" width="5" height="5" alt="" border="0"></td></tr></table>';
}else if(HomePage==false){
	var OpenstrBot = '<table width="'+widthDiv+'" height="85" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="img/cornice_tops.gif" width="5" height="5" alt="" border="0"></td><td background="img/pixel_top.gif"><img src="img/pixel_top.gif" width="1" height="5" alt="" border="0"></td><td><img src="img/lyr_ang_top_dxint.gif" width="5" height="5" alt="" border="0"></td></tr><tr><td background="img/pixel_s.gif"><img src="img/pixel_s.gif" width="5" height="1" alt="" border="0"></td><td class="menuHP'+classeTesto+'" valign="top" bgcolor="#'+bkLayer+'"><table width="'+widthInt+'" height="75" border="0" cellspacing="2" cellpadding="2"><tr><td valign="top" class="menuHP'+classeTesto+'">';

	var ClosestrBot = '</td></tr></table></td><td background="img/pixel_d.gif"><img src="img/pixel_d.gif" width="5" height="1" alt="" border="0"></td></tr><tr><td><img src="img/cornice_bass.gif" width="5" height="5" alt="" border="0"></td><td background="img/pixel_bas.gif"><img src="img/pixel_bas.gif" width="1" height="5" alt="" border="0"></td><td><img src="img/lyr_ang_bot_dxint.gif" width="5" height="5" alt="" border="0"></td></tr></table>';
}

 clearTimeout(timerID);
        if (ns4) {
		  linkarea.left= posLeft
		  linkarea.top= posTop
          linkarea.visibility = "show"
		  with (linkarea.document){
		  	open();
			write(OpenstrBot+menuArray[numText]+ClosestrBot);
			close();
		  }
        }
        else if (ie4){
		  linkarea.style.left= posLeft
		  linkarea.style.top= posTop
          linkarea.style.visibility = "visible"
          linkarea.innerHTML = OpenstrBot+menuArray[numText]+ClosestrBot
        }
		else if (ns6){
		 if(HomePage) {linkarea.style.left= posLeft-(-7)} else{linkarea.style.left= posLeft}
		  linkarea.style.top= posTop
          linkarea.style.visibility = "visible"
          linkarea.innerHTML = OpenstrBot+menuArray[numText]+ClosestrBot
        }
		if(mac){
		var curPosLeft="";
		  linkarea.style.left= posLeft 
		  linkarea.style.top= 100
          linkarea.style.visibility = "visible"
          linkarea.innerHTML = '<img src="img/layer_'+menuArrayMac[numText]+'.gif" border="0" usemap="#lyr_'+menuArrayMac[numText]+'">'
		
		}
}

function hideLyr(){
	timerID=setTimeout('hide()',200)
}

function hide() {
		
        if(ns4) linkarea.visibility = "hidden";
        else    linkarea.style.visibility = "hidden"        
}

function ShowLyr(){	
	
	clearTimeout(timerID);
	if (ns4) linkarea.visibility="show";
	else 	 linkarea.style.visibility="visible";	
}

function creoClip(){
if (namePage=="pentolone"){prepLyr('scrollDiv',0,250,197,305,0);vis('scrollDiv','visible');}
if (namePage=="profiloWitch"){prepLyr('scrollDiv',0,272,220,250,0);vis('scrollDiv','visible');}
if (namePage=="profilo"){prepLyr('scrollWitch',0,60,60,348,0);vis('scrollWitch','visible');}
} 


onload=carico
  function carico(){
  ok=true
	//inizializzo le proprietà del layer
  creo()
  }
  
  
var genealogia= new Array();
genealogia[0]='albero_cornelia_tit_0.gif/La familia de Cornelia parece el retrato de la perfección: un padre afectuoso, una madre tranquila y dedicada a sus hijas... y una hermana pequeña que no para quieta pero que quiere mucho a nuestra Witch y siempre quiere jugar con ella./albero_cornelia_scena_0.gif'
genealogia[1]='albero_cornelia_tit_1.gif/El padre es el director del Central Credit, un importante banco de Heatherfield. Se desvive por Cornelia y está dispuesto a hacer cualquier cosa por ella./albero_cornelia_scena_1.gif'
genealogia[2]='albero_cornelia_tit_2.gif/La madre es restauradora, y está muy orgullosa de su familia. Su carácter es muy parecido al de Cornelia, pero es más tranquila y madura y esto evita enfrentamientos entre las dos./albero_cornelia_scena_2.gif'
genealogia[3]='albero_cornelia_tit_3.gif/Es la hermana pequeña de Cornelia; es una rebelde incorregible siempre dispuesta  a pinchar con su ingenua ironía infantil a su hermana mayor, pero en realidad la quiere mucho./albero_cornelia_scena_3.gif'


genealogia[5]='albero_will_tit_0.gif/Will vive con su madre y con un simpático lirón que se pasa la vida enredando. Su carácter sensible e introvertido hace que discuta a menudo con su madre. Pero como se quieren mucho, los malentendidos se arreglan enseguida./albero_will_scena_0.gif'
genealogia[6]='albero_will_tit_1.gif/La madre trabaja en Simultech, empresa de informática. Tiene un ritmo de trabajo muy intenso pero es una madre atenta, cariñosa y...  un poco aprensiva. Enseguida se da cuenta de los cambios de humor de su hija./albero_will_scena_1.gif'
genealogia[7]='albero_will_tit_2.gif/Ex-marito di Susan - ingegnere informatico /albero_will_scena_2.gif'
genealogia[8]='albero_will_tit_4.gif/Es la mascota de Will. Tiene un temperamento muy inquieto y destroza todo le que cae entre sus patas. Es arisco y sumamente tragón, ¡pero es muy gracioso!/albero_will_scena_3.gif'

genealogia[9]='albero_irma_tit_0.gif/Irma, la más isntintiva e mordaz del grupo vive con su padre, su madre, dulce y pacífica y su hermano pequeño, gruñón y  malicioso con el que  se pelea muy a menudo... ¡y sale ganando siempre!/albero_irma_scena_0.gif'
genealogia[10]='albero_irma_tit_2.gif/Ama de casa, es la madre por antonomasia. Tiene un carácter pacífico, aunque no le falta genio para calmar las discusiones familiares; su hija ha heredado de ella la punzante ironía./albero_irma_scena_1.gif'
genealogia[11]='albero_irma_tit_1.gif/El padre es sargento de policía del departamento central de Heatherfield; en familia es sereno y tranquilo, en el trabajo es un profesional bien considerado, experto y meticuloso./albero_irma_scena_2.gif'
genealogia[12]='albero_irma_tit_3.gif/Es el hermano menor de Irma, es muy gruñón y travieso; aunque Irma se toma la revancha y están en lucha permanente./albero_irma_scena_3.gif'
genealogia[13]='albero_irma_tit_4.gif/Es una pequeña tortuga de agua, vive en un acuario en la habitación de Irma y es la depositaria de todos sus secretos./albero_irma_scena_4.gif'

genealogia[14]='albero_taranee_tit_0.gif/La timidez de Taranee contrasta con el caracter solar de su hermano (muy guapo) con el que tiene una relación de complicidad. También su padre trata de defender a su hija, sobre todo en las discusiones con su madre, una mujer severa y con mucho carácter. Pero la familia está muy unida y es protectiva para con Taranee. /albero_taranee_scena_0.gif'
genealogia[15]='albero_taranee_tit_1.gif/La madre es juez del  tribunal de Heatherfield, es muy severa y protectora con Taranee y no ve con buenos ojos su amistad con Nigel./albero_taranee_scena_1.gif'
genealogia[16]='albero_taranee_tit_2.gif/El padre ha sido abogado y ahora trabaja como psicólogo y consultor en el tribunal de Heatherfield. Es un hombre abierto y comprensivo y trata de respaldar a su hija en las discusiones con su madre./albero_taranee_scena_2.gif'
genealogia[17]='albero_taranee_tit_3.gif/Es el hermano mayor, es encantador y les gusta mucho a las amigas de Taranee. Es un apasionado del surf y del baloncesto, es alegre y suele ser el centro de atención. Ante los problemas de su hermana se muestra cómplice y protector. ¡Es el hermano mayor que a todas nos gustaría tener!/albero_taranee_scena_3.gif'

genealogia[18]='albero_hay_tit_0.gif/La familia de Hay (o "Hey", como la llama Irma….)  vive en serenidad y armonía y consigue transmitir a la pequeña guardiana la despreocupación y la positividad que la caracterizan. Y  no nos olvidamos de la abuela.../albero_hay_scena_0.gif'
genealogia[19]='albero_hay_tit_1.gif/La madre administra el restaurante de la familia, el Silver Dragon. Es una mujer tranquila y práctica, le gusta contarle a su hija las leyendas que ella aprendió de niña./albero_hay_scena_1.gif'
genealogia[20]='albero_hay_tit_2.gif/Gestor del restaurante, es un padre afectuoso y protector. Estaría perdido sin la ayuda de su mujer para llevar el local; su hobby es la ornitología./albero_hay_scena_2.gif'
genealogia[21]='albero_hay_tit_3.gif/La abuela paterna de joven fue guardiana de la Muralla. Ella es quien revela a su nieta y  a sus amigas cuál es su misión y confía a Will el Corazón de Kandrakar. Una vez cumplida esta misión, muere y es acogida por el oráculo en Kandrakar.  Tenía una intensa relación con su nieta. /albero_hay_scena_3.gif'

function changeAll(chooseLyr){
var str='';
var curDescr=genealogia[chooseLyr].split("/");
			
			str+='<table cellpadding="0" cellspacing="0" border="0" width="360" align="center"><tr>';
			str+='<td colspan="3"><img src="img/'+curDescr[0]+'" width="356" height="23" alt="" border="0"></td></tr>';
			str+='<tr><td width="20"><img src="../img/pix.gif" width="20" height="50" alt="" border="0"></td><td class="content" width="335"><img src="../img/pix.gif" width="335" height="1" alt="" border="0"><br>'+curDescr[1]+'<br><br><br></td><td width="20"><img src="../img/pix.gif" width="20" height="50" alt="" border="0"></td></tr>';
			str+='<tr><td colspan="3"><img src="img/'+curDescr[2]+'"border="0"></td></tr>';
			str+='</table>';
			
if(ie4) document.all.descFamily.innerHTML=str;

if(ns6)document.getElementById("descFamily").innerHTML=str;

if(ns4) {
	 	with (document.descFamily.document){
		  	open();
			write('<table cellpadding="0" cellspacing="0" border="0" width="360"><tr><td colspan="3"><img src="img/'+curDescr[0]+'" width="356" height="23" alt="" border="0"></td></tr><tr><td width="20"><img src="../img/pix.gif" width="20" height="50" alt="" border="0"></td><td class="content" width="335"><img src="../img/pix.gif" width="335" height="1" alt="" border="0"><br>'+curDescr[1]+'<br><br><br></td><td width="20"><img src="../img/pix.gif" width="20" height="50" alt="" border="0"></td></tr><tr><td colspan="3"><img src="img/'+curDescr[2]+'"border="0"></td></tr></table>');
			close();
		 }
}
return true;
}

function PutVisible(nameLyr){
	if(ie4) document.all[nameLyr].style.visibility="visible";
	if(ns6) document.getElementById(nameLyr).style.visibility="visible";
	if(ns4)	document.layers[nameLyr].visibility="visible";
}

function NoVisible(nameLyr){
	if(ie4) document.all[nameLyr].style.visibility="hidden";
	if(ns6) document.getElementById(nameLyr).style.visibility="hidden";
	if(ns4)	document.layers[nameLyr].visibility="hidden";
}