var ASPDOMAIN = "asp-es.secure-zone.net";
function modificarImagen(invocador,modo){
	var urlTroceada;
	var totalUrlTroceada;
	var nombreImagenTrozeada;
	var imagenDefecto;
	
	urlTroceada=invocador.attr("src").split("/");
	imagenDefecto=invocador.attr("src");
	totalUrlTroceada=urlTroceada.length;
	nombreImagenTrozeada=urlTroceada[totalUrlTroceada-1].split(".");
	if(modo==1){
		nombreImagenTrozeada[0]+="_color";
	}else{
		nombreImagenTrozeada[0]=nombreImagenTrozeada[0].substring(0,nombreImagenTrozeada[0].length-6);
	}
	
	
	urlTroceada[totalUrlTroceada-1]=nombreImagenTrozeada[0]+"."+nombreImagenTrozeada[1];
	
	invocador.attr("src",urlTroceada.join("/"));	
}

function fullWin(name,url){

	// IE PC
	if((navigator.appName == "Microsoft Internet Explorer") && (navigator.platform != "MacPPC"))
	{
		fenetre=window.open(url,name,'fullscreen=yes');
	}
	// safari mac
	
	else {
		height = screen.availHeight;
		width = screen.availWidth;
	
		try
		{
			tmp = window.open(url, null, "height=" + height + "px,width=" + width + "px,top=0,left=0,location=0,menubar=0,resizable=0,scrollbars=0,toolbar=0");
			tmp.resizeTo(width, height);
		} catch(e) {}
	}
}

// fonction de lancement de la mini-visionneuse - asp
function launchMini(url, ispop, coulfond, width, height, lng){
	
	tellTarget = "target=\"_blank\"";
	launcher = "scripts/flash/";
	if (ispop == "true"){
		path = "files/folleto/index.htm";
		path = "javascript:fullWin('pop1','" + path + "')";
		tellTarget = "";
	}else{
		path = "http://"+ASPDOMAIN+"/v2/index.jsp?id=" + url + "&lng=" + lng;
	}
	url = "http://"+ASPDOMAIN+"/v2/" + url + "/integration";

	document.getElementById("digitalMini").innerHTML="<table border=\"0\" width=\"" + width + "\" height=\"" + height + "\" align=\"right\"><tr><td valign=\"top\"><div style=\"position:absolute;z-index:2;width:" + width + "px;height:" + height + "px\"><a " + tellTarget + " href=\"" + path +"\"><img src=\"images/spacer.gif\" width=\"" + width + "\" height=\"" + height + "\" border=\"0\" /></a></div><!--[if IE]><object type=\"application/x-shockwave-flash\" data=\"" + launcher + "mini.swf?dirPath=" + url + "&fondCoul=" + coulfond + "\" width=\"" + width + "\" height=\"" + height + "\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param name=\"movie\" value=\"" + launcher + "mini.swf?dirPath=" + url + "&fondCoul=" + coulfond + "\" /><img src=\"alternatif-animation.jpg\" alt=\"Texte alternatif si aucune image\" width=\"" + width + "\" height=\"" + height + "\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"allowScriptAccess\" value=\"sameDomain\" /></object><![endif]--><!--[if !IE]> <--><object type=\"application/x-shockwave-flash\" data=\"" + launcher + "mini.swf?dirPath=" + url + "&fondCoul=" + coulfond + "&LinkURL="+ path +"\" width=\"" + width + "\" height=\"" + height + "\"><param name=\"movie\" value=\"" + url + "dirPath=" + launcher + "mini.swf?dirPath=" + url + "&fondCoul=" + coulfond + "\" /><img src=\"images/design/alternatif-animation.jpg\" alt=\"Texte alternatif si aucune image\" width=\"" + width + "\" height=\"" + height + "\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"allowScriptAccess\" value=\"sameDomain\" /></object><!--> <![endif]--></td></tr></table>";
}

