
<!--  JSP static include  /js/ipscripts_data.jsp  -->





var JS_STATIC_IMAGE_PATH = "fr";
var JS_auctiondat_Clickim_8649 = "Cliquez sur l'image pour obtenir des détails sur cet article";
var JS_auctiondat_Enteryo_8660 = "Entrez votre mot de passe et cliquez sur Connexion";
var JS_auctiondat_Highest_8610 = "Enchère la plus élevée";
var JS_auctiondat_Highest_8616 = "La meilleure enchère est la vôtre";
var JS_auctiondat_Lastrev_6284 = "(Dernière <a href=\"javascript:popUp('/help/tc_popup.jsp','popup','width=620,height=480,resizable,status,scrollbars');\">révision</a> 5 jan 2009)";
var JS_auctiondat_aus_Lastrev_6284 = "(Last <a href=\"javascript:popUp('/help/tc_popup.jsp','popup','width=620,height=480,resizable,status,scrollbars');\">revised</a> 5-Jan-09)";
var JS_auctiondat_Lesstha_8654 = "Moins de 60 secondes";
var JS_auctiondat_LoginHe_6281 = "Aide pour la connexion";
var JS_auctiondat_Loginbe_6285 = "Connectez-vous ci-dessous pour enchérir";
var JS_auctiondat_Loginto_6280 = "Connectez-vous pour enchérir ou vérifier l'état de vos enchères PriorityBid";
var JS_auctiondat_NewUser_8754 = "<b>Nouveaux utilisateurs</b>&nbsp;:&nbsp;<A HREF=/jsp/acct/register.jsp>Inscrivez-vous maintenant pour des mises à jour d'enchères GRATUITES";
var JS_auctiondat_Nextbid_8620 = "L'enchère suivante atteint la réserve";
var JS_auctiondat_Nobidsy_8615 = "Aucune enchère pour l'instant";
var JS_auctiondat_Opensat_8611 = "Mise à prix";
var JS_auctiondat_Reserve_8619 = "Réserve non atteinte";
var JS_auctiondat_Reserve_8621 = "Réserve atteinte";
var JS_auctiondat_ofbids_8614 = "Nb d'enchères&nbsp;:  ";
var JS_bidConfirm_Passwor_9042 = "Mot de passe";
var JS_confirm_sh_LoginID_9913 = "ID de connexion&nbsp;: ";
var JS_cube_NoImage_1940 = "Aucune image disponible";
var JS_ipBidDiscl_Registe_2415 = "S'inscrire maintenant";
var JS_ipscripts_Answer_6690 = "Réponse...";
var JS_ipscripts_Doyouwi_8666 = "Souhaitez-vous supprimer votre cookie de connexion à des fins de test&nbsp;?";
var JS_ipscripts_Error_8669 = "Erreur";
var JS_ipscripts_Loading_8741 = "Chargement";
var JS_ipscripts_Loginto_6288 = "Connectez-vous pour enchérir ou vérifier l'état de vos enchères";
var JS_ipscripts_NR_8675 = "NR";
var JS_ipscripts_NewUser_6289 = "Nouveaux utilisateurs";
var JS_ipscripts_PlaceBi_8670 = "Enchérir";
var JS_ipscripts_Pleasee_8667 = "Veuillez entrer un code postal suivi de 4 chiffres corrects (total de neuf chiffres)";
var JS_ipscripts_Pleasee_8668 = "Veuillez entrer un code postal correct (total de cinq ou neuf chiffres)";
var JS_ipscripts_Pleasee_8671 = "Veuillez entrer une adresse email correcte";
var JS_ipscripts_Registe_8740 = "<a href=/jsp/acct/register.jsp>Inscrivez-vous maintenant</a> ou <a HREF=/jsp/acct/login.jsp>connectez-vous ici</a> pour afficher tous les articles mis en vente et leurs rapports d'inspection";
var JS_ipscripts_Reminde_8665 = "<B>Rappel&nbsp;: </B> Contactez l'administrateur du portail Gehl Dealer de votre société pour que votre compte reçoive l'autorisation d'enchérir";
var JS_ipscripts_Reminde_8732 = "Rappel&nbsp;: ";
var JS_ipscripts_Reserve_8725 = "Code de réserve ";
var JS_ipscripts_TheVINo_8672 = "Le numéro d'identification du véhicule automobile (ou numéro de série) devrait compter 17 caractères. ";
var JS_ipscripts_TheVINo_8673 = "Le numéro d'identification du véhicule automobile (ou numéro de série) n'a pas d'information correcte sur l'année. ";
var JS_ipscripts_TheVINo_8674 = "Le numéro d'identification du véhicule automobile (ou numéro de série) n'a pas réussi le test de validité. Veuillez vérifier que chaque caractère du numéro d'identification du véhicule automobile a été saisi correctement. ";
var JS_ipscripts_Tobidon_8736 = "Pour enchérir sur cet article, vous devez d'abord être approuvé pour effectuer des achats par le biais d'IronPlanet. <a href=/jsp/acct/buyer_qual_text.jsp target=_blank>Cliquez ici</a> pour plus d'informations.";
var JS_ipscripts_Topurch_8735 = "Pour acheter cet article, vous devez d'abord être approuvé pour effectuer des achats par le biais d'IronPlanet. <a href=/jsp/acct/buyer_qual_text.jsp target=_blank>Cliquez ici</a> pour plus d'informations.";
var JS_ipscripts_Topurch_8738 = "Pour acheter cet article, vous devez d'abord accepter les <A HREF=/jsp/acct/editProfile.jsp>Termes et conditions</A> puis remplissez le formulaire de qualification de l'acheteur.";
var JS_ipscripts_Toviewt_8733 = "Pour afficher la version administrative de cette page, <A HREF=\"javascript:reloadAdminView()\">cliquez ici</A>.";
var JS_ipscripts_Usagesu_6287 = "Utilisation sujette aux <a href=\"/pop/short_terms.jsp\" target=\"_blank\">Termes et conditions</a>";
var JS_ipscripts_aus_Usagesu_6287 = "Utilisation sujette aux <a href=\"/pop/short_terms_aus.jsp\" target=\"_blank\">Termes et conditions</a>";
var JS_ipscripts_Youarea_8739 = "Vous êtes approuvé pour effectuer des achats avec IronPlanet";
var JS_pricing_Bidding_8440 = "L'enchère se termine dans :  ";
var JS_register_w_Passwor_5210 = "Mot de passe";
var JS_searchuser_Registe_1094 = "Utilisateurs inscrits";
var JS_singlebids_LoginID_3659 = "ID de connexion&nbsp;: ";
var JS_winnerMess_Youvebe_8892 = "Vous n'êtes plus le meilleur enchérisseur";
var JS_ipscripts_Beforey_8735 = "Pour acheter cet article, vous devez d'abord être approuvé pour enchérir.  Veuillez envoyer une <a href=\"/jsp/qualify/index.jsp\" target=new>demande d'autorisation à enchérir</a>.";
var JS_ipscripts_Tobidyo_8742 = "Pour avoir le droit d'enchérir, vous devez compléter une <a href=\"/jsp/qualify/index.jsp\" target=_blank>Demande d'autorisation à enchérir</a>.";
var JS_ipscripts_Clickher_8767 = "<a href=/jsp/acct/editProfile.jsp target=_blank>Cliquez ici</a> pour plus d'informations.";

var JSe_ipscripts_TheVINo_8724 = 'var JS_ipscripts_TheVINo_8724 = "Le numéro d\'identification du véhicule automobile (ou numéro de série) ne correspond pas à l\'année du modèle saisie ("+ year +"). Suivant le numéro d\'identification du véhicule automobile, l\'année devrait être "+ vin_year_encoding[vin.toUpperCase().charAt(9)] +". ";';

var JSe_ipscripts_Welcome_8722 ='var JS_ipscripts_Welcome_8722 ="Bienvenue, "+ loginName +".";';

var JSe_ipscripts_Youarev_8734 = 'var JS_ipscripts_Youarev_8734 ="Vous consultez la version administrative de cette page. Utilisez <a href="+ noDoUrl +">ce lien</a> pour afficher la version non administrative.";';

var JSe_ipscripts_Congrat_8728 = 'var JS_ipscripts_Congrat_8728 = "Bravo&nbsp;!  Vous avez acheté <a href="+ urlAcctTrans +">"+ wins[loggedIn] +" article</a> aujourd\'hui.";';
var JSe_ipscripts_Congrat_8729 = 'var JS_ipscripts_Congrat_8729 = "Bravo&nbsp;!  Vous avez acheté <a href="+ urlAcctTrans +">"+ wins[loggedIn] +" articles</a> aujourd\'hui.";';

var JSe_ipscripts_Beforey_8736 = 'var JS_ipscripts_Beforey_8736 = "Avant d\'être approuvé pour enchérir sur cet article IronPlanet "+ realmDef +" ou d\'autres, vous devez d\'abord accepter les <A class=blue HREF=Javascript:tcLink("+ realmId +")>Termes et conditions "+ realmDef +" IronPlanet</A>.";';
var JSe_ipscripts_Beforey_8737 = 'var JS_ipscripts_Beforey_8737 = "Avant de pouvoir enchérir sur cet article IronPlanet "+ realmDef +" ou d\'autres, vous devez d\'abord accepter les Termes et conditions "+ realmDef +" IronPlanet.";';
var JSe_ipscripts_Beforey_8738 = 'var JS_ipscripts_Beforey_8738 = "Avant de pouvoir enchérir sur cette vente IronPlanet "+ realmDef +" ou d\'autres, vous devez d\'abord accepter les Termes et conditions "+ realmDef +" IronPlanet.";';


var JSe_iior_msg = 'var JS_iior_msg = "Mise en vente "+ realmDef +" IronPlanet";';
var JSe_iior_msg_auction = 'var JS_iior_msg_auction = "Enchères "+ realmDef +" IronPlanet";';
var JSe_ipscripts_Youhave_1567 = 'var JS_ipscripts_Youhave_1567 = "You have not been approved to bid in "+ realmDef +". ";';

<!--  variables for item page -->
var JS_bidHistory_extende_8883 = "(prolongée)";
var JS_item_Notimel_8718 = "Délai dépassé...";
var JS_photoGalle_PhotoEq_6850 = "Photos ";
var JS_photoGalle_PhotoEq_6851 = "Précédent";
var JS_photoGalle_PhotoEq_6852 = "Suivant";
var JS_photoGalle_PhotoEq_6853 = "Diaporama";
var JS_photoGalle_PhotoEq_6854 = "Pause";
var JS_photoGalle_PhotoEq_6855 = "sur";
var JS_photoGalle_PhotoEq_6856 = "<span style=\"color: #CC0000;\"><b>REMARQUE&nbsp;: </b></span> Les acheteurs sont responsables d'étudier tout le rapport d'inspection, y compris tous les commentaires des inspecteurs, lors de l'évaluation des conditions d'un article. <a href=\"javascript:self.close()\"><b>Retour à l'inspection</b></a>";


var JSe_item_Lesstha_6464 = 'var JS_item_Lesstha_6464="Moins de " + (Math.ceil(sec/10)*10) + " secondes&nbsp;!";';

<!--  JSP static include  /js/ipscripts_code.js  -->
var _ipscripts_js_loaded = 1;
var menu_select;

// BEGIN AUTODEMO FLASH CODE
// This is a copy of launcher.js 

var openedWin = null;
var wpercent = 100;

function launch(){
	var args = launch.arguments
	var url = args[0]
	var width = args[1]
	var height = args[2]
	
	if (!url || !width || !height) {
		alert(JS_ipscripts_Error_8669);
	} else {
		var scr_w = screen.availWidth
		var scr_h = screen.availHeight
		var target_w = 0
		var target_h = 0
		wpercent = 100

		if(width >= scr_w || height >= scr_h){
			if((width+8) >= (height+27)){
				target_w = scr_w - 8	//target width is screen width - 8
				wpercent = Math.floor((target_w * 100)/width) //get percentage scaled down
				target_h = Math.floor((height * wpercent)/100) - 27 //scale height to  percentage then subtract standard title bar height
				wpercent = Math.floor((target_h * 100)/height)	//re-adjust percentage
				target_w = Math.floor((width * wpercent)/100)	//scale width to new percentage
				width = target_w
				height = target_h
			}else if((height+27) > (width+8)){
				target_h = scr_h - 27
				wpercent = Math.floor((target_h * 100)/height)
				target_w = Math.floor((width * wpercent)/100) - 8
				wpercent = Math.floor((target_w * 100)/width)
				target_h = Math.floor((height * wpercent)/100)
				width = target_w
				height = target_h
			}
		}
		_launch(url, width, height, args[3], args[4], args[5], args[6], args[7], args[8], args[9]);
	}
}

function _launch(){
	closeChild()
	
	var args = _launch.arguments
	var url = args[0]
	var width = args[1]
	var height = args[2]
	var resizable = args[3] ? "yes" : "no"
	var scrollbars = args[4] ? "yes" : "no"
	var toolbar = args[5] ? "yes" : "no"
	var menubar = args[6] ? "yes" : "no"
	var status = args[7] ? "yes" : "no"
	var address = args[8] ? "yes" : "no"
	var directories = args[9] ? "yes" : "no"
	
	var NewX = Math.max(0, Math.floor((screen.availWidth-(width+8))/2));
	var NewY = Math.max(0, Math.floor((screen.availHeight-(height+27))/2));
	
	var params = ''
	
	params += "width="+width // 1
	params += ",height="+height // 2
	params += ",screenx="+NewX
	params += ",screeny="+NewY
	params += ",left="+NewX
	params += ",top="+NewY
	params += ",resizable="+resizable // 3
	params += ",scrollbars="+scrollbars // 4
	params += ",toolbar="+toolbar // 5
	params += ",menubar="+menubar // 6
	params += ",status="+status // 7
	params += ",location="+address // 8
	params += ",directories="+directories // 9
	
	openedWin = window.open(url, "demodashboard", params);
}

function closeChild () {
	if (openedWin != null) {
		if (!openedWin.closed) {
			openedWin.close();
		}
	}
}
onunload = closeChild;

// END AUTODEMO CODE

function popUp(theURL,winName,features) {
	
	features = features + ',left=30,top=20';
	// Launches a popup window with the url, name and size specified.
	newWindow=window.open(theURL,winName,features);
	if (newWindow) newWindow.focus();
    //return false;
}

function popUp1(theURL,winName,features) {
	
	features = features + ',left=30,top=20';
	// Launches a popup window with the url, name and size specified.
	newWindow=window.open(theURL,winName,features);
	if (newWindow) newWindow.focus();
}

function popup(url, wname, w, h, features) {
	if(features && features.length > 0)
		features = ","+features;	
		
	if (document.all)
	  var xMax = screen.width, yMax = screen.height;//properties of IE

	if (document.layers)
	  var xMax = window.outerWidth, yMax = window.outerHeight;
	  //properties of Netscape

	var xOffset = (xMax - w)/2, yOffset = (yMax - h)/2;
	// center co-ordinates

	//screenX and screenY are properties of Netscape for centering window,
	//InternetExplorer uses top and left properties.

	var browserName = navigator.userAgent.toLowerCase();
	if( browserName.indexOf ("aol") != -1 )
	{
		var properties = "height="+h+",width="+w+features;
	}
	else
	{
		if(navigator.appName.toLowerCase().indexOf("microsoft") != -1){
		    var properties="height="+h+",width="+w+",top="+yOffset+",left="+xOffset+features		    
		}
		if(navigator.appName.toLowerCase().indexOf("netscape") != -1){
		    var properties="height="+h+",width="+w+",screenX="+xOffset+",screenY="+yOffset+features
		}
        }                         
        var wind = window.open(url, wname, properties)
        
        if(wind != null) {
        	wind.focus();
        	return wind;
        }                       
}

function popup(url, wname, w, h, features, pos) {
	if(features && features.length > 0)
		features = ","+features;	
		
	if (document.all)
	  var xMax = screen.width, yMax = screen.height;//properties of IE

	if (document.layers)
	  var xMax = window.outerWidth, yMax = window.outerHeight;
	  //properties of Netscape
	  
	if(pos=="random") {
		var xOffset=Math.floor(Math.random()*(xMax-w));
		var yOffset=Math.floor(Math.random()*((yMax-h)-75));
	} else if(pos=="center"){
		var xOffset = (xMax - w)/2, yOffset = (yMax - h)/2;
	}
	else if((pos!="center" && pos!="random") || pos==null){
		var xOffset = 0, yOffset = 20;
	}	

	//screenX and screenY are properties of Netscape for centering window,
	//InternetExplorer uses top and left properties.

	var browserName = navigator.userAgent.toLowerCase();
	if( browserName.indexOf ("aol") != -1 )
	{
		var properties = "height="+h+",width="+w+features;
	}
	else
	{
		if(navigator.appName.toLowerCase().indexOf("microsoft") != -1){
		    var properties="height="+h+",width="+w+",top="+yOffset+",left="+xOffset+features		    
		}
		if(navigator.appName.toLowerCase().indexOf("netscape") != -1){
		    var properties="height="+h+",width="+w+",screenX="+xOffset+",screenY="+yOffset+features
		}
        }                         
        var wind = window.open(url, wname, properties)
        
        if(wind != null) {
        	wind.focus();
        	return wind;
        }                       
}

function URLwithAdminParm() {
   if (location.search.indexOf("do=1") == -1) {
       
       var strHref = location.href;
        
       // Is there a hash (link anchor) on this URL? Strip it off.
       var idxHash = strHref.lastIndexOf('#');
       if (idxHash != -1) {
           strHref = strHref.substring(0, idxHash);
           }

       return strHref + (location.search.length==0 ? "?" : "&") + "do=1";
       }
   else {
       return location.href;
       }
}


function reloadAdminView(){
   location.replace(URLwithAdminParm());
   }


function setIIORMsg(realmId, realmDef, tcLink) {
	var roles = getCookie("roles"+realmId);
	var p;
	
	var allRoles = getAllRoles();
	var isIPBuyer = allRoles.indexOf('b') != -1;
	
	if (roles == null)
		roles = "";
	
	if ((p=document.getElementById('iior$Msg')) != null) {
		document.getElementById('iior$Msg').style.display='inline';
		var iiorMsg = "";
		
		if (isIPBuyer && roles.indexOf('s') == -1) {
			eval(JSe_ipscripts_Beforey_8737);
			iiorMsg += "<img border=0 src=/images/notice.gif>&nbsp;&nbsp;" + JS_ipscripts_Beforey_8737+' '+JS_ipscripts_Clickher_8767;
		}
		else if (roles.indexOf('b') == -1) {
			eval(JSe_iior_msg);
			iiorMsg += JS_iior_msg;
		}
		else {
			eval(JSe_iior_msg);
			iiorMsg += JS_iior_msg;
		}
		
		iiorMsg = "<table class=iior align=center width=80% cellpadding=0 cellspacing=0><tr><td align=center><b>" + 
				  iiorMsg + "</b></td></tr></table>";
		
		if (iiorMsg && iiorMsg != "") p.innerHTML = iiorMsg;
	}
}

function setIIORMsg2(realmId, realmDef, tcLink) {
	var roles = getCookie("roles"+realmId);
	var p;
	
	var allRoles = getAllRoles();
	var isIPBuyer = allRoles.indexOf('b') != -1;
	
	if (roles == null)
		roles = "";
	
	if ((p=document.getElementById('iior$Msg')) != null) {
		document.getElementById('iior$Msg').style.display='inline';
		var iiorMsg = "";
		
		if (isIPBuyer && roles.indexOf('s') == -1) {
			eval(JSe_ipscripts_Beforey_8738);
			iiorMsg += "<img border=0 src=/images/notice.gif>&nbsp;&nbsp;" + JS_ipscripts_Beforey_8738+' '+JS_ipscripts_Clickher_8767;
		}
		else if (roles.indexOf('b') == -1) {
			eval(JSe_iior_msg_auction);
			iiorMsg += JS_iior_msg_auction;
		}
		else {
			eval(JSe_iior_msg_auction);
			iiorMsg += JS_iior_msg_auction;
		}
		
		iiorMsg = "<table class=iior align=center width=80% cellpadding=0 cellspacing=0><tr><td align=center><b>" + 
				  iiorMsg + "</b></td></tr></table>";
		
		if (iiorMsg && iiorMsg != "") p.innerHTML = iiorMsg;
	}
}

function tcLink(realmId) {
	fname = '/pop/short_terms.jsp?popup=yes';
	if (realmId == 2) {
		fname = '/pop/short_terms_aus.jsp?popup=yes';
	}
	else if (realmId == 3) {
		fname = '/pop/short_terms_eu.jsp?popup=yes';
	}
	var w=popup(fname, 'TC', 800, 600, 'resizable,scrollbars', 'center');
}

function getAllRoles() {
	var allRoles = "";
	for (var i = 1; i < 3; i++) {
		var role = getCookie("roles"+i);
		if (role == null) role = "";
		allRoles += role;
	}
	
	return allRoles;
}

function setMsg(eqStatus, realmId, suppressWelcome, isIPRealm, realmDef, tcLink) {
	var loggedIn = getCookie("loggedin");
	var roles = getCookie("roles"+realmId);
	var loginName = getCookie("login");
	var p;
	var br = "";
	
	if (roles == null)
		roles = "";
	
	var allRoles = getAllRoles();
	var isIPBuyer = allRoles.indexOf('b') != -1;
	
	if ((p=document.getElementById('IP$Msg')) != null) {
		var msgText = "";
		
		if (loggedIn) {
			if (suppressWelcome == '0') {
				eval(JSe_ipscripts_Welcome_8722);
				msgText = JS_ipscripts_Welcome_8722;
				br = "<br>";
			}
			if (isIPRealm == '1') {
				var rbpCookie = getCookie("RBP");
				var rbp = false;
				
				if ( rbpCookie != null && rbpCookie == 'Y' )
					rbp = true;
	
				if (roles.indexOf('s') == -1 && !rbp ) {
					if (saleType == 'Auction') {
						if (!isIPBuyer) {
							msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Beforey_8735;
						}
						else {
							eval(JSe_ipscripts_Beforey_8737);
							msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Beforey_8737+' '+JS_ipscripts_Clickher_8767;
						}
					}
					else if (eqStatus < 39) {
						msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Beforey_8735;
					}
				}
				else if (roles.indexOf('b') == -1 && !rbp ) {
					eval(JSe_ipscripts_Youhave_1567);
					if (saleType == 'Auction') {
						if (eqStatus < 39) {
							msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Youhave_1567+' '+JS_ipscripts_Clickher_8767;
						}
					}
					else {
						msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Youhave_1567+' '+JS_ipscripts_Clickher_8767;
					}
				}
				else if (roles.indexOf('a') > -1) {
					if (isAdminString) {
						var noDoUrl = location.href;
						var noDoPos = noDoUrl.indexOf("&do=1");
						if (noDoPos == -1)
							noDoPos = noDoUrl.indexOf("do=1&");
						if (noDoPos == -1)
							noDoPos = noDoUrl.indexOf("?do=1");
						if (noDoPos > -1)
							noDoUrl = noDoUrl.substring(0, noDoPos) + noDoUrl.substring(noDoPos + 5);
						eval(JSe_ipscripts_Youarev_8734);
						msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Youarev_8734;
					}
					else {
						msgText += br+'<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Toviewt_8733;
					}
				}
				else if (isIPBuyer) {
					if (location.href.toLowerCase().indexOf("ironplanet.com") > -1) {
						msgText += " "+JS_ipscripts_Youarea_8739;
					}
				}
			}
		}
		
		if(realmId == '1' && (eqStatus == 38 || eqStatus == 40 || eqStatus == 41)) {
			if (!loggedIn) {
				msgText = '<B>'+JS_ipscripts_Reminde_8732+'</B> '+JS_ipscripts_Registe_8740;
			}							
		}		
		
		if (msgText && msgText != "") p.innerHTML = msgText;
		
	}
	
	if ((b=document.getElementById('IP$BuyBlock')) != null) {
		if (!loggedIn || (roles.indexOf('b') == -1 && saleType == 'Fixed Price')) {
			b.innerHTML = "&nbsp";
			if(saleType == 'Fixed Price')
				p.innerHTML += "<DIV align=center><IMG SRC=/images/fixedPrice3.gif WIDTH=100 HEIGHT=88 BORDER=0 ALIGN=absmiddle></DIV>";         
		}
	}  
}

function showControlPanel(wname,fname, eqId) {
	var loadingMessage;
	var goTo;

	if (fname.indexOf('?') > -1)
		fname += '&equipId='+eqId;
	else
		fname += '?equipId='+eqId;
	loadingMessage = '<h2>'+wname+' for Item '+eqId+ '</h2>'+JS_ipscripts_Loading_8741+' <blink>...</blink><br>';

	wname = wname.replace(/ /g, '');
	ww = window.open('javascript:document.write("' + loadingMessage +
				'");location.href="' + fname + '";',
			wname, 'width=650,height=610,resizable,scrollbars,status');
	if (ww!=null) {
		ww.focus();
	}
}


function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}


function delCookie (name) {
    var expireNow = new Date();
    document.cookie = name + "=" +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}


function displayWarning(){
   if (confirm(JS_ipscripts_Doyouwi_8666)) {
      return true
   }
   else {
  	   return false;
   }
}


function containsEq(eq) {
   var eqsWithBid = getCookie("equipsWithBid");
   if (eqsWithBid != null) {
      var arrayOfEqs;
      if (eqsWithBid.indexOf(".") >= 0)
         arrayOfEqs = eqsWithBid.split(".");
      else
         arrayOfEqs = eqsWithBid.split(",");
      var val = false;
      for (var i=0; i<arrayOfEqs.length; i++) {
	 if(eq == arrayOfEqs[i])
	    val = true;
      }
      return val;
   }
}

var winBidHistory = null;

function showBidHistory(auc, eq) {
   winBidHistory=window.open('/jsp/equip/bidHistory.jsp?auctionId=' + auc + '&equipId=' + eq,
                'bh',
                'width=525,height=550,resizable,scrollbars,dependent');
   if (winBidHistory!=null) {
      winBidHistory.focus();
   }
}

function dispLoginControls(urlEditProfile, urlAcctTrans, urlLogin, realmId) {
   var loggedIn = getCookie("loggedin");
   var loginNm = getCookie("login");
   var bangEnabled = getCookie("irx");
   var roles = getCookie("roles");
   if(loginNm == null) loginNm="";
   if(roles == null) roles="";
   
   if (loggedIn && loginNm != "")  {
   
     if(roles != null && roles.length == 0) {
	 document.write("<tr><td><br></td></tr>");
     document.write('<tr bgcolor=#FFFFCC><td>'+JS_ipscripts_Tobidyo_8742+'&nbsp;</td></tr>');
     }
   
     if(roles.indexOf('b') > -1) {
     document.write("<tr><td>&nbsp;</td></tr>");
     document.write("<tr><td><br></td></tr>");
     if (self.wins && self.wins[loggedIn] > 0) {
		 eval(JSe_ipscripts_Congrat_8728);
		 eval(JSe_ipscripts_Congrat_8729);
         if (wins[loggedIn] == 1)
        	document.write("<tr bgcolor=\"#FFFFCC\"><td><b>"+JS_ipscripts_Congrat_8728+"</b></td></tr>");

         if (wins[loggedIn] > 1)
      		document.write("<tr bgcolor=\"#FFFFCC\"><td><b>"+JS_ipscripts_Congrat_8729+"</b></td></tr>");
     }
         }
     else if(roles.indexOf('s') > -1) {
         document.write("<tr><td><br></td></tr>");
     }
   
   } else {
     document.write('<form method=post action="' + urlLogin + '">');
     if(bangEnabled==1) {
        if(loginNm) {
           document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;'+JS_auctiondat_Loginto_6280+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></tr>');
        }else{
       document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;'+JS_auctiondat_NewUser_8754+'</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></TR>');
        }
         }else{
        if(loginNm) {
       document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;<b>'+JS_searchuser_Registe_1094+'</b>:&nbsp;'+JS_auctiondat_Loginbe_6285+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></TR>');
        }else{
       document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;'+JS_auctiondat_NewUser_8754+'</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></TR>');
        }
     }
               document.write("<tr><td>"+JS_confirm_sh_LoginID_9913+"&nbsp;<input name='!login' style='width:90px;padding-left:2px' size=10 maxlength=30 id='IP$LoginField' value='"+loginNm+"'></td>");
       document.write("<td>&nbsp;</td>");
       document.write("<td>"+JS_register_w_Passwor_5210+"&nbsp;<input type=password name='!password' style='width:70px;padding-left:2px' size=6 maxlength=16></td>");
       document.write('<td><INPUT TYPE="image" SRC="/images/' + JS_STATIC_IMAGE_PATH +'/btn_login2_nd.gif" BORDER=0 ALIGN=absmiddle title="'+JS_auctiondat_Enteryo_8660+'"></td></tr>');      
       if (realmId == 1 || realmId == 3) {
       document.write('<tr><td colspan=4 align="center">'+JS_ipscripts_Usagesu_6287+'. '+JS_auctiondat_Lastrev_6284+'</td></tr>');
       }
       else if (realmId == 2) {
       document.write('<tr><td colspan=4 align="center">'+JS_ipscripts_aus_Usagesu_6287+'. '+JS_auctiondat_aus_Lastrev_6284+'</td></tr>');
       }
               document.write("</form>");
   }
}
    
function dispLoginControls1(urlEditProfile, urlAcctTrans, urlLogin) {
   var loggedIn = getCookie("loggedin");
   var loginNm = getCookie("login");
   var bangEnabled = getCookie("irx");
   var roles = getCookie("roles");
   if(loginNm == null) loginNm="";
   if(roles == null) roles="";
   
   if (loggedIn && loginNm != "")  {
   } else {
     document.write('<form method=post action="' + urlLogin + '">');
     if(bangEnabled==1) {
        if(loginNm) {
           document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;'+JS_ipscripts_Loginto_6288+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></tr>');
        }else{
       document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;<b>'+JS_ipscripts_NewUser_6289+'</b>:&nbsp;<A HREF="/jsp/acct/register.jsp">'+JS_ipBidDiscl_Registe_2415+'</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></TR>');
        }
         }else{
        if(loginNm) {
       document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;<b>'+JS_searchuser_Registe_1094+'</b>:&nbsp;'+JS_auctiondat_Loginbe_6285+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></TR>');
        }else{
       document.write('<tr bgcolor="#FFFFCC"><td align=left colspan=4><img src=/images/notice.gif border=0>&nbsp;&nbsp;<b>'+JS_ipscripts_NewUser_6289+'</b>:&nbsp;<A HREF="/jsp/acct/register.jsp">'+JS_ipBidDiscl_Registe_2415+'</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/jsp/acct/login.jsp" target="_blank">'+JS_auctiondat_LoginHe_6281+'</A></td></TR>');
        }
     }
               document.write("<tr><td>"+JS_singlebids_LoginID_3659+"&nbsp;<input name='!login' style='width:90px;padding-left:2px' size=10 maxlength=30 id='IP$LoginField' value='"+loginNm+"'></td>");
       document.write("<td>&nbsp;</td>");
       document.write("<td>"+JS_bidConfirm_Passwor_9042+"&nbsp;<input type=password name='!password' style='width:70px;padding-left:2px' size=6 maxlength=16></td>");
       document.write('<td><INPUT TYPE="image" SRC="/images/'+ JS_STATIC_IMAGE_PATH + '/btn_login2_nd.gif" BORDER=0 ALIGN=absmiddle title="'+JS_auctiondat_Enteryo_8660+'"></td></tr>');      
               document.write("</form>");
   }
}
    
function AD_makeCube(equipId, description, endTime, price,
			pictureUrl, location, state, bidCount, highBidder, crumb,
         aucExtended, equipStatus, checkSerial, newSerial)
{
	var out = "";

	//debug("Making cube for item " + this.equipId);

	out += '<table width="370" border="1" cellspacing="0" bordercolor="#CCCCCC" cellpadding="1" ID="IP$' + equipId + '_OuterTable">';
	out += '<form method="POST" action="/jsp/equip/bidPage.jsp?h=' + crumb + '">';
	out += '<input type="hidden" name="equipId" value="' + equipId + '">';
	out += '<td>';
	out += '<table ID="IP$' + equipId + '_Title" width="100%" border="0" cellspacing="0" bgcolor="#CCCCCC">';
	out += '<tr><td valign=top class=b><b>&nbsp;' + equipId + '</b></td>';
	out += '<td align=center valign=top class=b><b>' + unescape(description) + '</b></td>';
	out += '<td valign=top align=right class=b><b>' + location + '&nbsp;</b></td></tr></table>';

	out += '<table width="100%" cellspacing="0" bordercolor="#CCCCCC" bgcolor=#FFFFFF ID="IP$' + equipId + '_InnerTable">';
	out += '<tr><td rowspan="4" width="112" height=71 valign="middle" align=center bgcolor=black>';
	out += '<a href="/jsp/s/item/' + equipId + '&h=' + crumb + '">';

	if (pictureUrl != "")
	{
		out += '<img name="vehicleImg" src="' + pictureUrl + '" width=110 height=69 border=0 alt="' + JS_auctiondat_Clickim_8649 + '">';
	}
	else
	{
		out += '<p class=a><font color="white">'+JS_cube_NoImage_1940+'</font></p>';
	}

	out += '</a></td>';
	out += '<td align="right" class=b>'+JS_pricing_Bidding_8440+'</td>';
	out += '<td><b><span class=red ID="IP$' + equipId + '_TimeLeftString">' + AuctionData_timeLeft(endTime) + '</span></b></td></tr>';
	out += '<tr><td ID="IP$' + equipId + '_PriceLabelCell" bgcolor="#CCCCCC" align=center valign=bottom width="94">';

	out += '<font color=black><span class=b ID="IP$' + equipId + '_pricelabel">';
	if (bidCount > 0)
		out += JS_auctiondat_Highest_8610;
	else
		out += JS_auctiondat_Opensat_8611;
	out += '</span></font></td>';

	out += '<td rowspan="2" valign="middle" align=center> &nbsp;<input type="submit" name="Submit3" value="' +JS_ipscripts_PlaceBi_8670 + '"></td></tr>';
	out += '<tr><td ID="IP$' + equipId + '_PriceCell" bgcolor="#CCCCCC" width="94" valign=top align=center class=a>';
	out += '<font color=black><b ID="IP$' + equipId + '_price">' + price + '</b></font>';
	out += '</td></tr>';

	out += '<tr><td align=center width="94" class=b ID="IP$' + equipId + '_bidcountstring">';
	if (bidCount > 0)
		out += JS_auctiondat_ofbids_8614 + bidCount;
	else
		out += JS_auctiondat_Nobidsy_8615;
	out += '</td>';

	var bangEnabled = getCookie("irx");
	if(bangEnabled != null && bangEnabled != 1)
	{
		if(containsEq(equipId))
		{
			if(loggedIn == highBidder)
				out += "<td align=center bgcolor=#FFFFCC><img border=0 src=/images/notice.gif><b><font color=green>"+JS_auctiondat_Highest_8616+"</font></b></td>";
			else
				out += "<td align=center bgcolor=#FFFFCC><b><font color=red>"+JS_winnerMess_Youvebe_8892+"</font></b></td>";
		}
		else
		{
			out += "<td align=center><b><font>&nbsp;</font></b></td>";
		}
	}
	else
	{
        	out += '<td align=center><img ID="IP$' + equipId + '_winnerimage" border=0 src="/images/transparent.gif" align=ABSMIDDLE width=14 height=14><b><font ID="IP$' + equipId + '_winnerstring" color=red>&nbsp;</font></b></td>';
	}

	out += '</tr></table></td></tr>';
	out += '</form>';
	out += '</table>';

	//debug("Made cube for item " + equipId);
	//return out;
    document.write(out);


    // Now update the page state 
    var indexOnPage = eval("equip_" + equipId + "_index");

    endTimes[indexOnPage] = endTime;
    if (equipStatus == 31)   // EquipmentState.AUCTION_ACTIVE
    {
      extFlags[indexOnPage] =  aucExtended=="true"?1:0;
      if (checkSerial > _currentSerial && endTime > sTime) 
         {
         _currentSerial = checkSerial;
         eval(newSerial);
         }
    } else 
    {
      extFlags[indexOnPage] = 2;
    }

}

function plural(n,s)
{
	if (n == 1)
		return "" + n + " " + s;
	return "" + n + " " + s + "s";
}

function AuctionData_timeLeft(endTime)
{
	var out = "";
	var mins = Math.floor((endTime - sTime) / 60000);

	if (mins < 1)
		return JS_auctiondat_Lesstha_8654;
	if (mins < 60)
		return plural(mins, "minute");

	if (mins < 1440)
		return plural(Math.floor(mins / 60), "hour") + ", " +
			plural(mins % 60, "min");
	

	return plural(Math.floor(mins / 1440), "day") + ", " +
		plural(Math.floor((mins % 1440) / 60), "hour");
}

function crumbPortion(url)
{
	if (url == null)
		return "";
	var pos = url.indexOf("h=");
   if (pos > -1) {
   	return url.substr(pos + 2);  // assumes crumb is last param of url
      }
   else
      return "";
}


//Email Validation
//----------------
function isEmailSyntax(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,5}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

function isValidEmail(o, flag) {   
   s = o.value.replace(/\s/g, '');
   
   if (s.length < 1 ) {      
      if(flag) {    
      	return false;
      }
   } else {   
      o.value=s; 
      
      arrayOfEmails = s.split(",");
      for (var i=0; i < arrayOfEmails.length; i++) {
    	  if (!isEmailSyntax(arrayOfEmails[i])) {    	      
    	      return false;
    	  }
      }   
   }	   
   return true;
}


// f textField object
// flag (Mandatory or Optional field)
function validateEmail(f, flag) {
   var badEmail = false;   
   
   if (!isValidEmail(f, flag)) {
         badEmail = true;      
   }

   if (badEmail) {
      alert(JS_ipscripts_Pleasee_8671);
      f.focus();
      return false;
   }
}
/*
 * Validate a U.S. ZIP or ZIP+4 Code
 * z5 - input element for first 5 digits of U.S. ZIP Code
 * z4 - input element for 4-digit ZIP+4 suffix
 * require5 - if true, z5 is required
 * require4 - if true, z4 is required
 */
function validateZIP(z5, z4, require5, require4) {
   var bad = false;
   var badElmt;
   
   if (require5) {
      var trim5 = z5.value.replace(/ /g, '');
      if (5 != trim5.length) {
         bad = true;
         badElmt = z5;
      }
   }
   if (require4) {
      var trim4 = z4.value.replace(/ /g, '');
      if (4 != trim4.length) {
         bad = true;
         badElmt = z4;
      }
   }
   
   if (bad) {
      if (require4)
	     alert(JS_ipscripts_Pleasee_8667);
	  else
	     alert(JS_ipscripts_Pleasee_8668);
      badElmt.focus();
      return false;
   }
   return true;
}

var vin_year_encoding = new Array(30);
vin_year_encoding['A']="1980"; 	
vin_year_encoding['B']="1981";
vin_year_encoding['C']="1982"; 
vin_year_encoding['D']="1983"; 
vin_year_encoding['E']="1984"; 
vin_year_encoding['F']="1985"; 
vin_year_encoding['G']="1986"; 
vin_year_encoding['H']="1987"; 
vin_year_encoding['J']="1988";
vin_year_encoding['K']="1989";
vin_year_encoding['L']="1990";
vin_year_encoding['M']="1991";
vin_year_encoding['N']="1992";
vin_year_encoding['P']="1993";
vin_year_encoding['R']="1994";
vin_year_encoding['S']="1995";
vin_year_encoding['T']="1996";
vin_year_encoding['V']="1997";
vin_year_encoding['W']="1998";
vin_year_encoding['X']="1999";
vin_year_encoding['Y']="2000";
vin_year_encoding['1']="2001";
vin_year_encoding['2']="2002";
vin_year_encoding['3']="2003";
vin_year_encoding['4']="2004";
vin_year_encoding['5']="2005";
vin_year_encoding['6']="2006";
vin_year_encoding['7']="2007";
vin_year_encoding['8']="2008";
vin_year_encoding['9']="2009";

function checkVIN(vin, year) {
	var errorMessage = "";
	if(year != '0' && year != '0001' && parseInt(year) < 1981) 
		return errorMessage;
	if(vin.length != 17) {
		errorMessage = JS_ipscripts_TheVINo_8672;
	} else if(year != '0' && year != '0001' && vin_year_encoding[vin.toUpperCase().charAt(9)] != year) {
		eval(JSe_ipscripts_TheVINo_8724);
		if(vin_year_encoding[vin.toUpperCase().charAt(9)]) 
			errorMessage = JS_ipscripts_TheVINo_8724;
		else 
			errorMessage = JS_ipscripts_TheVINo_8673;
	} else {
		var checkSum = 0;	
		for(var i=0;i<17;i++) {
			if(i != 8) {
				var charASCII = vin.toUpperCase().charCodeAt(i) - "A".charCodeAt(0);
				// if I, O or Q is found somewhere, set the checkSum to -1 to force the failure
				if(charASCII == 8 || charASCII == 14 || charASCII == 16) {
					checkSum = -1;
					break;
				}
					
				var code = 0;
				if(charASCII >= 0) {	
					code = charASCII%9 + 1;
					if(charASCII > 17)
						code++;
				} else {
					code = vin.charAt(i);
				}
				var weight = 0;
				if(i < 7) {
					weight = 8 - i;
				} else if(i == 7) {
					weight = 10;
				} else if(i > 7){
					weight = 18 - i;
				}
	
				checkSum = checkSum+weight*code;
			}
		}
		var checkSumCode = checkSum%11;
		if(checkSumCode == 10) {
			checkSumCode = "X";
		}
		if(vin.toUpperCase().charAt(8) != checkSumCode) {
			errorMessage = JS_ipscripts_TheVINo_8674;
		}
	}
	 
	return errorMessage;
}



//param v - value to be checked
//param t - type; 1 for positive int, 2 for positive float, 3 for int and 4 for float
//param l - length of the decimal part
//return 1 or 0 if the number is not valid
function checkData(v, t, l) {
   if (t == 1 || t == 3) {
      g = dataIsInt(v, t, l);
   }
   else {
      g = dataIsFloat(v, t, l);
   }
   return g;
}

function dataIsInt(v, t, l) {
   if (v.length > 0) {
      v = v.replace(/[%,$]/g,'');
      i = v.indexOf('.');
      if (i != -1) {
         d1 = v.substring(i+1, v.length);
         if (isNaN(parseInt(d1))) {
         	return 0;
         }
         pd1 = parseInt(d1);
         if (pd1 > 0) {
         	return 0;
         }
      }
      if (v.length > l) {
         return 0;
      }
      if (l == 10 && v.length == 10) {
         s = v.substring(0, 4);
         if (isNaN(parseInt(s))) {
            return 0;
         }
         s1 = parseInt(s);
         if (s > 2140) {
            return 0;
         }
      }
      if (isNaN(parseInt(v))) {
         return 0;
      }
      v1 = parseInt(v);
      if (v1 < 0 && t == 1) {
         return 0;
      }
   }
   return 1;
}

function dataIsFloat(v, t, l) {
   if (v.length > 0) {
      v = v.replace(/[%,$]/g,'');
      i = v.indexOf('.');
      v2 = v;
      if (i != -1) {
         v2 = v.substring(0, i);
      }
      if (v2.length > l) {
         return 0;
      }
      if (isNaN(parseFloat(v))) {
         return 0;
      }
      v1 = parseFloat(v);
	  if (t==2)
	  {
          if (v1 < -0.00001 ) {
             return 0;
          }
      }
   }
   return 1;
}

function validateThisDate(v, i) {
   l = v.length;
   if (i == 0 && l == 0) {
      return 1;
   }
   if (l != 8) {
      return 0;
   }
   mp = v.substring(0, 2);
   if (isNaN(parseInt(mp))) {
      return 0;
   }
   else {
      mp1 = parseInt(mp, 10);
   }
   sp1 = v.substring(2, 3);
   dp = v.substring(3, 5);
   if (isNaN(parseInt(dp))) {
      return 0;
   }
   else {
      dp1 = parseInt(dp, 10);
   }
   sp2 = v.substring(5, 6);
   yp = v.substring(6, 8);
   if (isNaN(parseInt(yp))) {
      return 0;
   }
   else {
      yp1 = parseInt(yp, 10);
   }
   if (sp1 != '/' || sp2 != '/') {
      return 0;
   }
   
   if (mp1 >= 1 && mp1 <= 12 && dp1 >= 1 && dp1 <= 31 && yp1 >= 5) {
      return 1;
   }
   
   return 0;
}

function validateDate(v, i) {
   l = v.length;
   if (i == 0 && l == 0) {
      return 1;
   }
   if (l != 8) {
      return 0;
   }
   mp = v.substring(0, 2);
   if (isNaN(parseInt(mp))) {
      return 0;
   }
   else {
      mp1 = parseInt(mp, 10);
   }
   sp1 = v.substring(2, 3);
   dp = v.substring(3, 5);
   if (isNaN(parseInt(dp))) {
      return 0;
   }
   else {
      dp1 = parseInt(dp, 10);
   }
   sp2 = v.substring(5, 6);
   yp = v.substring(6, 8);
   if (isNaN(parseInt(yp))) {
      return 0;
   }
   else {
      yp1 = parseInt(yp, 10);
   }
   if (sp1 != '/' || sp2 != '/') {
      return 0;
   }
   
   if (mp1 >= 1 && mp1 <= 12 && dp1 >= 1 && dp1 <= 31 && yp1 >= 0 && yp1 <= 99) {
      return 1;
   }
   
   return 0;
}

// Global variables
var isCSS, isW3C, isIE4, isNN4, isIE6CSS;
var isCSS = true; // I'm not playing around with browser detection at this point.
var isW3C = true;


// Convert object name string or object reference
// into a valid element object reference
function getRawObject(obj) {
    var theObj;
    if (typeof obj == "string") {
        if (document.getElementById) {
            theObj = document.getElementById(obj);
        } else if (document.all) {
            theObj = document.all(obj);
        } else {
        	theObj = false;
        }
    } else {
        // pass through object reference
        theObj = obj;
    }
    return theObj;
}

// Convert object name string or object reference
// into a valid style (or NN4 layer) reference
function getObject(obj) {
    var theObj = getRawObject(obj);
    if (theObj) {
        theObj = theObj.style;
    }
    return theObj;
}

// Retrieve the x coordinate of a positionable object
function getObjectLeft(obj)  {
    var elem = getRawObject(obj);
    var result = 0;
    if (document.defaultView) {
        var style = document.defaultView;
        var cssDecl = style.getComputedStyle(elem, "");
        result = cssDecl.getPropertyValue("left");
    } else if (elem.currentStyle) {
        result = elem.currentStyle.left;
    } else if (elem.style) {
        result = elem.style.left;
    } else if (isNN4) {
        result = elem.left;
    }
    return parseInt(result);
}

// Retrieve the y coordinate of a positionable object
function getObjectTop(obj)  {
    var elem = getRawObject(obj);
    var result = 0;
    if (document.defaultView) {
        var style = document.defaultView;
        var cssDecl = style.getComputedStyle(elem, "");
        result = cssDecl.getPropertyValue("top");
    } else if (elem.currentStyle) {
        result = elem.currentStyle.top;
    } else if (elem.style) {
        result = elem.style.top;
    } else if (isNN4) {
        result = elem.top;
    }
    return parseInt(result);
}


// Move an object by x and/or y pixels
function shiftBy(obj, deltaX, deltaY) {
    var theObj = getObject(obj);
    if (theObj) {
        if (isCSS) {
            // equalize incorrect numeric value type
            var units = (typeof theObj.left == "string") ? "px" : 0 
            theObj.left = getObjectLeft(obj) + deltaX + units;
            theObj.top = getObjectTop(obj) + deltaY + units;
        } else if (isNN4) {
            theObj.moveBy(deltaX, deltaY);
        }
    }
}

// Retrieve the rendered height of an element
function getObjectHeight(obj)  {
    var elem = getRawObject(obj);
    var result = 0;
    if (elem.offsetHeight) {
        result = elem.offsetHeight;
    } else if (elem.clip && elem.clip.height) {
        result = elem.clip.height;
    } else if (elem.style && elem.style.pixelHeight) {
        result = elem.style.pixelHeight;
    }
    return parseInt(result);
}

// Position an object at a specific pixel coordinate
function shiftTo(obj, x, y) {
    var theObj = getObject(obj);
    if (theObj) {
        if (isCSS) {
            // equalize incorrect numeric value type
            var units = (typeof theObj.left == "string") ? "px" : 0 
            theObj.left = x + units;
            theObj.top = y + units;
        } else if (isNN4) {
            theObj.moveTo(x,y)
        }
    }
}

// Move an object by x and/or y pixels
function shiftBy(obj, deltaX, deltaY) {
    var theObj = getObject(obj);
    if (theObj) {
        if (isCSS) {
            // equalize incorrect numeric value type
            var units = (typeof theObj.left == "string") ? "px" : 0 
            theObj.left = getObjectLeft(obj) + deltaX + units;
            theObj.top = getObjectTop(obj) + deltaY + units;
        } else if (isNN4) {
            theObj.moveBy(deltaX, deltaY);
        }
    }
}

function reserveCodeToText(code) {
	switch (code) {
		case 0:
			return JS_ipscripts_NR_8675;
		case 1:
			return JS_auctiondat_Reserve_8619;
		case 2:
			return JS_auctiondat_Nextbid_8620;
		case 3:
			return JS_auctiondat_Reserve_8621;
	}

	return JS_ipscripts_Reserve_8725 + code;
}
 
var ipscripts_init_called = 0;

function init() {
	if (ipscripts_init_called++ > 0)
		return;

	if(document.getElementById(menu_select)) {
		document.getElementById(menu_select).style.backgroundColor = "#f60"
	}

	if (window.oldOnload)
		window.oldOnload();
}

function viewFaq(faqID) {
	for(var i=0; i<questions.length; i++) {
		x = 'q' + i;
		document.getElementById(x).style.visibility="hidden";
	}
	elem = getObject(faqID);
	elem.top = 0;
	// Now calculate how big that table is.
	var q_height = getObjectHeight(faqID);
		
	shiftBy(faqID,0,(-q_height+15));
	// And shift it up yay much.
	
	document.getElementById(faqID).style.visibility="visible";
}

function hideFaq(faqID)	{
	document.getElementById(faqID).style.visibility="hidden";
}

function setMotd(msg) {
	var p;
	if ((p = document.getElementById("motd")) != null)
	{
		p.innerHTML = msg;
		if (msg)
			p.className = "pause_motd";
		else
			p.className = "no_motd";
	}
}

function writeFAQ(questions) {
	
	// Write Q & A Out.
	
	for(var i=0; i < questions.length; i++) {
		var ident='q'+i;
		var s = '<div style="position:relative;"><p class="clump_normal"><a href="javascript:viewFaq(\'q'+ i + '\')" class="faq">' + questions[i].q + '</a></p>'
		s += '<table cellspacing="0" cellpadding="0" border="0" class="answer" id="q'+ i +'" style="width:300px;">';
		s += '<tr><td><img src="/k_images/faq_corner_tl.gif" alt=""></td><td style="background-image:url(/k_images/faq_top.gif); background-repeat:repeat-x;"><img src="/k_images/dot.gif" width="300" height="1" alt=""></td><td><img src="/k_images/faq_corner_tr.gif" alt=""></td></tr>';
		s += '<tr>';
		s += '<td rowspan="2" style="background-image:url(/k_images/faq_left.gif); background-repeat:repeat-y; vertical-align:bottom;"><img src="/k_images/faq_corner_bl.gif" alt=""></td><td class="quote">';
		s += '<b>'+JS_ipscripts_Answer_6690+'</b><br><br>';
		s += questions[i].a + '<br>';
		s += '<a href="javascript:hideFaq(\'q' + i + '\')"><img src="/k_images/' + JS_STATIC_IMAGE_PATH +'/close.gif" align="right" border="0" hspace="5" style="margin-top:10px;"></a>';
		s += '</td>';
		s += '<td style="background-image:url(/k_images/faq_right.gif); background-repeat:repeat-y;><img src="/k_images/dot.gif" width="1" height="1" alt=""></td>';
		s += '</tr><tr><td style="background-image:url(/k_images/faq_bottom.gif); background-repeat:repeat-x;><img src="/k_images/dot.gif" width="1" height="1" alt=""></td><td><img src="/k_images/faq_corner_br.gif"></td></tr>';
		s += '</table></div>';
		document.write(s);
	}
}

function changeOpener(loc) {
	if(window.opener) {
		window.opener.location.href = loc;
		window.opener.focus()
	} else {
		newWindow = window.open(loc,'newWin')
		newWindow.focus()	
	}
}

function isBQFEmpty(o) {
   s = o.value.replace(/\s/g, '');
   if (s.length < 1) {
      return true;
   }
   return false;
}

function validateBQF(f) {
	f.sbutton.disabled = true;
	objToGetPostErrFocus = null;
	message = 'Il manque les informations suivantes :  ';
	missed = 'false';

   if (isBQFEmpty(f.fname)) {
      if (missed == 'true') {
         message = message + ', Prénom';
      }
      else {
         message = message + 'Prénom';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.fname;
   }

   if (isBQFEmpty(f.lname)) {
      if (missed == 'true') {
         message = message + ', Nom';
      }
      else {
         message = message + 'Nom';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.lname;
   }

   if (isBQFEmpty(f.addr)) {
      if (missed == 'true') {
         message = message + ', Adresse';
      }
      else {
         message = message + 'Adresse';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.addr;
   }

   if (isBQFEmpty(f.city)) {
      if (missed == 'true') {
         message = message + ', Ville';
      }
      else {
         message = message + 'Ville';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.city;
   }

   var si = document.bqf.state.selectedIndex;
   if (si == 0) {
      if (missed == 'true') {
         message = message + ', État/Province';
      }
      else {
         message = message + 'État/Province';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.state;
   }

   if (isBQFEmpty(f.zip)) {
      if (missed == 'true') {
         message = message + ', Code postal';
      }
      else {
         message = message + 'Code postal';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.zip;
   }

   if (isBQFEmpty(f.tel)) {
      if (missed == 'true') {
         message = message + ', Téléphone';
      }
      else {
         message = message + 'Téléphone';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.tel;
   }

   if (isBQFEmpty(f.email)) {
      if (missed == 'true') {
         message = message + ', email';
      }
      else {
         message = message + 'Email';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.email;
   }

   p = document.bqf.bidAmount;
   if (p) {
      if (!document.bqf.bidAmount[1].checked && !document.bqf.bidAmount[0].checked) {
         if (missed == 'true') {
            message = message + ', , montant que vous allez enchérir';
         }
         else {
            message = message + 'Montant que vous allez enchérir';
         }
         missed = 'true';
      }
   }
   
   var vb = 1;
   if (f.dontValidateBank) {
      vb = 0;
   }

   if (isBQFEmpty(f.bname) && vb == 1) {
      if (missed == 'true') {
         message = message + ', nom de la banque';
      }
      else {
         message = message + 'Nom de la banque';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.bname;
   }

   if (isBQFEmpty(f.bphone) && vb == 1) {
      if (missed == 'true') {
         message = message + ', numéro de téléphone de la banque';
      }
      else {
         message = message + 'Numéro de téléphone de la banque';
      }
      missed = 'true';
      if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.bphone;
   }
   
   if (f.vat != null && f.needVat != null) {
       if (isBQFEmpty(f.vat)) {
           if (missed == 'true') {
               message = message + ', Numéro de TVA';
           }
           else {
               message = message + 'Numéro de TVA';
           }
           missed = 'true';
           if (!objToGetPostErrFocus)  objToGetPostErrFocus = f.vat;
       }
   }

   if (missed == 'true') {
      alert(message);
      if (objToGetPostErrFocus) objToGetPostErrFocus.focus();
      f.sbutton.disabled = false;
      return false;
   }

}

window.oldOnload = window.onload;
window.onload=init;


<!--  that is all --> 
