<!--

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function Favorites_Fever(myURL,myDescription){
	if (myURL !== "location.href") {myURL = "'"+myURL+"'";}
	myString="window.external.AddFavorite("+myURL+",'"+myDescription+"')";
	eval(myString);
	}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}

function textLimit(field, maxlen) {
	if (field.value.length > maxlen + 1)
	alert('You have exceeded the maximum amount of characters (' + maxlen + ') for the Summary field: input has been truncated!');
	if (field.value.length > maxlen)
	field.value = field.value.substring(0, maxlen);
}

function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}

function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}

function flvFTFO1(){//v1.14
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
if (!document.layers){var v1=arguments,v2=MM_findObj(v1[0]),v3,v4,v5,v6,v7,v8,v9,v10,v11,v12;if (v2){for (v3=1;v3<v1.length;v3++){v6=v1[v3].split(",");v7=v6[0];v8=v6[1];v11=false;v5=eval("document."+v1[0]+"."+v7);v10=(!v5)?false :true;if (!v10){v5=MM_findObj(v7);v10=(!v5)?false :true;}else {v11=(!v5.type)?true :false;}if (v10){if (v8=="t"){if (!v11){v5.disabled=!v5.disabled;}else {for (v12=0;v12<v5.length;v12++){v5[v12].disabled=!v5[v12].disabled;}}}else {v9=(v8=="e")?false :true;if (!v11){v5.disabled=v9;}else {for (var v12=0;v12<v5.length;v12++){v5[v12].disabled=v9;}}}}}}}}

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}


var form='waiting_room' //Give the form name here

function SetChecked(val,chkName) {
dml=document.forms[form];
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) {
if (dml.elements[i].name==chkName) {
dml.elements[i].checked=val;
}
}
}

function ValidateForm(dml,chkName){
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) {
if ((dml.elements[i].name==chkName) && (dml.elements[i].checked==1)) return true
}
alert("Please select at least one record to be deleted")
return false;
}

function setDeliveryAddress(address, postcode) {
	document.step1form.deliveryaddress.value = address;	
	document.step1form.deliverypostcode.value = postcode;
}

function copyDeliveryAddress() {
	document.step1form.collectionaddress.value = document.step1form.deliveryaddress.value;	
	document.step1form.collectionpostcode.value = document.step1form.deliverypostcode.value;
}

function flvFTFO1(){//v1.14
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
if (!document.layers){var v1=arguments,v2=MM_findObj(v1[0]),v3,v4,v5,v6,v7,v8,v9,v10,v11,v12;if (v2){for (v3=1;v3<v1.length;v3++){v6=v1[v3].split(",");v7=v6[0];v8=v6[1];v11=false;v5=eval("document."+v1[0]+"."+v7);v10=(!v5)?false :true;if (!v10){v5=MM_findObj(v7);v10=(!v5)?false :true;}else {v11=(!v5.type)?true :false;}if (v10){if (v8=="t"){if (!v11){v5.disabled=!v5.disabled;}else {for (v12=0;v12<v5.length;v12++){v5[v12].disabled=!v5[v12].disabled;}}}else {v9=(v8=="e")?false :true;if (!v11){v5.disabled=v9;}else {for (var v12=0;v12<v5.length;v12++){v5[v12].disabled=v9;}}}}}}}}

function updateTotal() {	
	document.updatechargesform.newtotal.value = (parseFloat(document.updatechargesform.rentaltotal.value) + parseFloat(document.updatechargesform.collectioncharge.value) + parseFloat(document.updatechargesform.deliverycharge.value)).toFixed(2);
}

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	LeftPosition = (screen.width) ? (screen.width-imageWidth)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-imageHeight)/2 : 0;
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+LeftPosition+",top="+TopPosition);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" scroll="auto" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}


// -->