// Begin Page Initialization

function onPageStart() {
	regenerate4();
	
	if(document.getElementById){
		if(!document.all){
			initialize_dom_features_scroll();
		}
	}
}

// End Page Initialization

//Gegin text search check
function chkSearch()
{
	if(document.forms.frmsearch.searchnan.value != "")
	{
		document.forms.frmsearch.submit();					
	}
	else
	{
		alert("Please enter text to be searched!");			
	}
}
//End text search check


// Begin Rollover Effects

function act(imgName) {
	if (document.images)
		document[imgName].src = eval(imgName + "on.src");
}

function inact(imgName) {
	if (document.images)
		document[imgName].src = eval(imgName + "off.src");
}

function actmultiroll(imgName1,imgSrc) {
	act(imgName1);
	document.rollover.src = imgSrc;
}

function inactmultiroll(imgName1,imgSrc) {
	inact(imgName1);
	document.rollover.src = imgSrc;
}

// End Rollover Effects



// Begin Pop Up Window Effects

function popUp(url) 
{
	window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=900');
	self.name = "mainWin"; 
}

function launch(newURL, newName, newFeatures, orgName) {
	var remote = open(newURL, newName, newFeatures);
	if (remote.opener == null)
		{	remote.opener = window;
			remote.opener.name = orgName;
			return remote;
		}
}

// End Pop Up Window Effects



// Begin New wc3 DOM News Scroller Code

//Specify the marquee's width (in pixels)
var marqueewidth2=359
//Specify the marquee's height
var marqueeheight2=44
//Specify the marquee's scroll speed2 (larger is faster)
var speed2=1
//Specify the marquee contents
var feature_pos1;
var feature_pos = marqueeheight2 + 5; // initial offset of <DIV> at start of each loop, relies on marqueeheight2 from above
var feature_myspeed=2; // higher is faster
var feature_scroll_over = 0;
var feature_max_neg;  // this is now based on the height of the content

function regenerate3(){
	window.location.reload()
}
function regenerate4(){
	if (document.layers){
		setTimeout("window.onresize=regenerate3",450)
		intializemarquee2()
	}
}

function intializemarquee2(){
	document.cmarquee03.document.cmarquee04.document.write(marqueecontents2)
	document.cmarquee03.document.cmarquee04.document.close()
	thelength2=document.cmarquee03.document.cmarquee04.document.height
	scrollit2()
}

function pause_ns4_FoW_scroll() {
	if(feature_scroll_over == 1){
		window.setTimeout("pause_ns4_FoW_scroll();",200);
	}else{
		scrollit2();
	}
}

function scrollit2(){
	if (document.cmarquee03.document.cmarquee04.top>=thelength2*(-1)){
		if(feature_scroll_over == 1){ 
	    	pause_ns4_FoW_scroll(); 
		}else{
			document.cmarquee03.document.cmarquee04.top-=speed2
			window.setTimeout("scrollit2()",100)
		}
	}else{
		document.cmarquee03.document.cmarquee04.top=marqueeheight2
		scrollit2()
	}
}

function initialize_dom_features_scroll() {
   feature_pos1 = feature_pos;
   document.getElementById("domFeatureDiv").style.visibility = "visible";
   dom_features_scroll();
}

function pause_dom_features_scroll() {
   if(feature_scroll_over == 1){
      window.setTimeout("pause_dom_features_scroll();",200);
   }else{
      dom_features_scroll();
   }
}

function dom_features_scroll() {
	feature_pos1 -= feature_myspeed;
	if( feature_pos1 <= feature_max_neg) feature_pos1 = feature_pos;
	feature_pos1px = feature_pos1+"px";
	document.getElementById("domFeatureDiv").style.top = feature_pos1px;
	if(feature_scroll_over == 1){ 
		pause_dom_features_scroll(); 
	}else{
		window.setTimeout("dom_features_scroll();",150);
	}
}

// End New wc3 DOM News Scroller Code

window.onload = onPageStart;
