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 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+'">KTO JEST KIM</a><br><a href="'+path+'world/story.htm" class="menuHP'+classeTesto+'">KOMIKS</a><br><a href="'+path+'world/genealogy.htm" class="menuHP'+classeTesto+'">RODZINA</a><BR><a href="'+path+'world/backstage.htm" class="menuHP'+classeTesto+'">KULISY</a>';
//menuArray[1]='<a href="'+path+'fun/charm.htm" class="menuHP'+classeTesto+'">HOROSKOP</a><BR><a href="'+path+'fun/style.htm" class="menuHP'+classeTesto+'">STYL W.I.T.C.H.</a><BR><a href="'+path+'fun/potion.htm" class="menuHP'+classeTesto+'">W SZKLANEJ KULI</a><BR><a href="'+path+'fun/gadgets.htm" class="menuHP'+classeTesto+'">CZARY-MARY NA KOMPUTER</a>';
//menuArray[2]='<a href="'+path+'vote/vote.htm" class="menuHP'+classeTesto+'">GŁOSUJ</a><br><a href="'+path+'logindiary.html" class="menuHP'+classeTesto+'">TWÓJ PAMIĘTNIK</a>';
//menuArray[3]='<a href="'+path+'withus/subscribed.htm" class="menuHP'+classeTesto+'">PRENUMERATA</a><BR><a href="'+path+'withus/registered.htm" class="menuHP'+classeTesto+'">ZAPISZ SIĘ!</a><BR><a href="mailto:walpurga_hexengoettin@gmx.de" class="menuHP'+classeTesto+'">NAPISZ DO NAS</a><BR><a href="'+path+'withus/news.htm" class="menuHP'+classeTesto+'">CZARODZIEJSKIE WIEŚCI</a>';
menuArray[0]='<a href="'+path+'world/profile.htm" class="menuHP'+classeTesto+'">BOHATEROWIE</a><br><a href="'+path+'world/story.htm" class="menuHP'+classeTesto+'">KOMIKS</a><br><a href="'+path+'world/genealogy.htm" class="menuHP'+classeTesto+'">RODZINA</a><BR><a href="'+path+'world/backstage.htm" class="menuHP'+classeTesto+'">KULISY</a><BR><a href="'+path+'world/books.htm" class="menuHP'+classeTesto+'">KSIĄŻKI</a>';
menuArray[1]='<a href="'+path+'fun/charm.htm" class="menuHP'+classeTesto+'">HOROSKOP</a><BR><a href="'+path+'fun/style.htm" class="menuHP'+classeTesto+'">STYL W.I.T.C.H.</a><BR><a href="'+path+'fun/potion.htm" class="menuHP'+classeTesto+'">W SZKLANEJ KULI</a><BR><a href="'+path+'fun/gadgets.htm" class="menuHP'+classeTesto+'">CZARY-MARY NA KOMPUTER</a>';
menuArray[2]='<a href="'+path+'vote/vote.htm" class="menuHP'+classeTesto+'">GŁOSUJ</a><br><a href="'+path+'vote/dibujos.htm" class="menuHP'+classeTesto+'">GALERIA<br>HAY LIN</a><br><a href="'+path+'vote/winners.htm" class="menuHP'+classeTesto+'">ZWYCIĘZCY</a><br><a href="'+path+'vote/regulamin.htm" class="menuHP'+classeTesto+'">Regulamin konkursu</a>';
menuArray[3]='<a href="mailto:witch@egmont.pl" class="menuHP'+classeTesto+'">NAPISZ DO NAS</a><BR><a href="'+path+'withus/news.htm" class="menuHP'+classeTesto+'">CZARODZIEJSKIE WIEŚCI</a>';

var menuArrayMac= new Array();
menuArrayMac[0]='world';
menuArrayMac[1]='fun';
menuArrayMac[2]='vota';
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/Cornelia ma naprawdę rodzinę z marzeń: czuły tata, pogodna i oddana swoim córkom mama...  Nawet jej młodsza siostra - Lilian, mimo że często jest wścibska i denerwująca, tak naprawdę bardzo kocha Cornelię./albero_cornelia_scena_0.gif'
genealogia[1]='albero_cornelia_tit_1.gif/Ojciec Cornelii jest dyrektorem Central Credit, ważnego banku w Heatherfield. Rozpieszcza córkę i zrobiłby dla niej wszystko./albero_cornelia_scena_1.gif'
genealogia[2]='albero_cornelia_tit_2.gif/Konserwator zabytków, jest bardzo dumna ze swojej rodziny. Z charakteru przypomina Cornelię, jest jednak bardziej pogodna i dojrzalsza, i to właśnie niby ten sam, ale nieco inny punkt widzenia powoduje często ich sprzeczki./albero_cornelia_scena_2.gif'
genealogia[3]='albero_cornelia_tit_3.gif/Młodsza siostra Cornelii; niepoprawny urwis, często robi na złość swojej doskonałej, starszej siostrze; ale naprawdę bardzo ją kocha.Napoleon: kot, często jest ofiarą zabaw i tortur małej Lilian./albero_cornelia_scena_3.gif'

genealogia[5]='albero_will_tit_0.gif/Mieszka ze swoją mamą i sympatyczną popielicą, która często sprawia jej kłopoty. Will jest wrażliwa i zamknięta w sobie, co często jest przyczyną konfliktów z mamą. Ale dzięki głębokiemu uczuciu, które łączy obie panie, zawsze potrafią się dogadać./albero_will_scena_0.gif'
genealogia[6]='albero_will_tit_1.gif/Zajmuje kierownicze stanowisko w firmie komputerowej Simultech. Bardzo dużo pracuje, ale mimo ciągłego braku czasu  jest troskliwą matką, czułą... i trochę nadopiekuńczą./albero_will_scena_1.gif'
genealogia[7]='albero_will_tit_2.gif/To pupil Will. Jest bardzo ruchliwa, niszczy wszystko, co wpadnie jej w łapki. Złośliwa, ale również bardzo bystra./albero_will_scena_2.gif'
genealogia[8]='albero_will_tit_4.gif/To pupil Will. Jest bardzo ruchliwa, niszczy wszystko, co wpadnie jej w łapki. Złośliwa, ale również bardzo bystra./albero_will_scena_3.gif'

genealogia[9]='albero_irma_tit_0.gif/Irma, najbardziej impulsywna i wygadana z całej grupy W.I.T.C.H. mieszka razem z tatą Tomem, mamą, gospodynią domową i młodszym bratem  Christopherem - przekornym i złośliwym, z którym często toczy walki.../albero_irma_scena_0.gif'
genealogia[11]='albero_irma_tit_1.gif/Ojciec Irmy, jest sierżantem policji  w Heatherfield; w domu jest bardzo spokojny i uczynny, w pracy niezależny ekspert i profesjonalista./albero_irma_scena_2.gif'
genealogia[10]='albero_irma_tit_2.gif/Gospodyni domowa, jest przykładem idealnej matki. Ugodowa, ale podczas sprzeczek broni swoich racji. Czasami jest uszczypliwa w stosunku do swojej córki./albero_irma_scena_1.gif'
genealogia[12]='albero_irma_tit_3.gif/Jest młodszym bratem Irmy, przekorny i często niegrzeczny, ale Irma doskonale potrafi dać sobie z nim radę./albero_irma_scena_3.gif'
genealogia[13]='albero_irma_tit_4.gif/Mały żółw wodny, mieszka w akwarium w pokoju Irmy i zna jej wszystkie sekrety./albero_irma_scena_4.gif'

genealogia[14]='albero_taranee_tit_0.gif/Nieśmiałość Taranee kontrastuje z pogodną pewnością siebie jej brata  - przystojniaka, z którym dziewczynka ma świetny kontakt. Taranee w ogóle jest uwielbiana przez swych rodzinnych mężczyzn. Wie, że podczas nieporozumień z mamą, tata zawsze weźmie jej stronę. Taranee może liczyć na swoją rodzinę./albero_taranee_scena_0.gif'
genealogia[15]='albero_taranee_tit_1.gif/Sędzia w heatherfieldzkim sądzie; jest zarazem surowa i troskliwa w stosunku do Taranee. Niechętnie patrzy na znajomość córki z Nigelem./albero_taranee_scena_1.gif'
genealogia[16]='albero_taranee_tit_2.gif/Tata Taranee, były prawnik, teraz pracuje jako psycholog i konsultant w sądzie. Ma bogatą osobowość i jest bezgranicznie zakochany w swojej córce./albero_taranee_scena_2.gif'
genealogia[17]='albero_taranee_tit_3.gif/Starszy brat Taranee, jest bardzo przystojny i podoba się wszystkim jej koleżankom. Kocha surfing i koszykówkę. Jest bardzo wesoły i pogodny - a w stosunku do siostry - bardzo opiekuńczy. To brat, o którym wszystkie marzymy!/albero_taranee_scena_3.gif'
genealogia[18]='albero_hay_tit_0.gif/Rodzina Hay (lub "Hey Hay", jak nazywa ją Irma) to ludzie pogodni i szczęśliwi. Mądry, szlachetny ojciec i mama - praktyczna i zapobiegliwa - stanowią bardzo zgodną parę. Dobrym duchem rodziny była mądra i znająca mnóstwo legend babcia Yan Lin./albero_hay_scena_0.gif'
genealogia[19]='albero_hay_tit_1.gif/Mama, zarządza restauracją "Srebrny Smok". Jest bardzo energiczną i rzetelną osobą. Często opowiada córce stare legendy, które pamięta z dzieciństwa./albero_hay_scena_1.gif'
genealogia[20]='albero_hay_tit_2.gif/Kierownik restauracji, jest czułym i opiekuńczym ojcem. Nie poradziłby sobie bez pomocy żony, w codziennym zarządzaniu restauracją. Jego pasją jest ornitologia./albero_hay_scena_2.gif'
genealogia[21]='albero_hay_tit_3.gif/Babcia, jest mamą taty, byłą strażniczką Wielkiej Sieci. Wyjawiła swojej wnuczce i jej przyjaciółkom cel ich misji. Powierzyła też Will Serce Kondrakaru. Po śmierci dołączyła do bractwa w Kondrakarze. Wnuczka i babcia doskonale się rozumiały. Były prawdziwymi przyjaciółkami./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";
}