function preloadImages() {
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			(new Image()).src = preloadImages.arguments[i];
		}
	}
}

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }


/* DHTML FUNCTIONS */
var isNav4, isIE4, isNav6 = false;
var range = "";
var styleObj = "";

if (navigator.appVersion.charAt(0) >= 4) {
	if (navigator.appName == "Netscape") {
		if (navigator.appVersion.charAt(0) >= 5) {
			isNav6 = true;
		}
		else {
			isNav4 = true;
		}
	}
	else {
		isIE4 = true;
		range = "all.";
		styleObj = ".style";
	}
}

function getObject(obj) {
	var theObj;
	if (typeof obj == "string") {
		if (isNav6) {
			theObj = document.getElementById(obj);
			if (theObj != null) theObj = theObj.style;
		}
		else {
			theObj = eval("document." + range + obj);
			if (theObj != null) theObj = eval("theObj" + styleObj);
		}
	}
	else {
		theObj = obj;
	}
	return theObj;
}

function show() {
	var theObj;
	for (var i = 0; i < show.arguments.length; i++) {
		theObj = getObject(show.arguments[i]);
		if (theObj != null) {
			theObj.display = "block";
			theObj.visibility = "visible";
		}
	}
}

function hide() {
	var theObj;
	for (var i = 0; i < hide.arguments.length; i++) {
		theObj = getObject(hide.arguments[i]);
		if (theObj != null) {
			theObj.display = "none";
			theObj.visibility = "hidden";
		}
	}
}



function preselectList(itemToSelect){    
	var myDropdownList = document.selectType.type;

	for (iLoop = 0; iLoop < myDropdownList.options.length; iLoop++){    
		if (myDropdownList.options[iLoop].value == itemToSelect){
		
			myDropdownList.options[iLoop].selected = true;
			break;
		}
	}
	
}	


function initMe() {
	var locationSearch = document.location.search;
	var locationSearchMod = locationSearch.slice(1);
	
	if (locationSearchMod < 1) {
		return;
	}
	
	else {
		preselectList(locationSearchMod);
	}
	
	
}


/* BOX FUNCTIONS*/


function openDemoWindow(url) {
  	window.open(url,"Demo", "width=766, height=476, top=100, left=100, scrollbars=no, resizable=no").focus();
}


document.onLoad = initMe();






