//this highlights the topnav link, which is set in the body tag
var currentpage = "none";
	
	function setPage(pagename){
		if (document.images[currentpage]){
			document.images[currentpage].src = eval(currentpage).src;
		}
			if (pagename != 'none' && document.images[pagename]){
				document.images[pagename].src = eval(pagename+"on").src;
			}
			currentpage = pagename;
		}
		
//this preloads all the images
if (document.images) {
		nav_home_off= new Image;
     	nav_home_off.src="images/nav_home_off.jpg";
		nav_home_on= new Image;
     	nav_home_on.src="images/nav_home_on.jpg";
		
		nav_services_off= new Image;
     	nav_services_off.src="images/nav_services_off.jpg";
		nav_services_on= new Image;
     	nav_services_on.src="images/nav_services_on.jpg";
		
		nav_why_off= new Image;
     	nav_why_off.src="images/nav_why_off.jpg";
		nav_why_on= new Image;
     	nav_why_on.src="images/nav_why_on.jpg";
		
		nav_clients_off= new Image;
     	nav_clients_off.src="images/nav_clients_off.jpg";
		nav_clients_on= new Image;
     	nav_clients_on.src="images/nav_clients_on.jpg";
		
		nav_about_off= new Image;
     	nav_about_off.src="images/nav_about_off.jpg";
		nav_about_on= new Image;
     	nav_about_on.src="images/nav_about_on.jpg";
		
		nav_contact_off= new Image;
     	nav_contact_off.src="images/nav_contact_off.jpg";
		nav_contact_on= new Image;
     	nav_contact_on.src="images/nav_contact_on.jpg";
		
  }
 
 //rollover function for single images
 function rollImage(imagename,imageloc){
		if (currentpage != imageloc){
			document.images[imageloc].src = imagename.src;
		}
	}

function openAWindow( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=50;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=0,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	
function openAWindow2( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=50;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}

function checkclear(what){
if(!what._haschanged){
  what.value=''
};
what._haschanged=true;
}


