var onMouseOverImg = "../images/chevron_Wh_Tr_bkgd.gif";
var onMouseOutImg = "../images/chevron_Tr_bkgd1.gif";
var onMouseOutImg1 = "../images/chevron_Tr_bkgd1.gif";
var onMouseOverImg1 = "../images/chevron_Act_Wh_bkgd1.JPG"; //blue shevron on white background
var onMouseOutImg2 = "../images/chevron_Tr_bkgd1.gif";
var onMouseOverImg2 = "../images/chevron_Act_Wh_bkgd1.JPG"; //blue shevron on white background
var onMouseOverImg3 = "../images/chevron_Gr_Tr_bkgd.gif";
var onMouseOutImg5 = "../images/arrow_red.gif";           // using in announcement
var onMouseOverImg5 = "../images/arrowblue.gif";
var onMouseOutImg6 = "../images/casestudy_unselected.jpg";   // using in the casestudy icon in the left menu
var onMouseOverImg6 = "../images/casestudy_selected.gif"; 

function init()
{
	f_visibility("Left_Bar_tabline","hidden");
	f_visibility("Login_curve1","hidden");
	
	window.document.title ="CSDC Systems - AMANDA Enterprise Software for Government";
	if (window.document.getElementById("tabs"))
		window.document.all.tabs.innerHTML="";
	if (window.document.getElementById("breadCrumbs"))
		window.document.all.breadCrumbs.innerHTML="";
	if (window.document.getElementById("Body_LBar_pic"))
		window.document.all.Body_LBar_pic.innerHTML="";
	if (window.document.getElementById("Body_LBar_Mid"))
		window.document.all.Body_LBar_Mid.innerHTML="";
	if (window.document.getElementById("Login_curve1"))
		window.document.all.Login_curve1.innerHTML="";
	
	if (window.document.getElementById("theIframe")) {
		window.document.all.theIframe.style.position="absolute";
		window.document.all.theIframe.style.top="6px";
		window.document.all.theIframe.style.left="256px";
		var addr = window.document.all.theIframe.src;
		var indx = (addr.indexOf('support'));
		if (indx > -1) {
			window.document.all("logo").src = "images/BAN_mid_support.gif";
			window.document.all("menubar").style.width = "1004px";
			window.document.all.theIframe.style.height="472px";
			window.document.all.theIframe.style.width="748px";
			f_visibility("footer","hidden");
			window.document.all.footer.style.top="0px";
			window.document.all("leftCurve").src = "images/Left_Bar_short_support.gif";
			window.document.all("Login_curve1").innerHTML = "<img src='images/support.gif'/>";
		}
		else {
			if (window.document.getElementById("callout1")) window.document.all.callout1.innerHTML="";
			window.document.all("logo").src = "images/BAN_mid1.gif";
			window.document.all("leftCurve").src = "images/Left_Bar_short.gif";
			window.document.all.theIframe.style.height="539px";
			window.document.all.theIframe.style.width="767px";
			window.document.all("menubar").style.width = "1023px";
			f_visibility("footer","visible");
			window.document.all.footer.style.top="666px";
		}
	} else  {
		window.document.all("logo").src = "../images/BAN_mid1.gif";
		window.document.all("leftCurve").src = "../images/Left_Bar_short.gif"; 
		window.document.all("menubar").style.width = "1023px";
		f_visibility("footer","visible");
		window.document.all.footer.style.top="666px";

        }
}
function f_submit_iframe(argFileName){
	if (document.getElementById("theIframe")) 
		document.all('theIframe').src = argFileName;
}

function f_submit(argForm,argFileName){
	document.getElementById(argForm).action=argFileName;
	document.getElementById(argForm).submit();
}

function f_changeIframeStyle(){
  	window.document.all.theIframe.style.top="40px";
  	window.document.all.theIframe.style.height="508px";
}

function f_visibility(argAttr,argVisibility) {
	if (window.document.getElementById(argAttr))
		eval("window.document.all." + argAttr + ".style.visibility='" + argVisibility + "'");
}

function f_changeImg(argId,argSrc){
//alert(argSrc + '  ' + argId)
	document.getElementById(argId).src = argSrc;
}


function f_over(arg,argId1,argId2){
//alert('f_over - argId2 ' + argId2)
	if(arg == 1){
		document.getElementById(argId1).style.color = "#FFFFFF";
		f_changeImg(argId2,onMouseOverImg);	
	}
	else if(arg == 2)
		document.getElementById(argId1).style.color = "#0099FF";
	else if(arg == 3) {
		document.getElementById(argId1).style.color = "#0099FF";
		f_changeImg(argId2,onMouseOverImg1);	
	}
	else if(arg == 4) {
		document.getElementById(argId1).style.color = "#0099FF";
		f_changeImg(argId2,onMouseOverImg2);	
	}
	else if(arg == 5) {
		document.getElementById(argId1).style.color = "#FFFFFF";
		f_changeImg(argId2,onMouseOverImg5);	
	}
	else if(arg == 6) {
		document.getElementById(argId1).style.color = "#FFFFFF";
		f_changeImg(argId2,onMouseOverImg6);	
	}
}

function f_out(arg,argId1,argId2){
	if(arg == 1){
		document.getElementById(argId1).style.color = "#5B5C5D";
		f_changeImg(argId2,onMouseOutImg);	
	}
	else if (arg == 2) 
		document.getElementById(argId1).style.color = "#5B5C5D";
	else if(arg == 3) {
		document.getElementById(argId1).style.color = "#5B5C5D";
		f_changeImg(argId2,onMouseOutImg1);	
	}
	else if(arg == 4) {
		document.getElementById(argId1).style.color = "#5B5C5D";
		f_changeImg(argId2,onMouseOutImg2);	
	}
	else if(arg == 5) {
		document.getElementById(argId1).style.color = "#5B5C5D";
		f_changeImg(argId2,onMouseOutImg5);	
	}
	else if(arg == 6) {
		document.getElementById(argId1).style.color = "#000066";
		f_changeImg(argId2,onMouseOutImg6);	
	}
}

function f_href(argGo){
	window.location.href = argGo;
}

function checkEnter(e){
	var key=e.keyCode || e.which;
	if (key==13) f_submit("searcharea","http://www.google.com/custom");
}

function to(address) { 
   window.location.replace('mailto:' + address + '@csdcsystems.com'); 
} 