  //PRELOADING IMAGES
  pi1 = new Image;
  pi1.src = "images/robtnhome.jpg";
  pi2 = new Image;
  pi2.src = "images/robtnquote.jpg";
  pi3 = new Image;
  pi3.src = "images/robtnmedia.jpg";
  pi4 = new Image;
  pi4.src = "images/robtncraig.jpg";
  pi5 = new Image;
  pi5.src = "images/robtnequip.jpg";
  pi6 = new Image;
  pi6.src = "images/robtncontact.jpg";
  //END IMAGE PRELOAD

  var POPUP_WINDOW_REF = false;

  function popWindow(href,x,y) {
     //alert("pop window");
     var left = (screen.width - x) / 2;
     var top = (screen.height - y) / 2;
     // method calls to popup ref are wrappered individually because of a browser threading issue.
     if (POPUP_WINDOW_REF){
       try{
       POPUP_WINDOW_REF.close();
       }catch(anErr){}
     }
     POPUP_WINDOW_REF =   window.open(href,'POPUP_WINDOW_REF','WIDTH='+x+',HEIGHT='+y+',LEFT='+left+',TOP='+top+',SCROLLBARS=YES,TOOLBARS=NO,LOCATION=NO,MENUBAR=NO,STATUS=NO,RESIZABLE=YES');
     try{
     POPUP_WINDOW_REF.focus();
     }catch(anErr){}
   }


  
//****************************************************************************
//  TEMP PROTOTYPE OBJECT and Methods
//****************************************************************************

function Temp(){}

function _iniTemp(){

	this.popWinParams = "";
	this.displayManager = null;
	this.storageIsActive = false;
	this.currentEvent = null;
}


function setPopWinParams(heit, wide){

//height=375,width=610,scrollbars=yes,resizable=yes,location=yes

	try{
	if(wide){
		var width = wide;//Math.round(getWindowWidth()*wide);
	} else {
		var width = Math.round(getWindowWidth()*.8);
	}

	if(heit){
		var height = heit;//Math.round(getWindowHeight()*heit);
	}else {
		var height = Math.round(getWindowHeight()*.6);
	}

	tmp.popWinParams = "height="+height+",width="+width+",scrollbars=yes,resizable=yes";
	}catch(anErr){
	tmp.popWinParams = "height=375,width=610,scrollbars=yes,resizable=yes,location=yes";
	}

	


}

function setPopWinParamsDebug(heit, wide){

	if(!heit){
		heit = 500;
	}
	if(!wide){
		wide = 800;
	}

	var width = Math.round(wide);
	var height = Math.round(heit);

	 tmp.popWinParams = "height="+height+",width="+width+",scrollbars=yes,resizable=yes,location=yes,status=yes";

}


function getPopWinParams(){

	return tmp.popWinParams.toString();
}

function styleCursorHand(){
	document.body.style.cursor = "hand";
}

function styleCursorDefault(){
	document.body.style.cursor = "default";
}

function styleCursorWait(){
	document.body.style.cursor = "wait";
}

function setDisplayManager(dispMgr){
	tmp.displayManager = dispMgr;
	tmp.storageIsActive = true;
}

function getDisplayManager(){
	return tmp.displayManager;
}



//****************************************************************************
//  EMAIL VALIDATION
//****************************************************************************
function isValidEmail(str) {

	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    if (filter.test(str)){
         return true;
	  } else{
         //alert("Please input a valid email address!")
         return false;
	  }
}

//****************************************************************************
//  Roll Over graphic image swapping
//****************************************************************************

function swapImage(element, src) {
   element.src = src;
}
