////////////////// Common functions ///////////////////
function num()
{if(event.keyCode<46 || event.keyCode>57) event.returnValue=false;}

function ConfirmDelete()
{var ok = confirm("Are you sure you want to permanently delete this item?\nThe item will not able to be restore once you delete it.");if(ok)return true;else return false;}

function ConfirmLogout()
{var ok = confirm("Are you sure you want to logout?");if(ok){return true;}else return false;}
////////////////// secure https ///////////////////
function secureURL(page)
{if(location.protocol=="http:"){window.location="https://www.netx1.com/"+page+"";}}
////////////////// Administrator Functions ///////////////////
function CHKSearch(f)
{
var DOMSTAT=0;
var max1=search.domstat.length;
for(var idx1=0;idx1<max1;idx1++)
{if(eval("document.search.domstat["+idx1+"].checked")==true){DOMSTAT+=1;}}

var SRVSTAT=0;
var max1=search.srvstat.length;
for(var idx1=0;idx1<max1;idx1++)
{if(eval("document.search.srvstat["+idx1+"].checked")==true){SRVSTAT+=1;}}

if(f.CID.value=="" && f.companyname.value=="" && f.Rcontactperson.value=="" && f.domainname.value=="" && f.RID.value=="" && f.PID.value=="" && DOMSTAT==0 && SRVSTAT==0){return false;}return true;
}

function CHKquicksearch(f)
{if(f.domainname.value==""){return false;}return true;}

function CHKaddkeyword(f)
{if(f.strKeyword.value==""){return false;}return true;}

function CHKSearchInvoice(f)
{if(f.invoice.value=="" && f.hostingplan.value=="" && f.domainname.value=="" && f.Rcontactperson.value=="" && f.Rcompanyname.value=="" && f.Rcompanyaddress.value==""){return false;}return true;}

function del(f,ID)
{if(f.keyCode==46){var ok = confirm("Are you sure you want to permanently delete this item?\nThe item will not able to be restore once you delete it.");if(ok){window.location='keywords.asp?act=del&id='+ID+'';return true;}else return false;}}