
function validateSearch(searchbox) {
    	//var val = document.forms[0].rslt_search.value;
	var val = document.getElementById(searchbox).value;
	//var val=searchbox.value
	if (val == "" || val == null)
	{
		alert("Please type the word or words you wish to search for in the search box.");
	} 
	else 
	{
		location.href = "/search.aspx?q=" + val;
	}
}

function RegUser()
{
    var fname=document.getElementById("firstName_FirstName").value;
    var lname=document.getElementById("lastName_LastName").value;
    var email=document.getElementById("email_signup_EmailAddress").value;

    var address1=document.getElementById("address1_Address1").value;

    var city=document.getElementById("city_City").value;
    var zipcode=document.getElementById("zipCode_ZipCode").value;
//    alert('here');
    var c = AjaxProxy.Subscribe(fname,lname, address1, city, zipcode, email);
    CommonUtil.SubmitForm(0);
}

function Email()
{
alert("hi");
}

function EmailUser()
{
    var sendername=document.getElementById("senderName_FirstName").value;
    var friendname=document.getElementById("friend_LastName").value;
    var senderemail=document.getElementById("email_sender_EmailAddress").value;
    var friendemail=document.getElementById("email_friend_EmailAddress").value;
    var c = AjaxProxy.SendEmail(sendername,friendname, senderemail, friendemail);
    Redirect(c.value,"E");
}


function Redirect(success,pagetype)
{
    if(success)
    {
        if(pagetype=="S") {AjaxProxy.Redirect('thanks-success.aspx');}
        if(pagetype=="E") {AjaxProxy.Redirect('tellresponse.aspx');}
    }
    else
    {
        AjaxProxy.Redirect('Error_500.aspx');
    }    
    CommonUtil.SubmitForm(0);
}

//place the ids of every element you want.
var ids=new Array('infokit_page1', 'thiscanbeanything');

function switchid(id){	
	hideallids();
	showdiv(id);
	//alert(id);
	return false;
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}