function s_show(){return false}
function s_hide(){return false}
if(window.event+''=='undefined')event=0



function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 


function targetopener(mylink, closeme, closeonly)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
if (! closeonly)window.opener.location.href=mylink.href;
if (closeme)window.close();
return false;
}




function iFrameHeight(obj) {
  aID = obj.id;

  // if contentDocument exists, W3C compliant (Mozilla)
  if (document.getElementById(aID).contentDocument){
     obj.height = document.getElementById(aID).contentDocument.body.scrollHeight;
  } else {
   // IE
     obj.style.height = document.frames[aID].document.body.scrollHeight;
  }
}





function notValidEmail( str ){
    mailRE = new RegExp( );
    mailRE.compile( '^[._a-z0-9-]+@[.a-z0-9-]+[.]{1}[a-z]{2,4}$', 'gi' );
    return !(mailRE.test( str.value ));
}



function validateAform(Aform) {

	if (Aform.contactname.value == "") {
	alert("The following field is incomplete;\n\n#1. Contact Name / Borrower") ;
	return false ;
	}


	if (!Aform.borrowtype[0].checked && !Aform.borrowtype[1].checked && !Aform.borrowtype[2].checked && !Aform.borrowtype[3].checked && !Aform.borrowtype[4].checked) {
	alert("The following field is incomplete;\n\n#2. I am the") ;
	return false ;
	}

	if (Aform.contactphone.value == "") {
	alert("The following field is incomplete;\n\n#3. Contact Phone Number") ;
	return false ;
	}


	if( notValidEmail( Aform.contactemail ) ){
	alert("The following field is invalid;\n\n#4. Contact E-mail Address") ;
	return false;
	}


	if (!Aform.transactionpurpose[0].checked && !Aform.transactionpurpose[1].checked && !Aform.transactionpurpose[2].checked && !Aform.transactionpurpose[3].checked && !Aform.transactionpurpose[4].checked && !Aform.transactionpurpose[5].checked && !Aform.transactionpurpose[6].checked) {
	alert("The following field is incomplete;\n\n#7. Purpose of Transaction") ;
	return false ;
	}


	if (!Aform.transactiontype[0].checked && !Aform.transactiontype[1].checked) {
	alert("The following field is incomplete;\n\n#8. Type of Transaction") ;
	return false ;
	}



	if (!Aform.indexperience[0].checked && !Aform.indexperience[1].checked) {
	alert("The following field is incomplete;\n\n#69. Minimum three years direct industry experience") ;
	return false ;
	}

	if (!Aform.personalcredit[0].checked && !Aform.personalcredit[1].checked && !Aform.personalcredit[2].checked && !Aform.personalcredit[3].checked) {
	alert("The following field is incomplete;\n\n#71. Personal Credit") ;
	return false ;
	}
	if (!Aform.facility[0].checked && !Aform.facility[1].checked && !Aform.facility[2].checked && !Aform.facility[3].checked && !Aform.facility[4].checked && !Aform.facility[5].checked && !Aform.facility[6].checked) {
	alert("The following field is incomplete;\n\n#80. Type of facility") ;
	return false ;
	}



	
	if (Aform.capcha.value == "") {
	alert("The following field is incomplete;\n\nHuman validation code") ;
	return false ;
	}

	else {
	return true ;
       }
}
