<!--
var online=0;
Image1Off= new Image; Image2Off = new Image;
Image1Off.src = "images/prev2.jpg"; 
Image2Off.src = "images/next2.jpg";

Image1On = new Image; Image2On = new Image;
Image1On.src = "images/prev2_on.jpg"; 
Image2On.src = "images/next2_on.jpg";

function ImgUp(key) {
current_img = "img" + key;
new_img = eval("Image" + key + "On.src");
document[current_img].src = new_img;
new_img=null;
current_img="";
}

function ImgDown(key) {
current_img = "img" + key;
new_img = eval("Image" + key + "Off.src");
document[current_img].src = new_img;
new_img=null;
current_img="";
}


var url = 'https://secure.francebill.net/form.cgi?id=s2061&prod=p20610001&lang=esp';

/* ----------------- Here's all the code involving the tracking ------------- */
	var gen = window.location.search.substring(1);

	if (document.cookie.length > 0) // the cookie exist
	{
		// The cookie will be get
		//	alert("the cookie will be get");
			gen = GetCookie();
		//	alert(gen);
			url += '&' + gen;
	}
	else if (gen != '') 
	{//the cookie does not exist but there is a gen				
//			alert("the cookie will be set");	
			var arrgen = gen.split('=');
			var expdate = new Date ();
			expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); 
			SetCookie(arrgen[0], arrgen[1], expdate); 
			url += '&' + gen;

	}

/* The SetCookie function is valid also for the path, the domain and the secure arguments. It accept a variable number of arguments. This is why we use a function to set the cookie*/

function SetCookie(name, value)
{
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
        ((path == null) ? "" : ("; path=" + path)) +
        ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
 }

  function GetCookie()
 {
	 var gn = unescape(document.cookie);
	 gn = gn.split(";");
	 gn = gn[0].split("=");
	 gen = gn[0]+"="+gn[1];	
	 return gen;
 }

/* ----- End of the tracking code ----- */

function OpenWnd(source) //never use var here
{
		var width=window.screen.width, height=window.screen.height,
		resized_width  = Math.floor(width * 80 / 100), //rounded down to int
		resized_height = Math.floor(height * 80 / 100);
		var centerLeft = (width - resized_width) / 2;	//left position to center the popup
		var centerTop  = (height - resized_height) / 4;
		
		OpenNewWindow = window.open(source,"","WIDTH="+resized_width+",HEIGHT=" + 
			resized_height+",left="+centerLeft+",top=0,titlebar=0,menubar=0,resizable=1,scrollbars=1," +
			"location=0,hotkeys=1,status=1,toolbar=0," +
				"dependent=1");
		OpenNewWindow.focus();	
}

function OpenWnd2(source) //never use var here
{
		OpenNewWindow = window.open(source, "title", "WIDTH=640,HEIGHT=500,left=0,titlebar=no,status=yes,location=no,menubar=no,resizable=yes,scrollbars=yes", true);	
		OpenNewWindow.focus();		
}

function OpenWndSized(source, width, height)
{
	width += 10;
	height += 15;
	var screenWidth = window.screen.width;
	var centerLeft = (screenWidth - width) / 2;
	OpenNewWindow = window.open(source,"","WIDTH="+width+",HEIGHT=" + height+",left="+centerLeft+",top=0,titlebar=0,menubar=0,resizable=1,scrollbars=0," + "location=0,hotkeys=0,status=0,toolbar=0,dependent=1");
		OpenNewWindow.focus();	
}

function OpenCrdWnd(source) //never use var here
{
	var width=window.screen.width, height=window.screen.height,
	resized_width  = Math.floor(width * 80 / 100), //rounded down to int
	resized_height = Math.floor(height * 70 / 100);
	var centerLeft = (width - resized_width) / 2;	//left position to center the popup
	OpenNewWindow = window.open(source, "title", "WIDTH="+resized_width+",HEIGHT="+resized_height+",top=0,left="+centerLeft+",location=yes,toolbar=yes,titlebar=yes,menubar=yes,status=yes,resizable=yes,scrollbars=yes", true);	
	OpenNewWindow.focus();		
}

function OpenFixed(source, width, height) {
	origX = Math.floor(window.screen.width * 50 / 100) - width/2;
	origY = Math.floor(window.screen.height * 50 / 100) - height/2;
	var OpenNewWindow = window.open(source, "title", "WIDTH="+width+",HEIGHT="+height+",top="+origY+",left="+origX+",menubar=no,resizable=no,scrollbars=yes",true);
	OpenNewWindow.focus();
}

function Go(page)
{
	window.location.href = hrefs[page];
}
