var arrImg = new Array(
 "/img/head/board_finance-over.gif",
 "/img/head/cd_program-over.gif",
 "/img/head/hot_topics-over.gif",
 "/img/head/links_other_sites-over.gif",
 "/img/head/other_state_treasurers-over.gif",
 "/img/head/press_releases-over.gif",
 "/img/head/public_deposit_protection-over.gif",
 //"/img/head/staff_page-over.gif",
 "/img/head/state_investment_council-over.gif",
 "/img/head/unclaimed_property_page-over.gif",
 "/img/head/upp/search_claim-over.gif",
 "/img/head/upp/holder_reporting_information-over.gif",
 "/img/head/frequently_asked_questions-over.gif"
);

var img;
for( cnt = 0; cnt < arrImg.length; cnt++ ){
 img = new Image();
 img.src = arrImg[ cnt ];
}

function f_AHref( a_href ) {
 window.open( a_href );
 //return false;
}

function f_AImg( a ) {
 if( document.images ) {
  img = a.lastChild;
  if( img.src.indexOf( "-over.gif" ) == -1 ) {
   img.src = img.src.replace( ".gif", "-over.gif" );
  } else {
   img.src = img.src.replace( "-over.gif", ".gif" );
  }
 }
}

function YesGoClaim () {
	//alert('I have been clicked.');
	location.href = "?page=unclaimed_property_pageTMP&amp;section=show_claimform"
	}	




function f_FormSelectedOptionText( id ) {
 if( obj = document.getElementById( id ) ) {
  document.write( obj.options[ obj.selectedIndex ].text );
 }
}

function f_FormRequiredValue( id ) {
 if( obj = document.getElementById( id ) ) {
  if( obj.value.replace( / /g, "" ).length == 0 ) {
   window.alert( "Please enter a value for the required field." );
   obj.focus();
   return false;
  } else {
   return true;
  }
 }
}

function f_FormRequiredStateClaimInquiry () {





}

function f_Print( id ) {
 var sTITLE, sHTML;
 sTITLE = document.title;
 sHTML = document.getElementById( id ).innerHTML;
 sHTML = sHTML.replace( /<br>/g, "<br />" );
 win = window.open();
 win.document.open( "text/html" );
 win.document.write( "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" + "\n" +
  "<html xmlns=\"http://www.w3.org/1999/xhtml\">" + "\n" +
  "<head>" + "\n\n" +
  "<title>" + sTITLE + "</title>" + "\n" +
  "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" + "\n" +
  "<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />" + "\n" +
  "<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />" + "\n" +
  "<script type=\"text/javascript\" src=\"/script/default.jvs\"></script>" + "\n" +
  "<link rel=\"stylesheet\" href=\"/style/default.css\" />" + "\n\n" +
  "</head>" + "\n" +
  "<body class=\"print\">" + "\n\n" +
  "<div> " + "\n" +
  sHTML + "\n" +
  "</div>" + "\n\n" +
  "</body>" + "\n" +
  "</html>" );
 win.document.close();
}

function validateClaimForm() {
	var form = document.StateClaimInquiry;
	if(form.Lname.value=="" || form.Address1.value=="" || form.City.value=="" || form.State.value=="" || form.Zipcode.value=="" || form.Country.value=="" || form.Relation.value=="" || form.Taxid.value=="") {
		alert("Required fields are missing");
		return false;
	}

	if(form.Email.value != "") {
		if(form.Email.value != form.Emailagain.value) {
			alert("Email and Confirmation Email do not agree");
			return false;
		}
	}
				
	return true;
}

function validateExportForm() {
	var form = document.ExportForm;
	if(form.FromDate.value=="" || form.ThroughDate.value=="") {
		alert("Required fields are missing");
		return false;
	}
				
	return true;
}


function GiveSecurityMessage() {

	alert("You are now continuing to be in a secure area of the website.");
	return true;

}


function validateEmailFriend() {
	var form = document.SendToFriend;
	if(form.YourName.value=="" || form.YourEmail.value=="" || form.FriendEmail.value=="" || form.YourMessage.value=="") {
		alert("Required fields are missing");
		return false;
	}
				
	return true;
}

function expTxt(id){
doc.getElementById(id+"_Expand").style.display="inline";
doc.getElementById(id+"_Colapse").style.display="none";
}
