
function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}


var Color= new Array();
	Color[1] = "#ffffff";
	Color[2] = "#cccccc";
	Color[3] = "#999999";
	Color[4] = "#666666";
	Color[5] = "#333333";
	Color[6] = "#330000";
	Color[7] = "#ff0000";

function waittofade() {
    setTimeout("fadeIn(7)", 1000);
}

function fadeIn(where) {
    if (where >= 1) {
        document.getElementById('fade').style.backgroundColor = Color[where];
        where -= 1;
        setTimeout("fadeIn("+where+")", 200);
    }
}

function divswap(){ 
//var one=document.getElementById("header_image"); 
var two=document.getElementById("header_flip"); 
//one.style.visibility="hidden"; 
two.style.visibility="visible"; 
} 
function divback(){ 
//var one=document.getElementById("header_image"); 
var two=document.getElementById("header_flip"); 
//one.style.visibility="visible"; 
two.style.visibility="hidden"; 
} 

function ClearMessage() {
if (document.ThisForm.Request.value == 'Enter your message here.') {
	document.ThisForm.Request.value = ""
}
}

function OpenDisplay() {
    setTimeout("showhide('ContentBoxes')", 1000);
}

imgout=new Image(9,9);
imgin=new Image(9,9);

/////////////////BEGIN USER EDITABLE///////////////////////////////
	imgout.src="/gfx_shared/u.gif";
	imgin.src="/gfx_shared/d.gif";
///////////////END USER EDITABLE///////////////////////////////////

//this switches expand collapse icons
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

//show OR hide funtion depends on if element is shown or hidden
function shoh(id) { 
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			//filter(("img"+id),'imgin');			
		} else {
			//filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				//filter(("img"+id),'imgin');
			} else {
				//filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				//filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}

function showhide(thisname) { 
	var j=document.getElementsByName(thisname);
	for(var i=0;i<j.length;i++)
	{
		if (document.getElementsByName) 
			{ // DOM3 = IE5, NS6
				if (j[i].style.display == "none")
				{
		 			j[i].style.display = 'block';
					//filter(("img"+id),'imgin');			
				} 
				else 
				{
					//filter(("img"+id),'imgout');
		 			j[i].style.display = 'none';
							
				}	
		} else { 
			if (document.layers) {	
				if (j[i].display == "none"){
	 				j[i].display = 'block';
					//filter(("img"+id),'imgin');
				} else {
					//filter(("img"+id),'imgout');	
	 				j[i].display = 'none';
				}
			} else {
				if (j[i].style.visibility == "none"){
	 				j[i].style.display = 'block';
				} else {
					//filter(("img"+id),'imgout');
	 				j[i].style.display = 'none';
				}
			}
		}
	}
}

