﻿function advanceSearch()
{window.location = "AdvanceSearch.aspx";}
function CheckEnterKey(e,obj)
{
if(e.keyCode == 13)
{		 
CheckSearch(obj);
return false;
}
else
{
return true;
}
}
function CheckSearch(objText)
{

var strTestEmpty = objText.value.replace(/ /g,"");

if(strTestEmpty.length < 3)
{
alert("Please enter at least three characters");
return false;
}
else
{
var strKeyword = objText.value
strKeyword = strKeyword.replace(/</g,"")
strKeyword = strKeyword.replace(/>/g,"")
window.location ="search.aspx?keywords=" + escape(strKeyword); 
}
}
// JScript File
var strEmailRegExp= "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$";
var strNonWhiteSpace= "\\S";
function IsEmpty(objTarget)
{
var strValue= objTarget.value;    
if (strValue == null || ! strValue.length)
return true;    
// Find any non white-space character 
if( ! IsMatched(strValue, strNonWhiteSpace, false) )
return true;       
return false;
}
function IsMatched(strTarget, strRegExp, bolCaseSensitive)
{
var objRe= null;    
if( bolCaseSensitive )
objRe=new RegExp(strRegExp);
else
objRe= new RegExp(strRegExp, "i");
return objRe.test(strTarget);
}
function IsValidEmail(strTarget)
{
return IsMatched(strTarget, strEmailRegExp, false);
}
function GotoTop(topLink)
{
var vHeight = 0;
if (document.all) {

if (document.documentElement) {
vHeight = document.documentElement.clientHeight;
} 
else {
vHeight = document.body.clientHeight
}
} else {
vHeight = window.innerHeight;
}
if (document.body.offsetHeight > vHeight) {
document.getElementById("divTop").innerHTML= topLink;
}
}


 
