function doValidation(myForm){
if(myForm=="searchFormAdmin"){var myFormName = document.searchFormAdmin.JobID}
if(myForm=="searchFormAdmin"){var myFormName = document.searchFormAdmin.UserID}
if(myForm=="searchForm"){var myFormName = document.searchForm.UserID}
}

/*var message="This site has been copyright protected.";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")
*/

var win= null;
function popupCenter(mypage,myname,scroll,resize,status){
var w = 330;
var h = 350;
var winl = (screen.width-w)/2;
var wint = 0;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable='+resize+',';
settings +='menubar=no';
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function Validate_CompanyInfo() {

	var msg;
	msg = "\n";


	if (document.CompanyInfo.companyName.value == "") {			
        msg = msg + "Please enter your Company Name.\n";
    }

	if (document.CompanyInfo.companyABN.value == "") {			
        msg = msg + "Please enter your ACN Number.\n";
    }

	if (document.CompanyInfo.companyABN.value == "") {			
        msg = msg + "Please enter your ABN Number.\n";
    }
	
	if (document.CompanyInfo.companyAddress.value == "") {			
        msg = msg + "Please enter your Company Address.\n";
    }
	
    if (document.CompanyInfo.companyEmail.value == "") { 
      msg = msg + "Please enter your Company Email Address.\n";
    }	    
	
	if (-1 == document.CompanyInfo.companyEmail.value.indexOf("@")) {
       msg = msg + "Your Company Email Address must have a '@' in the Address.\n"; 
    }
	
    if (-1 == document.CompanyInfo.companyEmail.value.indexOf(".")) { 
       msg = msg + "Your Company Email Address must contain a '.' in the Address.\n";
    }
		
	if (document.CompanyInfo.companyAccountName.value == "") {			
        msg = msg + "Please enter your Account Name.\n";
    }
	
	if (document.CompanyInfo.companyBSB.value == "") {
        msg = msg + "Please enter your BSB Number.\n";
    }
	
	if (document.CompanyInfo.companyACC.value == "") {
        msg = msg + "Please enter your Account Number.\n";
    }
	
	if (document.CompanyInfo.companyConditions.value == "") {
        msg = msg + "Please enter your conditions.\n";
    }

	if (msg != "\n")   {
        alert(msg);
        return false;
    }
}

function wClose(){
	window.close();
	window.opener.location.reload(true);
}