/**
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); 
*/
ns4 = (document.layers)? true:false
//ie4 = (document.all && (navigator.userAgent.indexOf("Mac") == -1))? true:false
ie4 = (document.all)? true:false //&& (navigator.userAgent.indexOf("Mac") == -1))? true:false
ns6 = ((document.getElementById)&&(!ie4))? true:false
//mac = (navigator.userAgent.indexOf("Mac") != -1); 
mac = false;

function openPop(urlFile, namePop, w, h, r, s){
	var wPop = window.open(urlFile,namePop,"width=" + w + ",height=" + h + ",resizable=" + r + ",menubar=no,scrollbars=" + s);
	wPop.focus();
}

function openPrivacy(base_url){
	var finestra1 = window.open(base_url + "popPrivacy.jsp","privacy","width=450,height=475, resizable=no,menubar=no,scrollBars=yes");
	finestra1.focus();
}

function openCondition(base_url){
	var finestra2 = window.open(base_url + "popCondition.jsp","condition","width=450,height=475, resizable=no,menubar=no,scrollBars=yes");
	finestra2.focus();
}

function openWitchHP(){
	var finestra3 = window.open("popStartPageSite.jsp","witchHP","width=430,height=350, resizable=no,menubar=no,scrollBars=no");
	finestra3.focus();
}

function openMagazine(){
	var finestra4 = window.open("world/magazine.jsp","magazine","width=460,height=385, resizable=no,menubar=no,scrollBars=yes");
	finestra4.focus();
}

function showAllImg(nameImg1,nameImg2,srcImg1,srcImg2){
	if (document.images){
	document.images[nameImg1].src=srcImg1
	document.images[nameImg2].src=srcImg2
	return true;
	}
}

function showImg(nameImg, srcImg) {
   if (document.images) {
	   document.images[nameImg].src =srcImg;
   	   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";
}

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function shake(n) {
	if (self.moveBy) {
		for (i = 10; i > 0; i--) {
			for (j = n; j > 0; j--) {
				self.moveBy(0,i);
				self.moveBy(i,0);
				self.moveBy(0,-i);
				self.moveBy(-i,0);
	        }
     	}
  	}
}

MM_reloadPage(true);




function resizeFlashObject(obj,w,h){
	if(document.all && !document.getElementById) {
		document.all[obj].style.pixelWidth = w+"px";
 		document.all[obj].style.pixelHeight = h+"px";
	}else{
		document.getElementById(obj).style.width = w+"px";
		document.getElementById(obj).style.height = h+"px";
	}
	//alert(obj+":"+w+","+h);
}