﻿function HandleClick(divname)
{ if (document.getElementById(divname).style.display=='none')
{ document.getElementById(divname).style.display='block'; document.getElementById("sign").src="images/1x1_clear.gif";}
else
{ document.getElementById(divname).style.display = 'none'; document.getElementById("sign").src = "images/1x1_clear.gif"; }
}
var offsetfromcursorX=12
var offsetfromcursorY=10
var offsetdivfrompointerX=10
var offsetdivfrompointerY=14
document.write('<div id="dhtmltooltip" style="display:none"></div>')
document.write('<img id="dhtmlpointer" src="images/1x1_clear.gif" style="display:none">')
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

//function ddrivetip(thetext, thewidth, thecolor){ var storesHTML = ""; if (thetext.length > 0)
//{ stores = thetext.split('|'); var theImage = ""; if(stores[0] != "")
//{ theImage = "manager/clientfiles/vehicles/"+ stores[0]
//}
//else
//{ theImage = "images/no_image.jpg"
//}
//storesHTML = storesHTML + "<table width=\"100%\" border=\"0\" BORDERCOLOR=WHITE cellspacing=\"0\" cellpadding=\"5\">"
//storesHTML = storesHTML + "<tr><td valign=\"top\" align=left><img  width=100 height=100 src=\"" + theImage + "\"></td>"
//storesHTML = storesHTML + "    <td align=left><span class=\"Heading1\">GROUP "+ stores[1] + "(" + stores[2] +") </span><br>"
//storesHTML = storesHTML + "   <b>"+ stores[3] + "</b>"
//storesHTML = storesHTML + "   <br>" + stores[4]
//storesHTML = storesHTML + " <b>Luggage</b></br> "+ stores[5] + " Large," + stores[6] + " Medium, " + stores[7] + " Small  </td></tr></table>"
//document.getElementById("vehicle_"+stores[2]).src='images/vehicledesc_over.gif';}
//if (ns6||ie){ if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
//if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
//tipobj.innerHTML=storesHTML
//enabletip=true
//return false
//}
//}
function positiontip(e){ if (enabletip){ var nondefaultpos=false
var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop; var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000
if (rightedge<tipobj.offsetWidth){ tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{ tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}
if (bottomedge<tipobj.offsetHeight){ tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{ tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}
function hideddrivetip(vcode){ if (ns6||ie){ enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
document.getElementById("vehicle_"+vcode).src='images/vehicledesc.gif';}
}
document.onmousemove=positiontip
function getPrint()
{ if (document.getElementsByTagName != null)
{ var html; var headTags = document.getElementsByTagName("title"); if (headTags.length > 0)
html = headTags[0].innerHTML;}
if (arguments.length == 1)
{ var imageStyle = 'visible';}
else
{ var imageStyle = arguments[1];}
var w =800; var h=650; var scroll=1
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'toolbar=0,location=0,directories=0,status=0,menubar=0,'+'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',1'
var pp = window.open("","",settings); pp.document.open(); pp.document.writeln('<HTML><HEAD><title>' + html + '</title>')
pp.document.writeln('<LINK href="css/print.css"  type="text/css" rel="stylesheet"><base target="_self"></HEAD>')
pp.document.writeln('<style>img{visibility:' + imageStyle + ';}.Heading2{visibility:' + imageStyle + ';font-weight:bold;}</style>'); pp.document.writeln('<body MS_POSITIONING="GridLayout" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0">'); pp.document.writeln('<form  method="post">'); pp.document.writeln('<TABLE align="center" width=100% style="border:solid 1px black; width:558px;"><TR><TD><IMG SRC="images/euroPrint.gif"/></TD></TR><TR><TD align=right width="558">'); pp.document.writeln(document.getElementById(arguments[0]).innerHTML); pp.document.writeln('</TD></TR></TABLE>'); pp.document.writeln('</form></body></HTML>'); pp.document.close(); pp.print();
}
function NewWindow(mypage,myname,w,h,scroll,resizable1)
{ var LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; var TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'status=no,location=no,height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resizable1+''
win = window.open(mypage, myname, settings);
win.focus();
return false;}
function toggle(topic)
////topic specific help 
{NewWindow('HelpTopicSpecific.aspx?'+topic,'HelpTopicSpecificPage','613','337','no','no');}     
function termspop()
{NewWindow('TermsAndConditionsPop.aspx','TermsAndConditionsPop','613','480','no','no');} 
function GpsLocations()
{NewWindow('GpsCollectReturnLocationsPop.aspx','GpsPop','370','490','no','no');}           
function HandsFreeCarKitLocations()
{NewWindow('HandsFreeCarKitLocationsPop.aspx','HandsFreePop','370','490','no','no');}      
function PhysicalAddressPopup()
{NewWindow('Templates/PhysicalAddressPopup.htm','APop','450','50','no','no');}
function popUpXe(URL) {
    day = new Date(); 
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=745,height=460,left = 440,top = 275');");
}