var NS4				= (document.layers) ? true:falsevar IE4				= (document.all) ? true:falsevar VER4			= (IE4 || NS4) ? 1 : 0;var glob_AbsoluteX	= 0;var glob_AbsoluteY	= 0;var glob_OffsetX	= 10;var glob_OffsetY	= 10;// -------------------------------------------------------------------------------------------function Navigator(theLocation){		var aDestFrame	= top.document;		aDestFrame.location.href = theLocation;}// -------------------------------------------------------------------------------------------function CheckDate(theDate){		var toCheckDay;		var toCheckMonth;		var toCheckYear;		var systemDay;		var systemMonth;		var systemYear;		var aDate;		if (theDate.length > 0)	{		toCheckDay = (theDate.substring(0, 2));		toCheckMonth = (theDate.substring(3, 5));		toCheckYear = (theDate.substring(6, 10));		aDate = new Date(toCheckYear, toCheckMonth - 1, toCheckDay);		systemDay = aDate.getDate();		systemMonth = aDate.getMonth() + 1;		systemYear = aDate.getFullYear();				if ((toCheckDay == systemDay) && (toCheckMonth == systemMonth) && (toCheckYear == systemYear))		{			if ((theDate.charAt(2) == "/") && (theDate.charAt(5) == "/"))				return(true);		}		else			return(false);	}	else		return(true);}// -------------------------------------------------------------------------------------------function CheckForm1(theForm){		var formValid		= 1;		var haveDate		= 0;		var haveValidDate	= 0;		var i;		var nbrItemsChecked	= 0;		var nbrOfObjects;	nbrOfObjects = theForm.elements.length;	for(i = 0; i < nbrOfObjects; i ++)	{		if (theForm.elements[i].type == "date")		{			haveDate = 1;			if (CheckDate(theForm.datestart.value) == 0)			{				alert("La date de dŽbut de recherche n'est pas valide , le format est jj/mm/aaaa.");				theForm.datestart.focus();				formValid = 0;			}			if (CheckDate(theForm.dateend.value) == 0)			{				alert("La date de fin de recherche pas valide , le format est jj/mm/aaaa.");				theForm.dateend.focus();				formValid = 0;			}		}		else			if (theForm.elements[i].type == "checkbox")				if ((theForm.elements[i].checked) && (theForm.elements[i].name != 'explain') && (theForm.elements[i].name != 'synonyms'))					nbrItemsChecked ++;	}	if (formValid == 1)	{		if (haveDate == 1) 			if ((theForm.datestart.value == "") && (theForm.dateend.value == ""))				haveValidDate = 0;			else				haveValidDate = 1;		if ((theForm.ValueWord.value == "") && (nbrItemsChecked == 0) && (haveValidDate == 0))		{			alert("Vous devez renseigner au moins une valeur pour effectuer une recherche.");			theForm.ValueWord.focus();			formValid = 0;		}		else			formValid = 1;	}	if (formValid == 1)		return(true);	else		return(false);}// -------------------------------------------------------------------------------------------function CheckForm2(theForm){		var formValid			= 1;		var haveDate			= 0;		var haveValidDate		= 0;		var i;		var nbrItemsChecked		= 0;		var nbrItemsSelected	= 0;		var nbrOfObjects;		var itemValue;	nbrOfObjects = theForm.elements.length;	for (i = 0; i < nbrOfObjects; i ++)	{		if (theForm.elements[i].type == "date")		{			haveDate = 1;			if (CheckDate(theForm.datestart.value) == 0)			{				alert("La date de dŽbut de recherche n'est pas valide , le format est jj/mm/aaaa.");				theForm.datestart.focus();				formValid = 0;			}			if (CheckDate(theForm.dateend.value) == 0)			{				alert("La date de fin de recherche pas valide , le format est jj/mm/aaaa.");				theForm.dateend.focus();				formValid = 0;			}			}		else			if (theForm.elements[i].type == "checkbox")			{				if (theForm.elements[i].checked)					nbrItemsChecked ++;			}			else				if ((theForm.elements[i].type == "select-one") && (theForm.elements[i].name.substr(0, 7) == 'KeyWord'))				{					itemValue = theForm.elements[i + 1].options[theForm.elements[i + 1].selectedIndex].value;					if ((theForm.elements[i].selectedIndex > 0) && (itemValue >= 0) && (theForm.elements[i + 2].value.length > 1))						nbrItemsSelected ++;				}				}	if (formValid == 1)	{		if (haveDate == 1) 			if ((theForm.datestart.value == "") && (theForm.dateend.value == ""))				haveValidDate = 0;			else				haveValidDate = 1;		if ((nbrItemsChecked == 0) && (nbrItemsSelected == 0) && (haveValidDate == 0))		{				alert("Vous devez renseigner au moins une valeur pour effectuer une recherche.");			theForm.ValueWord1.focus();			formValid = 0;		}		else			formValid = 1;	}	if (formValid == 1)		return(true);	else		return(false);}// -------------------------------------------------------------------------------------------function CheckForm3(theForm, theLanguage){	var formValid			= 1;	var haveDate			= 0;	var haveValidDate		= 0;	var i;	var j;	var nbrItemsChecked		= 0;	var nbrOfObjects		= 0;	var nbrItemsSelected	= 0;	var selectedItems		= "";		nbrOfObjects = theForm.elements.length;	for (i = 0; i < nbrOfObjects; i ++)	{		if (theForm.elements[i].type == "date")		{			haveDate = 1;			if (CheckDate(theForm.datestart.value) == 0)			{				if (theLanguage == 1)					alert("La date de dŽbut de recherche n'est pas valide, le format est jj/mm/aaaa.");				else					alert("Start date for search is not valid, format is dd/mm/yyyy.");				theForm.datestart.focus();				formValid = 0;			}			if (CheckDate(theForm.dateend.value) == 0)			{				if (theLanguage == 1)					alert("La date de fin de recherche pas valide, le format est jj/mm/aaaa.");				else					alert("End date for search is not valid, format is dd/mm/yyyy.");				theForm.dateend.focus();				formValid = 0;			}			}		else			if (theForm.elements[i].type == "checkbox")				if ((theForm.elements[i].checked) && (theForm.elements[i].name != 'explain') && (theForm.elements[i].name != 'synonyms'))					nbrItemsChecked ++;		if (theForm.elements[i].type == "select-multiple")		{					nbrItemsSelected = theForm.elements[i].length;			for (j = 0; j < nbrItemsSelected; j ++)			{					if (theForm.elements[i].options[j].selected && theForm.elements[i].options[j].value != 0)					if (selectedItems.length > 0)						selectedItems = selectedItems + ',' + theForm.elements[i].options[j].value;					else						selectedItems = theForm.elements[i].options[j].value;			}		}	}		if (formValid == 1)	{		if (haveDate == 1) 			if ((theForm.datestart.value == "") && (theForm.dateend.value == ""))				haveValidDate = 0;			else				haveValidDate = 1;		if ((selectedItems == "") && (haveValidDate == 0) && (nbrItemsChecked == 0))		{			if (theLanguage == 1)				alert("Vous devez renseigner au moins une valeur pour effectuer une recherche.");			else				alert("You must enter at least one option to perform a search");			formValid = 0;		}		else			formValid = 1;	}		theForm.ivSelection.value = selectedItems;	if (formValid == 1)		return(true);	else		return(false);}// -------------------------------------------------------------------------------------------function GetForm3(theForm, theLanguage){	if (theForm.ValueWord.value == "")	{			if (theLanguage == 1)			alert("Vous devez renseigner une valeur pour effectuer un filtre sur les mots-clŽs.");		else			alert("You must enter a value in order to obtain a keywords list.");		theForm.ValueWord.focus();				return(false);	}	return(true);}// -------------------------------------------------------------------------------------------function CheckStdForm(theForm){	if (theForm.userrequest.value == "")	{			alert("Vous devez renseigner une valeur pour effectuer une recherche.");		theForm.userrequest.focus();		return(false);	}	return(true);}// -------------------------------------------------------------------------------------------function CheckOrder(theForm, theLanguage){	if (theForm.agree.checked == false)	{			if (theLanguage == 1)			alert("Pour poursuivre, vous devez accepter nos conditions gŽnŽrales de cession et de vente.");		else			alert("To continue, you must accept our licensing and purchasing agreement.");		return(false);	}	return(true);}// -------------------------------------------------------------------------------------------function fPlayVideo(pName){		var lvPosition	= 0;		document.RPlayer.DoStop();	document.RPlayer.SetSource(pName);	document.RPlayer.DoPlayPause();	document.RPlayer.SetSource(pName);	document.RPlayer.DoPlayPause();}// -------------------------------------------------------------------------------------------function popupWindow(theFile, theWidth, theHeight) {	window.open(theFile, "popup", "titlebar=no,menubar=no,toolbar=no,location=no,scrollbars=0,resizable=1,status=no,directories=no,copyhistory=no,hotkeys=no,width=" + theWidth + ",height=" + theHeight);}// -------------------------------------------------------------------------------------------function fOpenVideo(theLocation, theSessionID){		var whichNavigator	= navigator.userAgent.toLowerCase();		var isMac			= (whichNavigator.indexOf("mac") != -1);	if (isMac)		hasMenuBar = 1;	else		hasMenuBar = 0;	window.open('video.pgi?UNID=' + theSessionID + '&OBJET=' + theLocation, "popup","top=10,left=10,width=300,height=300,menubar=" + hasMenuBar + ",resizable=1,status=0,scrollbars=1");}// -------------------------------------------------------------------------------------------function fOpenWindow(theLocation){		var whichNavigator	= navigator.userAgent.toLowerCase();		var isMac			= (whichNavigator.indexOf("mac") != -1);	if (isMac)		hasMenuBar = 1;	else		hasMenuBar = 0;	window.open(theLocation, "popup", "top=10,left=10,width=400,height=400,menubar=" + hasMenuBar + ",resizable=1,status=0,scrollbars=1");}// -------------------------------------------------------------------------------------------function fConfirm(){	var name = confirm("Confirmation ?");		return name;	}// -------------------------------------------------------------------------------------------function fShowTips(theTitle, theText, theWidth, theSrcPath, theBorderColor1, theBorderColor2) {		var thumbNail		= '';		var thumbNailText	= '';		var thumbNailPopup	= '';		var windowWidth		= 0;		var destPosX		= glob_AbsoluteX - glob_OffsetX;	if (fShowTips.arguments.length >= 4)		if (theSrcPath.length > 0)		{			thumbNail = '      <td class="tipsbody">\n' +							'<img class=viewbody3 src="' + theSrcPath + '" border="0" align="middle">\n' +							'      </td>\n';		}	//	if (theText.length > 0)//		thumbNailText = '      <td CLASS="tipsbody" valign="top" width="100%">\n' + theText + '\n' +	' </td>\n';//	else//		thumbNailText = '      <td CLASS="tipsbody" valign="top" width="100%">\n&nbsp;\n' +	' </td>\n';		if (theBorderColor1 == null)		theBorderColor1 = "#CCC";	if (theBorderColor2 == null)		theBorderColor2 = "#CCC";			thumbNailPopup = '  <table border="1" bordercolor="' + theBorderColor1 + '" bordercolorlight="' + theBorderColor1 +						'" bordercolordark="' + theBorderColor1 + '" cellpadding="4" cellspacing="0" width="' + theWidth + '">' +						'    <tr>\n' +						'      <td class="tipsheader" colspan="1">\n' +						theTitle + '\n' +						'      </td>\n' +						'    </tr>\n' +						'    <tr>\n' +						thumbNail +						thumbNailText +						'    </tr>\n' +						'  </table>\n';	thumbNailPopup = '  <table border="0" bgcolor="#CCC" bordercolorlight="#CCC"' +						' bordercolordark="#CCC" cellpadding="4" cellspacing="0" width="' + theWidth + '">' +						'    <tr>\n' +						thumbNail +						thumbNailText +						'    </tr>\n' +						'    <tr>\n' +						'      <td colspan="1" class="tipsheader">\n' +						theTitle + '\n' +						'      </td>\n' +						'    </tr>\n' +						'  </table>\n';	if (destPosX < 0)		destPosX = 0;	if (document.layers) 	{		windowWidth = window.innerWidth;		if (windowWidth < destPosX + theWidth)			destPosX = windowWidth - theWidth - 20;		document.layers["lyPhoto"].document.write(thumbNailPopup);		document.layers["lyPhoto"].document.close();		document.layers["lyPhoto"].top = glob_AbsoluteY + glob_OffsetY;		document.layers["lyPhoto"].left = destPosX;		document.layers["lyPhoto"].visibility = "show";	}	if (document.all) 	{		windowWidth = document.body.offsetWidth;		if (windowWidth < destPosX + theWidth)			destPosX = windowWidth - theWidth - 20;		lyPhoto.innerHTML = thumbNailPopup;		document.all["lyPhoto"].style.top = glob_AbsoluteY + glob_OffsetY;		document.all["lyPhoto"].style.left = destPosX;		document.all["lyPhoto"].style.visibility = "visible";	}	else		if (document.getElementById) 		{			windowWidth = window.innerWidth;						if (windowWidth < destPosX + theWidth)				destPosX = windowWidth - theWidth - 20;									document.getElementById("lyPhoto").innerHTML = thumbNailPopup;			document.getElementById("lyPhoto").style.top = glob_AbsoluteY + glob_OffsetY;			document.getElementById("lyPhoto").style.left = destPosX;			document.getElementById("lyPhoto").style.visibility = "visible";		}}// -------------------------------------------------------------------------------------------function ShowStoreTips(theTitle, theText, theWidth, theSrcPath1, theSrcPath2, theBorderColor1, theBorderColor2) {		var thumbNail		= '';		var thumbNailText	= '';		var thumbNailPopup	= '';		var windowWidth		= 0;		var destPosX		= glob_AbsoluteX - glob_OffsetX;	if (ShowStoreTips.arguments.length >= 5)		if (theSrcPath1.length > 0)		{			thumbNail = '      <td class="tipsbody">\n' +							'<a href="javascript:onmouseout=fHideTips();"><img class=viewbody3 src="' + theSrcPath1 + '" border="0" align="middle"></a>\n' +							'<a href="javascript:onmouseout=fHideTips();"><img class=viewbody3 src="' + theSrcPath2 + '" border="0" align="middle"></a>\n' +							'      </td>\n';		}	//	if (theText.length > 0)//		thumbNailText = '      <td CLASS="tipsbody" valign="top" width="100%">\n' + theText + '\n' +	' </td>\n';//	else//		thumbNailText = '      <td CLASS="tipsbody" valign="top" width="100%">\n&nbsp;\n' +	' </td>\n';		if (theBorderColor1 == null)		theBorderColor1 = "#CCC";	if (theBorderColor2 == null)		theBorderColor2 = "#CCC";			thumbNailPopup = '  <table border="1" bordercolor="' + theBorderColor1 + '" bordercolorlight="' + theBorderColor1 +						'" bordercolordark="' + theBorderColor1 + '" cellpadding="4" cellspacing="0" width="' + theWidth + '">' +						'    <tr>\n' +						'      <td class="tipsheader" colspan="1">\n' +						theTitle + '\n' +						'      </td>\n' +						'    </tr>\n' +						'    <tr>\n' +						thumbNail +						thumbNailText +						'    </tr>\n' +						'  </table>\n';	thumbNailPopup = '  <table border="0" bgcolor="#CCC" bordercolorlight="#CCC"' +						' bordercolordark="#CCC" cellpadding="4" cellspacing="0" width="' + theWidth + '">' +						'    <tr>\n' +						thumbNail +						thumbNailText +						'    </tr>\n' +						'    <tr>\n' +						'      <td colspan="1" class="tipsheader">\n' +						theTitle + '\n' +						'      </td>\n' +						'    </tr>\n' +						'  </table>\n';	if (destPosX < 0)		destPosX = 0;	if (document.layers) 	{		windowWidth = window.innerWidth;		if (windowWidth < destPosX + theWidth)			destPosX = windowWidth - theWidth - 20;		document.layers["lyPhoto"].document.write(thumbNailPopup);		document.layers["lyPhoto"].document.close();		document.layers["lyPhoto"].top = glob_AbsoluteY + glob_OffsetY;		document.layers["lyPhoto"].left = destPosX;		document.layers["lyPhoto"].visibility = "show";	}	if (document.all) 	{		windowWidth = document.body.offsetWidth;		if (windowWidth < destPosX + theWidth)			destPosX = windowWidth - theWidth - 20;		lyPhoto.innerHTML = thumbNailPopup;		document.all["lyPhoto"].style.top = glob_AbsoluteY + glob_OffsetY;		document.all["lyPhoto"].style.left = destPosX;		document.all["lyPhoto"].style.visibility = "visible";	}	else		if (document.getElementById) 		{			windowWidth = window.innerWidth;						if (windowWidth < destPosX + theWidth)				destPosX = windowWidth - theWidth - 20;			document.getElementById("lyPhoto").innerHTML = thumbNailPopup;			document.getElementById("lyPhoto").style.top = glob_AbsoluteY + glob_OffsetY - 20;			document.getElementById("lyPhoto").style.left = destPosX + 60;			document.getElementById("lyPhoto").style.visibility = "visible";		}}// -------------------------------------------------------------------------------------------function GetMousePos(e) {	if (document.all) 	{		glob_AbsoluteX = event.x + document.body.scrollLeft; 		glob_AbsoluteY = event.y + document.body.scrollTop;	}	else 	{		glob_AbsoluteX = e.pageX; 		glob_AbsoluteY = e.pageY; 	}}// -------------------------------------------------------------------------------------------function fHideTips() {	if (document.layers) 		document.layers["lyPhoto"].visibility = "hide";	if (document.all) 		document.all["lyPhoto"].style.visibility = "hidden";	else		if (document.getElementById)			document.getElementById("lyPhoto").style.visibility = "hidden";}// -------------------------------------------------------------------------------------------function InitShowTips() {	if (document.layers) 	{		window.captureEvents(Event.MOUSEMOVE);		window.onMouseMove = GetMousePos;		document.write("<layer name='lyPhoto' top=0 left=0 visibility='hide'></layer>");	}		if (document.all) 	{		document.onmousemove = GetMousePos;		document.write("<div id='lyPhoto' style='position:absolute;top:0;left:0;visibility:hidden;z-index:10'></div>");	}	else		if (document.getElementById)		{			document.onmousemove = GetMousePos;			document.write("<div id='lyPhoto' style='position:absolute;top:0;left:0;visibility:hidden'></div>");		}}