function openWindow(page,title,w,h,x,y,l,t,scroll,resize,tb,mb,add) {
	var demoWindow = window.open(page,title,'toolbar='+tb+',menubar='+mb+',location='+add+',scrollbars='+scroll+',copyhistory=yes,directory=yes,resizable='+resize+',width='+w+',height='+h+',left='+l+',top='+t+',screenX='+x+',screenY='+y)
	if (demoWindow) {		
		//demoWindow.focus();
	}
	else {
		alert("Please Follow the directions on the page to allow Pop-Ups from this site to access this area of the Site!");
	}
}	
function openCloseWindow(page,title,w,h,x,y,l,t,scroll,resize,tb,mb,add) {
	var demoWindow = window.open(page,title,'toolbar='+tb+',menubar='+mb+',location='+add+',scrollbars='+scroll+',copyhistory=yes,directory=yes,resizable='+resize+',width='+w+',height='+h+',left='+l+',top='+t+',screenX='+x+',screenY='+y)
	if (demoWindow) {		
		demoWindow.close();
	}
	else {
		alert("You will need to follow the directions to allow Pop-Ups from this site in order to access this area of the Site!");
	}
}	
function openCloseWindowTest(page,title,w,h,x,y,l,t,scroll,resize,tb,mb,add) {
	var demoWindow = window.open(page,title,'toolbar='+tb+',menubar='+mb+',location='+add+',scrollbars='+scroll+',copyhistory=yes,directory=yes,resizable='+resize+',width='+w+',height='+h+',left='+l+',top='+t+',screenX='+x+',screenY='+y)
	if (demoWindow) {		
		demoWindow.close();
		alert("Your Pop-Up Blocker is configured correctly to continue!");
	}
	else {
		alert("You will need to follow the directions to allow Pop-Ups from this site in order to access this area of the Site!");
	}
}	
	
function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}


function checkSession() {

}


		function confirmDelete(type){
			if(confirm("Are you sure you want to Delete This "+type+"?")){
				//aspnetForm.confirmBox.value = "true";
				return true;
			}
			else {
				//aspnetForm.confirmBox.value = "false";
				return false;
			}
		}

		function confirmRemove(trNumber){
			if(confirm("Are you sure you want to Remove Tractor "+trNumber+"?")){
				aspnetForm.confirmBox.value = "true";
				//alert("Please make sure to print this load before leaving the page!");
			}
			else {
				aspnetForm.confirmBox.value = "false";
			}
		}


		function confirmTractorSnapshot(type){
			if(confirm("Are you sure you want to Close Tractor Staffing for "+type+"?")){
				aspnetForm.confirmBox.value = "true";
			}
			else {
				aspnetForm.confirmBox.value = "false";
			}
		}


		function confirmPASWeekly(type){
			if(confirm("Are you sure you want to Close PAS Week for "+type+"?")){
				aspnetForm.confirmBox.value = "true";
			}
			else {
				aspnetForm.confirmBox.value = "false";
			}
		}

		function sendMessage(msg){
			if(confirm(msg)){
				aspnetForm.confirmBox.value = "true";
				//alert("Please make sure to print this load before leaving the page!");
			}
			else {
				form1.confirmBox.value = "false";
			}
		}

		function confirmDisable(type){
			if(confirm("Are you sure you want to "+type+"?")){
				aspnetForm.confirmBox.value = "true";
				//alert("Please make sure to print this load before leaving the page!");
			}
			else {
				aspnetForm.confirmBox.value = "false";
			}
		}

		function confirmTypeChange(){
		    if (aspnetForm.confirmBox.value == "change")
		    {
			    if(confirm("Do you want to Also Change The Assigned Tractor Type to Match The Driver Info?")){
				    aspnetForm.confirmBox.value = "true";
				    //alert("Please make sure to print this load before leaving the page!");
			    }
			    else {
				    aspnetForm.confirmBox.value = "false";
			    }
			}
		}

function Timer(){
var wholeMinute = MediaPlayer.CurrentPosition / 60
wholeMin = wholeMinute.toString()
var minLength = wholeMin.indexOf('.',0) 
var	Min = wholeMin.substring(0,minLength)
var Sec = Math.round(MediaPlayer.CurrentPosition - (Min * 60))
//if(Min<10)
	//var ElapsedMin = "0"+Min
//else {if(Min<100)
	var ElapsedMin = Min
	//}
if(Sec<10){
	var ElapsedSec = "0"+Sec
if(Sec<0){
	//Sec="0"
	var ElapsedSec = -1*Sec
	}
}
else
	var ElapsedSec = Sec

//lblElapsedMin = Min
lblElapsedTime = Min;
mycounter.innerHTML = ElapsedMin+":"+ElapsedSec;
setTimeout('Timer()', 1000);
}
		var text
		var textIndex = 0
		var textArray = new Array();
		var startStr = "Welcome To Highway Transport"
	function thisMovie(movieName) {
		var isIE = navigator.appName.indexOf("Microsoft") != -1;
		return (isIE) ? window[movieName] : document[movieName];
	}

	function makeCall() {
				var str = new String(form1.flashText.value);
		if (str != "")
		{
		var flashHolder = document.getElementById("extint");
			if (text == null)
			{
				text = str.split(":");
				for(i=0; i<text.length; ++i)
				{
					var strArray = new String(text[i]);
					var tArr 
					if (strArray.length > 0)
					{
						tArr = strArray.split(",");
						textArray[i] = new Array();
						textArray[i] = tArr;
					}
				}
					flashHolder.asFunc(textArray[textIndex][0],textArray[textIndex][1],textArray[textIndex][2],textArray[textIndex][3],textArray[textIndex][4],textArray[textIndex][5],textArray[textIndex][6],textArray[textIndex][7],textArray[textIndex][8],textArray[textIndex][9]);
					textIndex = textIndex + 1
			}
			else
			{
				if (textIndex < textArray.length)
				{
					flashHolder.asFunc(textArray[textIndex][0],textArray[textIndex][1],textArray[textIndex][2],textArray[textIndex][3],textArray[textIndex][4],textArray[textIndex][5],textArray[textIndex][6],textArray[textIndex][7],textArray[textIndex][8],textArray[textIndex][9]);
					textIndex = textIndex + 1
				}
				else
				{
					textIndex = 0;
					flashHolder.asFunc(textArray[textIndex][0],textArray[textIndex][1],textArray[textIndex][2],textArray[textIndex][3],textArray[textIndex][4],textArray[textIndex][5],textArray[textIndex][6],textArray[textIndex][7],textArray[textIndex][8],textArray[textIndex][9]);
				}
		}
			}
}
	function setInt()
	{
			setInterval("makeCall();",3000);
	}
function popupsAllowed() {
    var allowed = false;
    var w = window.open("about:blank","","directories=no,height=1,width=1,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,left=0,top=0,location=no");
    if (w) {
        allowed = true;
        w.close();
    }
	alert("Testing: "+allowed);
    return allowed;
}


