

//*********************************************
// Inventory Page - Navigation Form
//*********************************************
function SubmitfrmNavigation(intPageNav) 
{
	document.frmNav.intPage.value = intPageNav;
	document.frmNav.submit();
}


//*********************************************
// Multi-image 
//*********************************************
function displayNextPicture(iDir)
{
	iActivePicture += iDir;
	if ( iActivePicture >= aImageSeqList.length )
		iActivePicture = 0;
	if ( iActivePicture < 0 )
		iActivePicture = aImageSeqList.length-1;
	document.all("imgActivePicture").src = "/Site/images/fr/Loading_fr.gif";
	document.all("imgActivePicture").alt = "Chargement";		
	document.all("imgActivePicture").src = aImageList[aImageSeqList[iActivePicture]];
	document.all("imgActivePicture").alt = aImageTypeList[aImageSeqList[iActivePicture]];		
	document.all("spanPictIdOf").innerText = iActivePicture+1;
}


//*********************************************
// Multi-image 
//*********************************************
function selectNewImage()
{
	var sNewImgSrc = (new String(event.srcElement.src)).replace("/Icon/","/Standard/");
	var sObjectID = event.srcElement.parentElement.id;

	document.all("imgActivePicture").src = sNewImgSrc;
	document.all("imgActivePicture").alt = event.srcElement.alt;
	document.all("spanPictIdOf").innerText =sObjectID.substring((sObjectID.indexOf("_")+1),999);
}


//*********************************************
//Open New Window - Popup
//*********************************************
var pPictures = "";
function popupWindow( height, width, OpenPage, title, resize, scrollbar) 
{ 
	winl            = ( screen.width  - width  ) / 2;
	wint            = ( screen.height - height ) / 2;
	    
	if ( pPictures.focus)
	{
		pPictures.close();
	}
	    
	pPictures = window.open(OpenPage,title,'toolbar=0,location=0,directories=0,resizable=' + resize + ',menubar=0,status=0,scrollbars=' + scrollbar + ',width='+ width +',height='+ height +',top='+ wint +',left=' + winl);
	    
	if ( self.focus ) pPictures.focus();    
}



//*********************************************
// Form Submit - Validation
//*********************************************
// Chech Form Contact Us
/*
function checkForm()
{	
alert("test");
	var buff = "";
	var errMsgOne = "<%=DicTextShowroom.Item("FormErrorMessage_" & UCase(vszLanguage))%>";	
		
	if (document.frmContactUs.UserComment.value == '' { buff += '\n- <%=DicTextShowroom.Item("COMMENT_" & UCase(vszLanguage))%>'; };	
	if (document.frmContactUs.UserEmail.value == '' { buff += '\n- <%=DicTextShowroom.Item("EMAIL_" & UCase(vszLanguage))%>'; };	
	
	email = document.frmContactUs.UserEmail.value;		
	if (email.length > 0) 
	{
		//CheckMail(email)
		
		acommerciale = false;
		point = false;   
		nbcarac = 0;
			
		for (i=0;i<email.length;++i)
		{
			caractere =  email.slice(i,i+1)
			if (caractere=='@') {acommerciale=true};
			if (caractere=='.' && acommerciale==true) {point=true};
			if (point==true) {nbcarac++};
		} 
			
		nbcarac--;  //enleve le . du compte
			
		if( acommerciale==false || nbcarac < 2 || nbcarac > 3) 
		{
			alert("<%=DicTextShowroom.Item("CONTACTUSINVALIDEMAIL_" & UCase(vszLanguage))%>");
			return (false);
		}
	}			
	
	if (buff.length > 0) 
	{
		alert(errMsgOne + buff);
		return (false);
	}		
}
*/


/*
var oNewPicWindow = ""
function showPic(VehicleID, sNoPicManager, vszLanguage) 
{
	var iWidth = 303;
	var iHeight = 330;

	winl = ( screen.width  - iWidth  ) / 2;
	wint = ( screen.height - iHeight ) / 2;

	if ( oNewPicWindow.focus)
		oNewPicWindow.close();

	oNewPicWindow = window.open('/Site/Include/VehicleMedias/PopUp.asp?PopUp=1&vszLanguage='+vszLanguage+'&NoPictManager='+sNoPicManager+'&ID='+VehicleID,'','toolbar=0,location=0,directories=0,resizable=false,menubar=0,status=0,scrollbars=false,width='+iWidth+',height='+iHeight+',top='+ wint +',left=' + winl);

	if ( self.focus ) oNewPicWindow.focus();    
}
*/

