//_____ function to 'show/hide' elements _______________________________________
/*
*/
function zShowHide(wDIV, sOFF, sON)
	{
		var myD = document.getElementById(wDIV);
		var myS = document.getElementById("menSR");
		var disP = myD.style.display;
		var styD = myS.className;
		if (disP == "block")
			{ disP = "none"; styD = sOFF; }
		else if (disP == "" || disP == "none")
			{ disP = "block"; styD = sON; }
		myD.style.display = disP;
		myS.className = styD;
	}

//_____ function to cycle through a set of images ______________________________
/*
lstIMG: array containing all the image names, defined where the function is called.
tarIMG: target image ID who will show the cycle.
dirIMG: image directory.
cycNUM: starting number image.
*/
function cycleIMG(lstIMG, tarIMG, dirIMG, cycNUM)
	{
		document.getElementById(tarIMG).src = dirIMG + eval(lstIMG)[ cycNUM % (eval(lstIMG).length) ] + ".gif";
		cycNUM++;
		setTimeout("cycleIMG('"+ lstIMG +"', '"+ tarIMG +"', '"+ dirIMG +"', "+ cycNUM +")", (eval(lstIMG).length) * 750);
	}

//_____ function to manage CID for DR links ____________________________________
/*
PROD: the product reffered to, in a single digit number (0 to 6), in this order : PRE.STA.PER.OFF.PDF.WEB.MOB
CID: 2 way for the CID :
	.a single digit number (0 to 5): reference to an array defined on the HTML page and containing all CIDs for the different products, named 'lstCID'
	.the direct CID code
—— values must be surrounded with '' (single quotes) to avoid non detection of the 0 (zero)
*/
function getLinkDR(PROD,CID,nWIN)
	{
		//alert(PROD +" - "+ typeof(PROD)); if( !String(PROD) ) { alert('YES'); }
		//_____ domain detection __________
		var xyz = String( location.hostname.substring(location.hostname.length - 6 + (location.hostname.substring(location.hostname.length - 6).indexOf('.') + 1)) );
		//_____  __________
		if( xyz == "com" ) /* 'atlantic' */
			{
				var proID = new Array("11033618","11033619","11033620","11033621","11033622","11033623"); // PRE.STA.PER.OFF.PDF.WEB
				var drURL = "http://shop.systransoft.com/dr/sat5/ec_Main.Entry";
				( ( !String(PROD) ) ? drURL += "17c": drURL += "16" );
				if( arguments.length > 0 && String(PROD) != '' )
					{
						drURL += "?XID=28102&SP=10024&PN=29&CUR=840&V1="+ proID[PROD] +"&V2="+ proID[PROD] +"&V3=1&V4=10&V5=&S1=&S2=&S3=&S4=&S5=";
						if( CID ) { ( ( String(CID).length > 1 ) ? drURL += "&CID="+ CID : drURL += "&CID="+ lstCID[CID] ); }
					}
				else
					{ drURL += "?SID=28102&SP=1&PN=1&CID=0&PID=0&CUR=840"; }
			}
		else if( xyz == "co.uk") /* 'pacific' */
			{
				var proID = new Array("549600","549500","549400","549200","549100","549300"); // PRE.STA.PER.OFF.PDF.WEB
				var drURL = "http://store.systransoft.com/servlet/ControllerServlet?Action=";
				var drCOM = "&SiteID=systran&Env=BASE";
				( ( !String(PROD) ) ? drURL += "DisplayHomePage" + drCOM : drURL += "DisplayCategoryProductListPage" + drCOM );
				( ( xyz == "fr" ) ? drURL += "&Locale=fr_FR" : drURL += "&Locale=en_GB" );
				if( arguments.length > 0 )
					{
						drURL += "&categoryID="+ proID[PROD];
						if( CID ) { ( ( String(CID).length > 1 ) ? drURL += "&pgm="+ CID : drURL += "&pgm="+ lstCID[CID] ); }
					}
			}
		else if( xyz == "fr" ) /* no more DR for webFR-FR, it's 'telechargement.fr' */
			{
				var proID = new Array("PROFESSIONAL+PREMIUM","PROFESSIONAL+STANDARD","PERSONAL","OFFICE+TRANSLATOR","PDF+TRANSLATOR","WEBTRANSLATOR","MOBILE"); // PRE.STA.PER.OFF.PDF.WEB.MOB
				var drURL = "http://www.systranstore.fr/";
				( ( !String(PROD) ) ? drURL += "store.html" : drURL += "produits.html?N=SYSTRAN+" );
				if( arguments.length > 0 && String(PROD) != '' )
					{
						drURL += proID[PROD];
					}
			}
		if( nWIN && String(nWIN) && nWIN == 'newW' )
			{ window.open(drURL); }
		else
			{ location = drURL; }
	}

