  
  
//  function keyhandler(){
//    if(window.event.keyCode==13){
//      return false;
//    }
//    return true;
//  }
  //document.onkeydown=keyhandler;

function disableButtons() {
    var theForm = document.forms['aspnetForm'];
    if (!theForm) {
        theForm = document.aspnetForm;
    }
    //alert(theForm.elements.length);
    for (var i = 0; i < theForm.elements.length; i++) {
        if (theForm.elements[i].type.toLowerCase() == "submit") {
            theForm.elements[i].style.visibility = "hidden";
            //theForm.elements[i].disabled = true;
            //alert(theForm.elements[i].value);
        }
    }
    return true;
}

var urlAddress = "http://www.hypercables.com/";
var pageName = "HyperCables.com - Cables and Adapters";
function addToFavorites() {
    if (window.external) {
        window.external.AddFavorite(urlAddress, pageName)
    } else {
        alert("Sorry! Your browser doesn't support this function.");
    }
}



	function hideimage(id){
		document.getElementById(id).style.visibility = "hidden";
	}
	
	function showimage(id){
		document.getElementById(id).style.visibility = "visible";
	}
	
  function toggleMsg(spanID){
    var elem = document.getElementById(spanID);
    if(elem.style.visibility=="hidden"){
      elem.style.position = "relative";
      elem.style.visibility = "visible";
    }else{
      elem.style.visibility = "hidden";
      elem.style.position = "absolute";
    }
  }
  
  function ClientValidateSpecialRequest(sender, args){
    if(args.Value.length > 255)
      args.IsValid = false;
    else
      args.IsValid = true;
  }
  
  function ClientValidateComment(sender, args){
    if(args.Value.length > 2000)
      args.IsValid = false;
    else
      args.IsValid = true;
  }
  
