/* AJOUT FAVORIS */
function favoris(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
/* Rollover */
function rollover(img, name, i, extension)
{
	if (i==1)
	{
		img.src = 'http://jeu.orange.fr/webdata/images/nav/' + name + '_Over.' + extension;
	}
	else
	{
		img.src = 'http://jeu.orange.fr/webdata/images/nav/' + name + '_Out.' + extension;
	}
}

/* Popup centree */
function popCenter (URL,largeur,hauteur,options) {
	var top = Math.round((screen.height-hauteur)/2);
	var left = Math.round((screen.width-largeur)/2);
	window.open(URL,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

/* Check parameters in Url */

getChaine = document.location.href;
CheckWhat = getChaine.indexOf("?");
CheckEqual = getChaine.indexOf("=");
CheckParams = getChaine.substring(CheckEqual+1);
CheckNameImg = getChaine.substring(CheckWhat+1,CheckEqual);
CheckNumImg = getChaine.substring(CheckEqual+1);
SelImg = CheckNumImg;
var play = '';
var def = '';


function initImg() {
document.getElementById("diapo").src = '../../webdata/images/goacom/screenshots/img/'+CheckNameImg+'_'+SelImg+'.jpg';

	if(SelImg == "12"){
		document.getElementById("n").style.visibility = 'hidden';
	}
	if(SelImg == "1"){
		document.getElementById("p").style.visibility = 'hidden';
	}
}

for (i=1; i<12; i++) {
}

/* Function next img in diaporama */
function next_image() {
	if(SelImg < 12){
		SelImg++;
		if(SelImg == 12){
			document.getElementById("n").style.visibility = 'hidden';
		}
		else{
			document.getElementById("n").style.visibility = 'visible';
		}
		document.getElementById("p").style.visibility = 'visible';
		document.getElementById("diapo").src = '../../webdata/images/goacom/screenshots/img/'+CheckNameImg+'_'+SelImg+'.jpg';
	}
}

/* Function previous img in diaporama */
function prev_image() {
	if(SelImg > 1){
		SelImg--;
		if(SelImg == 1){
			document.getElementById("p").style.visibility = 'hidden';
		}
		else{
			document.getElementById("p").style.visibility = 'visible';
		}
		document.getElementById("n").style.visibility = 'visible';
		document.getElementById("diapo").src = '../../webdata/images/goacom/screenshots/img/'+CheckNameImg+'_'+SelImg+'.jpg';
	}
}

/* Function display flash player */
function loadPlayer(pPlay) {
play = pPlay;

	// <![CDATA[
var so = new SWFObject("mediaplayer.swf", "single", "266", "169", "7", "#FFFFFF");
	so.addParam("allowfullscreen","true");
	so.addParam("menu", "false");
	so.addVariable("file",""+play+".flv");
	so.addVariable("width","266");
	so.addVariable("height","169");
	so.addVariable("overstretch","true");
	so.addVariable("backcolor","0xFFFFFF");
	so.addVariable("frontcolor","0x404040");
	so.addVariable("lightcolor","0xFF6600");
	so.addVariable("autostart","true");
	
		
	so.write("player");
// ]]>
}
/* Function display screenshots button */
function goScreen() {
ch="";
ch+="<a href='screenshots.shtml?pangya=1' target='popScreenVid'><img src='../../webdata/images/goacom/video/btn_screenshots.gif' width='119' height='23' border='0'></a>";
document.getElementById('btnScreen').innerHTML=ch;
}

/* Function display video button */
function goVideo() {
ch="";
ch+="<a href='video.shtml' target='popScreenVid'><img src='../../webdata/images/goacom/screenshots/btn_video.gif' width='119' height='22' border='0'></a>";
document.getElementById('btnVideo').innerHTML=ch;
}

/* Function display on iframe */
function displayIframe() {
	if (document.getElementById("popScreenVid").style.visibility = 'hidden') {
		document.getElementById("popScreenVid").style.visibility = 'visible';
	}
	else {
		document.getElementById("popScreenVid").style.visibility = 'visible';
	}
}

/* Function display off iframe */
function eraseIframe() {
	if (window.parent.document.getElementById("popScreenVid").style.visibility = 'visible') {
		window.parent.document.getElementById("popScreenVid").style.visibility = 'hidden';
	}
	else {
		window.parent.document.getElementById("popScreenVid").style.visibility = 'hidden';
	}
}