var userName = new Array();  
userName[0]="247admin"; 
userName[1]="247mcb"; 
userName[2]="247webmaster";


var userNameFull = new Array(); 
userNameFull[0]="E-Mail Us"; 
userNameFull[1]="General";
userNameFull[2]="WebMaster"; 

var userSubject= new Array()
userSubject[0]="Query from 247highway.com Website"; 
userSubject[1]="Here's a Query from the 247highway.com Website";
userSubject[2]="Query for 247highway WebMaster"; 

var siteName = "247highway.com?subject=";
i=0;
do userName[i]='<a href=\"mailto:' + userName[i] + '@' + siteName + userSubject[i] +'\">' + userNameFull[i] + '</a>';
while(userName[++i]);
// end of email section


// OPEN NEW MYWINDOW
var abc;
function mywindow(myurl, myname, nwidth){
abc=window.open(myurl, myname, nwidth);
abc.focus();
return false;
}

//OPEN A WINDOW FOR TELEPHONE NUMBERS
var phonewindow;
function myphonewindow(phonepage)
{
         var windowFeatures="left=300,top=300,width=490,height=215";
         phonewindow = window.open(phonepage,"phonenumbers",windowFeatures);
         phonewindow.focus();
         return false;
}


//TO OPEN A NEW WINDOW WITH AN EMAIL ADDRESS TELLAFRIEND
var tellwindow;
function mytellwindow(tellpage)
{
         var windowFeatures="left=300,top=300,width=350,height=200";
         tellwindow = window.open(tellpage,"tellafriend",windowFeatures);
         tellwindow.focus();
         return false;
}


//TO FORCE A PAGE INTO THE FRAME LAYOUT
function frameMe(cURL){
    //name of the frameset page (be sure to add path info)
    var frameset = cURL;

    //name of the frame to load document into
    var frame = "mainframe";

    page = new String(self.document.location.pathname);
	//alert(page);
    if(window.name != frame){
      var contents = frameset + "?" + page + "&" + frame;
      top.location.replace(contents);
    }
    return;
  }
  
  //TO CLOSE AN OPEN WINDOW
function window_onunload(){
 		 if (typeof(farmpicswindow) != "undefined" && farmpicswindow.closed == false)	 {
		 farmpicswindow.close();
		 }
}
  
//USED FOR PRELOADING
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}




//used to force into a frame
  function loadDoc(){
    //an array containing the querystring portion of the URL
    // of the page being loaded into this frame
    var query = window.location.search.split('&');

    //the first member of that array (without the "?"): the page name
    var page = query[0].substr(1);

    //the second member of that array: the frame name
    var frame = query[1];

    if(page && frame){
      //only do the replacement if there was a querystring to parse
      var contents = "top." + frame + ".location.replace('" + page + "')";
      eval(contents);
    }
    return;
  }
