function validateContact(){
	var objForm = document.frmContact;
	var sErr = "The following errors have been detected:";
	var bOK = true;
	if(objForm.name.value == ""){
		sErr = sErr + "\n* your name can not be blank!";
		bOK = false;
	}
	
	if(objForm.email.value == ""){
		sErr = sErr + "\n* your email can not be blank!";
		bOK = false;
	}
	
	if(objForm.phone.value == ""){
		sErr = sErr + "\n* your phone number can not be blank!";
		bOK = false;
	}
	
	if(objForm.message.value == ""){
		sErr = sErr + "\n* message can not be blank!";
		bOK = false;
	}
	
	if(bOK == false){
		alert(sErr);
	}
	return bOK;
}

function openCloseDiv(sDivID, sTag, sHtmlOpen, sHtmlClose){
    var div = document.getElementById(sDivID);
    var a = document.getElementById(sTag);
    if(div.style.display == "none"){
        div.style.display = "block";
        sTag.innerHTML = sHtmlClose;
    }else{
        div.style.display = "none";
        sTag.innerHTML = sHtmlOpen;
    }
}

function fnTrapKDL(btn, event){
    fnTrapKD(btn, event);
}

function fnTrapKD(btn, event){
    if (document.all){
        if (event.keyCode == 13){
            FirePostBack(btn, event);
        }
    }else if (document.getElementById){
        if (event.which == 13){
            FirePostBack(btn, event);
        }
    }else if(document.layers){
        if(event.which == 13){
            FirePostBack(btn, event);
        }
    }
}
 
 function FirePostBack(btn, event){
    event.returnValue=false;
    event.cancel = true;
    var postbackid = btn;
    while (postbackid.indexOf('_') > -1)
    {
        postbackid = postbackid.replace('_', '$');
    }
    __doPostBack(postbackid,'');
}

function bookmark(url, description){
    if (url == null) { // if description is not passed then default to page title
        url = window.location.href;
    }
    if (description == null) { // if description is not passed then default to page title
        description = document.title;
    }
    if (document.all){ // Test If: Internet Explorer
    	window.external.AddFavorite(url, description); // AddFavorite is IE specific
    }
    else if (window.sidebar){ // Test If: Mozilla, Netscape, or FireFox
    	window.sidebar.addPanel(description, url, ""); // sidebar.addPanel is Mozilla specific
    }
    else { // If all others
    	window.alert("Press CTRL+T to bookmark this page"); // CTRL + T typically for Opera and other browsers
    }
}

