function popUpXPage(url) {
	window.open(url, "popUpXPage", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=500");
}
function popUpHomePage() {
	var x, y = 0;
	x = (screen.availWidth - 500) / 2;
	y = (screen.availHeight - 500) / 2;
	args = "width=500,height=500,screenX="+x+",screenY="+y+",left="+x+",top="+y+",toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1";
	window.open("index.php?KTURL=addhomepage.html&cat=root", "popUpHomePage", args);
}
function popUpHomePageArt(mid) {
	var x, y = 0;
	x = (screen.availWidth - 500) / 2;
	y = (screen.availHeight - 500) / 2;
	args = "width=500,height=500,screenX="+x+",screenY="+y+",left="+x+",top="+y+",toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1";
	window.open("index.php?KTURL=addhomepageart.html&mid="+mid, "popUpHomePage", args);
}
function popUpNugget() {
  window.open("index.php?KTURL=addnugget.html&cat=root", "popUpHomePage", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=300");
}
function popUpRecommend(page, uri) {
	pwidth = 460;
	pheight = 500;
	pleft = (screen.width - pwidth)/2;
	ptop = (screen.height - pheight)/2;
	page += '&refpage='+uri;
	window.open(page, "popUpRefer", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+pwidth+",height="+pheight+",left="+pleft+",top="+ptop);
}
function popUpPrint(page) {
	pwidth = 800;
	pheight = 450;
	pleft = (screen.width - pwidth)/2;
	ptop = (screen.height - pheight)/2;
	window.open(page, "popUpPrint", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+pwidth+",height="+pheight+",left="+pleft+",top="+ptop);
}
function popUpFAQ(page) {
	pwidth = 460;
	pheight = 550;
	pleft = (screen.width - pwidth)/2;
	ptop = (screen.height - pheight)/2;
	window.open(page, "popUpFAQ", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+pwidth+",height="+pheight+",left="+pleft+",top="+ptop);
}
function popUpPhoto(page) {
	pwidth = 850;
	pheight = 600;
	pleft = (screen.width - pwidth)/2;
	ptop = (screen.height - pheight)/2;
	window.open(page, "popUpPhoto", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+pwidth+",height="+pheight+",left="+pleft+",top="+ptop);
}
function popUpHist(page) {
	pwidth = 840;
	pheight = 600;
	pleft = (screen.width - pwidth)/2;
	ptop = (screen.height - pheight)/2;
	window.open(page, "popUpHist", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+pwidth+",height="+pheight+",left="+pleft+",top="+ptop);
}


function compo(level){
 document.URL.src="img/uploads/Recherche/serie03/compo"+level+".gif";
}

function MapDynamic(level){
 var compo =new String();
 compo=document.URL.src;
 switch (level) {
 	case 1 :
		 if (compo.indexOf("serie03/compo1.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=1";
		} else if (compo.indexOf("serie03/compo2.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=6";
		} else if (compo.indexOf("serie03/compo3.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=10";
		}
	break;
	case 2 :
		 if (compo.indexOf("serie03/compo1.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=2";
		} else if (compo.indexOf("serie03/compo3.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=11";
		}
		break;
 	case 3 :
		 if (compo.indexOf("serie03/compo1.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=3";
		} else if (compo.indexOf("serie03/compo2.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=7";
		} else if (compo.indexOf("serie03/compo3.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=12";
		}
	break;
 	case 4 :
		 if (compo.indexOf("serie03/compo1.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=4";
		} else if (compo.indexOf("serie03/compo2.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=8";
		} else if (compo.indexOf("serie03/compo3.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=13";
		}
	break;
 	case 5 :
		if (compo.indexOf("serie03/compo3.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=14";
		}
	break;
 	case 6 :
		 if (compo.indexOf("serie03/compo1.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=5";
		} else if (compo.indexOf("serie03/compo2.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=9";
		} else if (compo.indexOf("serie03/compo3.gif")!=-1){
			parent.location.href="index.php?KTURL=mod_step.html&page=3&step=15";
		}		
	break;
	default :
	break;
	}
}

function openVersionPopup(name, id, time) {
	pwidth = 650;
	pheight = 600;
	pleft = (screen.width - pwidth)/2;
	ptop = (screen.height - pheight)/2;
	page = 'index.php?KTURL=showversion.html';
	page += '&name='+name;
	page += '&id='+id;
	page += '&time='+time;
	window.open(page, '', "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+pwidth+",height="+pheight+",left="+pleft+",top="+ptop);
}
