		function changeDSearch(p_DSVal) {
			if (p_DSVal == "over") {
				document.getElementById("idsearch_sdiv").className = "dsearch_sdiv_hover";
				document.getElementById("search_ddown").style.display = "";
			} else {
				document.getElementById("idsearch_sdiv").className = "dsearch_sdiv";
				document.getElementById("search_ddown").style.display = "none";
			}
		}
		function selectSDDown(p_SDDVal) {
			if (p_SDDVal == 1) {
				document.getElementById("search_ddown_opt_dns").className = "search_ddown_opt_hglt";
				document.getElementById("search_ddown_opt_hcs").className = "search_ddown_opt_clr";
			} else if (p_SDDVal == 2) {
				document.getElementById("search_ddown_opt_hcs").className = "search_ddown_opt_hglt";
				document.getElementById("search_ddown_opt_dns").className = "search_ddown_opt_clr";
			}
		}


			if (agt.indexOf("msie")!=-1) {
				if (agt.indexOf("msie 6")!=-1) {
					document.getElementById("search_ddown").style.left = "808px";
				} else {
					document.getElementById("search_ddown").style.left = "806px";
				}
			} else if (agt.indexOf("safari")!=-1) {
				// place the left for the search drop down
				//document.getElementById("search_ddown").style.left = "936px";
			} else if (agt.indexOf("opera")!=-1) {
				//document.getElementById("search_ddown").style.left = "932px";
			}


function pchj_domain(searchValue)
{
	var canSubmit = false;
	if (searchValue != '')
	{
		var regExInvalidChars = /[^a-zA-Z0-9-\s.]+/;
		if (regExInvalidChars.test(searchValue))
		{
			alert('Invalid character in domain.\n\nOnly letters, numbers or hyphens are allowed.')
		}
		else
		{
		canSubmit = true;
		}
	}
	else
	{
		alert('Please enter a domain name.')
	}
	if (canSubmit) 
	{
		return true;
	}
	else
	{
		return false;
	}
}
function pchj_state(isnow)
{
var was = document.getElementById('pch_active_search').value;
document.getElementById('pch_active_search').value = isnow;
var txt = document.getElementById('searchField');
txt.focus();
}
function pchj_search(ev){	
	var frm; var okSubmit = true;
  if(document.pchFS){frm = document.pchFS;} else {frm = document.forms[0];}
  var pc_opt = frm.pch_active_search.value;
  var pc_action = frm.elements[pc_opt+'_action'].value;
  var pc_field = frm.elements[pc_opt+'_field'].value;
  var pc_value = frm.searchField.value;
  if(frm.elements[pc_field]){frm.elements[pc_field].value=pc_value;}
  else{frm.searchField.name = pc_field;}
  if(pc_opt=='pch_sdomain') {if (!pchj_domain(pc_value)){okSubmit = false; frm.searchField.value='';}}
  if(pc_opt=='pch_swhois') {if (!pchj_domain(pc_value)){okSubmit = false; frm.searchField.value='';}}
  if(pc_opt=='pch_ssite') {if (!pchj_site(pc_value)){okSubmit = false; frm.searchField.value='';}}
  if(pc_opt=='pch_shelp') {
	if (agt.indexOf("msie 7")!=-1) {
		window.location = pc_action+'&'+pc_field+'='+pc_value;
	} else {
		var win=window.open(pc_action+'&'+pc_field+'='+pc_value, '_pch_help', 'left=10,bottom=10,resizable=yes,scrollbars=yes,width=800,height=500');
		if (win){win.focus();}
		document.getElementById('pch_active_text').value='Help Center Search';
	}
	okSubmit = false;
  } else {frm.target='_self'; frm.method = 'POST';}
  if (okSubmit){
		if (frm.__VIEWSTATE){frm.__VIEWSTATE.name = 'NOVIEWSTATE';}
		frm.action = pc_action; frm.submit();
  }
  return pchj_cancelEvent(ev);
}
function pchj_cancelEvent(ev) {
  if (!ev) return false;
  ev.returnValue = false;
  ev.cancelBubble = true;
  if (ev.stopPropagation) ev.stopPropagation();
  if (ev.preventDefault) ev.preventDefault();
  return false;
}

