if(document.getElementsByTagName){
	document.write("<link rel='stylesheet' type='text/css' href='css/jsPre.css' />")
}
function ToggleNav(){
if((!document.getElementsByTagName) || (!document.getElementById)) return false;
if(document.getElementById('Nav_main')){
	var nav=document.getElementById('Nav_main');
	var span = nav.getElementsByTagName("span");
		for( var i=0 ; i < span.length ; i++){
			if(span[i].parentNode.nodeName=='LI'){
				span[i].onclick=function(){
					if(this.parentNode.className=='active'){
						this.parentNode.className='';
					}
					else{
						this.parentNode.className='active';
					}
				}
			}
		}
	}
}

window.onload=function()
{
	ToggleNav();
}

function showReportImage(report_id,report_image_id,image_width,image_height)
{
  var w_left = Math.ceil(screen.width/2-(image_width/2));
  var w_top = Math.ceil(screen.height/2-(image_height/2));
  image_width = image_width + 20;
  image_height = image_height + 100;
  window.open("reportImageShow.php?random="+Math.random()+"&report_id="+report_id+"&report_image_id="+report_image_id,"DatePickerWindow","dependent=yes,left="+w_left+",top="+w_top+",width="+image_width+",height="+image_height+",titlebar=yes,center:yes,help:no,resizable:yes,status:no");
}

function showVehicleImage(vehicle_id,vehicle_image_id,image_width,image_height)
{
  var w_left = Math.ceil(screen.width/2-(image_width/2));
  var w_top = Math.ceil(screen.height/2-(image_height/2));
  image_width = image_width + 20;
  image_height = image_height + 100;
  window.open("vehicleImageShow.php?random="+Math.random()+"&vehicle_id="+vehicle_id+"&vehicle_image_id="+vehicle_image_id,"DatePickerWindow","dependent=yes,left="+w_left+",top="+w_top+",width="+image_width+",height="+image_height+",titlebar=yes,center:yes,help:no,resizable:yes,status:no");
}
