/********************\
 )		subnav		(
\********************/
function toggleOn(id, temp) {	
	//safe function to show an element with a specified id
	var x=document.getElementById(id + 'DD')
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (x!=null) x.style.display = 'block';
	} else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
	navRO(document.getElementById(id + 'Lnk'), temp);
}
function toggleOff(id, temp) {
	var x=document.getElementById(id + 'DD')
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (x!=null) x.style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
	navRO(document.getElementById(id + 'Lnk'), temp);
}

//All rollover states in javascript to work with IE6
function navRO(x, temp) {
	var bgColor, y, num;
	if(x.src.indexOf("_RO") > -1){
		x.src = x.src.replace("_RO","");
		bgColor = "#FFFFFF";
	} else {
		x.src = x.src.substring(0, x.src.lastIndexOf(".")) + "_RO" + x.src.substring(x.src.lastIndexOf("."))
		bgColor = (returnDocument() == "index.asp" || returnDocument() == "") ? "#222863" : "#EB8517" ;
	}
	
	y = temp.split(", ");
	for(num=0;num<y.length;num++){
		document.getElementById("imgdiv"+y[num]).style.backgroundColor = bgColor;
	}
}

function homeAdRO2(x) {
	if(x.src.indexOf("_RO") > -1){
		x.src = x.src.replace("_RO","");	
	} else {
		x.src = x.src.substring(0, x.src.lastIndexOf(".")) + "_RO" + x.src.substring(x.src.lastIndexOf("."))
	}
}

function homeAdRO(x, img, img2) {
   // x.src = img;
	
	//x.onmouseout = function() {
	//	x.src = img2;
	//}
}

function returnDocument() {
	var file_name = document.location.href;
	var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	file_name = file_name.substring(file_name.lastIndexOf("/")+1, end);
	return file_name.replace("#", "");
}
/**
function showImage(url){

	var JB_Overlay = document.getElementById('JB_Overlay')
	show(JB_Overlay);
	
	var JB_Window = document.getElementById('JB_Window')
	show(JB_Window);
	
	JB_Window.innerHTML ='';
	JB_Window.innerHTML +='<img src="' + url + '"/>';	
	var pSize = JB_getPageSize();

	var pScrollTop = JB_getPageScrollTop();
}

//window.onscroll = TB_position;

function show( obj ){
	obj.style.visibility = "visible";
	obj.style.display = "block";	
}

function hide( obj ){
	obj.style.visibility = "hidden";
	obj.style.display = "none";	
}

function JB_getPageScrollTop(){

	var yScrolltop;
	if (self.pageYOffset) {
		yScrolltop = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScrolltop = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScrolltop = document.body.scrollTop;
	}

	return yScrolltop;
}

function JB_getPageSize(){
	var w = window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;
	var h = window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;

	return {width:w, height:h};
}

function objWidth(objectID) 
{
    var obj = objectID
    if(obj.offsetWidth) 
        return  obj.offsetWidth; 
    
    if (obj.clip) 
        return obj.clip.width; 
    
    return 0;
}        

function objHeight(objectID) 
{
    var obj = objectID
    if(obj.offsetHeight) 
        return  obj.offsetHeight; 
    
    if (obj.clip) 
        return obj.clip.height; 
    
    return 0;
} 

function TB_position() {
	var JB_Overlay = document.getElementById('JB_Overlay')
	if (JB_Overlay != null){
	JB_Overlay.style.top = JB_getPageScrollTop() + 'px'; }
}

**/

function checkEmailInput(temp, x){
                if(temp=='focus'){if(x.value == "enter email address here"){x.value = "";}}
                else if(temp == 'blur'){if(x.value == ""){x.value = "enter email address here";}}
            }

function checkZipInput(temp, x){
                if(temp=='focus'){if(x.value == "Zip Code"){x.value = "";}}
                else if(temp == 'blur'){if(x.value == ""){x.value = "Zip Code";}}
            }