// JavaScript Document

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];
		}
	}
}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		about_over = newImage("images/nav/about-over.gif");
		commercial_over = newImage("images/nav/commercial-over.gif");
		residential_over = newImage("images/nav/residential-over.gif");
		media_over = newImage("images/nav/media-over.gif");
		contact_over = newImage("images/nav/contact-over.gif");
		preloadFlag = true;
	}
}

function preloadImagesl2() {
	if (document.images) {
		about_over = newImage("../images/nav/about-over.gif");
		commercial_over = newImage("../images/nav/commercial-over.gif");
		residential_over = newImage("../images/nav/residential-over.gif");
		media_over = newImage("../images/nav/media-over.gif");
		contact_over = newImage("../images/nav/contact-over.gif");
		preloadFlag = true;
	}
}

function popup(thepage,width,height){
makeNewWindow(thepage,width,height);}
var newWindow = null;
function makeNewWindow(thepage,width,height) {
	var theParams = "width="+width+",height="+height+","
	theParams += "toolbar=no,scrollbars=yes,status=yes,location=no,resizable=yes,menubar=yes"
	var windowName = "Popup"
	var theLocation = thepage
	newWindow = window.open("",windowName,theParams);
	if (newWindow != null) {
		newWindow.location = theLocation;
	}
}
