//var menu1=new Array()
//menu1[0]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="index.html">&nbsp;Main Page</a></td>  </tr>  </table>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Sample Link Number 1</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu2[1]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Sample Link Number 2</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu2[2]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Sample Link Number 3</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu2[3]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Sample Link Number 4</a></td>  </tr>  </table>'
		
var menu3=new Array()
menu3[0]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Consulting on hardware & &nbsp;software selection</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu3[1]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Custom designed hardware &nbsp;design and building</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu3[2]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;PC & MAC support for home &nbsp;and business users</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu3[3]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Small office networking and &nbsp;support</a></td>  </tr>  </table>'

var menu4=new Array()
menu4[0]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Small business websites & &nbsp;E-Mail</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu4[1]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Database driven websites for &nbsp;all applications</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu4[2]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Web site development for <br>&nbsp;E-Commerce applications</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu4[3]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Process management &nbsp;website development</a></td>  </tr>  </table>'

var menu5=new Array()
menu5[0]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Web site hosting</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu5[1]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Complete site design</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu5[2]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Web site management</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu5[3]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;E-Commerce solutions</a></td>  </tr>  </table>'

var menu6=new Array()
menu6[0]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Consulting on E-Commerce</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu6[1]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Taking your business to the &nbsp;&nbsp;Web</a></td>  </tr>  <tr bgcolor="#045D82"><td><img src="images/spc.gif" width="1" height="1"></td>  </tr></table>'
menu6[2]=' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="#">&nbsp;Order fulfillment services</a></td>  </tr>  </table>'

var menuwidth='165px' //default menu width
var menubgcolor='#F1FBFF'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all
 
if (ie4||ns6)
document.write('<div id="dropmenudiv" class="mLink3" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+(obj.offsetHeight+2)+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu




///////////////////////////////////////////////// FORM VALIDATION \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

function printDoc()
{
	print(document);
}

function fMailCheck(form)
{
	if( form.txtTo.value == '' )
	{
		alert("Please enter atleast one email address to send email. Use ',' for multiples.");
		form.txtTo.focus();
	}
	else
		form.submit();
}

function fCheckAll(pform)
{
	var ml = pform;
	var len = ml.elements.length;
	if (ml.toggleAll.checked == true)
	{
			for (var i = 0; i < len; i++) 
			{
				   var e = ml.elements[i];
					e.checked = true;
			}
	}
	else 
	{
			for (var i = 0; i < len; i++) 
			{
				   var e = ml.elements[i];
					e.checked = false;
			}
	 }
}

	function fValidatField(tform)
	{
		if(tform.textCompanyName.value == "" )
		{
			alert("Company Name can not be left empty.");
			tform.textCompanyName.focus();
		}
		else if( tform.textName.value == "" )
		{
			alert("Contact Name can not be left empty.");
			tform.textName.focus();
		}
		else if( tform.textPhone1.value == "" )
		{
			alert("Phone Number can not be left empty");
			tform.textPhone1.focus();
		}
		else if(isNaN(tform.textPhone1.value)) 
		{
			alert("Please enter a valid Phone Number");
			tform.textPhone1.focus();
		}
		else if( tform.textPhone2.value == "" )
		{
			alert("Phone Number can not be left empty");
			tform.textPhone2.focus();
		}
		else if(isNaN(tform.textPhone2.value)) 
		{
			alert("Please enter a valid Phone Number");
			tform.textPhone2.focus();
		}
		else if( tform.textPhone3.value == "" )
		{
			alert("Phone Number can not be left empty");
			tform.textPhone3.focus();
		}
		else if(isNaN(tform.textPhone3.value)) 
		{
			alert("Please enter a valid Phone Number");
			tform.textPhone3.focus();
		}
		
		
		
		else if(tform.textEmail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.textEmail.focus();
		}
		else if( (tform.textEmail.value.indexOf(".") == -1) || (tform.textEmail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.textEmail.focus();
		}
		else if(tform.textItem.value == "" )
		{
			alert("Item Number can not be left empty.");
			tform.textItem.focus();
		}
		else if(isNaN(tform.textItem.value)) 
		{
			alert("Please enter a valid Item Number");
			tform.textItem.focus();
		}
		else if( tform.services.value == "0" )
		{
			alert("Services can not be left empty.");
			tform.services.focus();
		}
		else if(tform.textComments.value == "" )
		{
			alert("Comments can not be left empty.");
			tform.textComments.focus();
		}
		else if( tform.textBName.value == "" )
		{
			alert("Business Name can not be left empty.");
			tform.textBName.focus();
		}
		else if( tform.selBType.value == "" )
		{
			alert("Business Type can not be left empty");
			tform.selBType.focus();
		}
		else if(tform.txtadd1.value == "" )
		{
			alert("Address can not be left empty");
			tform.txtadd1.focus();
		}
		else if(tform.txtcity.value == "" )
		{
			alert("City can not be left empty");
			tform.txtcity.focus();
		}
		else if(tform.txtstate.value == "" )
		{
			alert("State can not be left empty.");
			tform.txtstate.focus();
		}
		else if(tform.txtzip.value == "" )
		{
			alert("Zip can not be left empty.");
			tform.txtzip.focus();
		}
		else if(isNaN(tform.txtzip.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtzip.focus();
		}
		else if(tform.txtphone.value == "" )
		{
			alert( "Phone Number can not be left empty." );
			tform.txtphone.focus();
		}
			else if(isNaN(tform.txtphone.value))
		{
			alert("Please enter a valid Telephone Number");
			tform.txtphone.focus();
		}
		else if(tform.txtfname.value == "" )
		{
			alert("First Name can not be left empty.");
			tform.txtfname.focus();
		}
		
		else if(tform.txtlname.value == "" )
		{
			alert("Last Name can not be left empty.");
			tform.txtlname.focus();
		}
		else if(tform.txtemail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.txtemail.focus();
		}
		else if( (tform.txtemail.value.indexOf(".") == -1) || (tform.txtemail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.txtemail.focus();
		}
		
		
		else if( tform.txtuser.value == "" )
		{
			alert("User ID can not be left empty.");
			tform.txtuser.focus();
		}
		else if( tform.txtuser.value.length < 6 )
		{
			alert("User ID must be six characters alphanumeric or more ");
			tform.txtuser.focus();
		}
		else if( tform.txtpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtpass.focus();
		}
		else if( tform.txtpass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtpass.focus();
		}
		else if( tform.txtpass2.value != tform.txtpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtpass2.focus();
		}
		else if( tform.SecretQuestion.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.SecretQuestion.focus();
		}
		else if( tform.txtres.value == "" )
		{
			alert("Response field can not be left empty.");
			tform.txtres.focus();
		}
		else if( tform.txtczip.value == "" )
		{
			alert("Zip can not be left empty.");
			tform.txtczip.focus();
		}
		else if(isNaN(tform.txtczip.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtczip.focus();
		}
		else if( tform.selCountry.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.selCountry.focus();
		}
		else{
			tform.submit();
	}
}


function fValidatFieldPassword(tform)
{
		
		if( tform.txtnpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtnpass.focus();
		}
		else if( tform.txtnpass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtnpass.focus();
		}
		else if( tform.txtnpass2.value != tform.txtnpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtnpass2.focus();
		}
		else{
			tform.submit();
	}
}


function fValidatFieldPassword22(tform)
{
		
		if( tform.txtfuser.value == "" )
		{
			alert("User ID can not be left empty.");
			tform.txtfuser.focus();
		}
		else if( tform.selfquestion.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.selfquestion.focus();
		}
		else if( tform.txtfanswer.value == "" )
		{
			alert("Secret Answer can not be left empty.");
			tform.txtfanswer.focus();
		}
		else if( tform.txtnpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtnpass.focus();
		}
		else if( tform.txtnpass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtnpass.focus();
		}
		else if( tform.txtnpass2.value != tform.txtnpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtnpass2.focus();
		}
		else{
			tform.submit();
	}
}




function fValidatField22(tform)
	{
		if(tform.textCompanyName.value == "" )
		{
			alert("Company Name can not be left empty.");
			tform.textCompanyName.focus();
		}
		else if( tform.textName.value == "" )
		{
			alert("Contact Name can not be left empty.");
			tform.textName.focus();
		}
		else if( tform.textPhone1.value == "" )
		{
			alert("Phone Number can not be left empty");
			tform.textPhone1.focus();
		}
		else if(isNaN(tform.textPhone1.value)) 
		{
			alert("Please enter a valid Phone Number");
			tform.textPhone1.focus();
		}
		else if( tform.textPhone2.value == "" )
		{
			alert("Phone Number can not be left empty");
			tform.textPhone2.focus();
		}
		else if(isNaN(tform.textPhone2.value)) 
		{
			alert("Please enter a valid Phone Number");
			tform.textPhone2.focus();
		}
		else if( tform.textPhone3.value == "" )
		{
			alert("Phone Number can not be left empty");
			tform.textPhone3.focus();
		}
		else if(isNaN(tform.textPhone3.value)) 
		{
			alert("Please enter a valid Phone Number");
			tform.textPhone3.focus();
		}
		
		
		
		else if(tform.textEmail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.textEmail.focus();
		}
		else if( (tform.textEmail.value.indexOf(".") == -1) || (tform.textEmail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.textEmail.focus();
		}
		else if(tform.textItem.value == "" )
		{
			alert("Item Number can not be left empty.");
			tform.textItem.focus();
		}
		else if(isNaN(tform.textItem.value)) 
		{
			alert("Please enter a valid Item Number");
			tform.textItem.focus();
		}
	else{
	 tform.submit();
	}
}



function fValidate(tform)
{
	if( tform.type.value == '')
	{
		alert("Property type cannot be left empty.");
			tform.type.focus();
	}
	else{
	 tform.submit();
	}
}

function fAreasValidate(tform)
{
	if( tform.area.value == '')
	{
		alert("Area cannot be left empty. Enter property's area.");
		tform.area.focus();
	}
	else{
	 tform.submit();
	}
}

// ------------------------

	function fValidatFieldLoginIndividual(tform)
	{
		if(tform.txtfname.value == "" )
		{
			alert("First Name can not be left empty.");
			tform.txtfname.focus();
		}
		else if( tform.txtlname.value == "" )
		{
			alert("Last Name can not be left empty.");
			tform.txtlname.focus();
		}
		else if(tform.txtemail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.txtemail.focus();
		}
		else if( (tform.txtemail.value.indexOf(".") == -1) || (tform.txtemail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.txtemail.focus();
		}
	
		else if( tform.txtadd3.value == "" )
		{
			alert("Address can not be left empty.");
			tform.txtadd3.focus();
		}
			else if( tform.txtcity2.value == "" )
		{
			alert("City can not be left empty.");
			tform.txtcity2.focus();
		}
		else if(tform.txtstate2.value == "" )
		{
			alert( "State can not be left empty." );
			tform.txtstate2.focus();
		}
		else if( tform.txtzip2.value == "" )
		{
			alert("Zip Code can not be left empty.");
			tform.txtzip2.focus();
		}
		else if(isNaN(tform.txtzip2.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtzip2.focus();
		}
		else if( tform.Country.value == "0" )
		{
			alert("Country can not be left empty.");
			tform.Country.focus();
		}
		else if( tform.txtphone2.value == "" )
		{
			alert("Telephone Number can not be left empty.");
			tform.txtphone2.focus();
		}	
		else if(isNaN(tform.txtphone2.value))
		{
			alert("Please enter a valid Telephone Number");
			tform.txtphone2.focus();
		}
		else if( tform.txtuser.value == "" )
		{
			alert("User ID can not be left empty.");
			tform.txtuser.focus();
		}
		else if( tform.txtuser.value.length < 8 )
		{
			alert("User ID must be in between 8 to 32 characters ");
			tform.txtuser.focus();
		}
		else if( tform.txtpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtpass.focus();
		}
		else if( tform.txtpass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtpass.focus();
		}
		else if( tform.txtpass2.value != tform.txtpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtpass2.focus();
		}
		else if( tform.SecretQuestion.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.SecretQuestion.focus();
		}
		else if( tform.txtres.value == "" )
		{
			alert("Response field can not be left empty.");
			tform.txtres.focus();
		}
		else{
	 	tform.submit();
		}
}

	
	

function fValidatFieldLoginIndividual2(tform)
	{
		if(tform.txtfname.value == "" )
		{
			alert("First Name can not be left empty.");
			tform.txtfname.focus();
		}
		else if( tform.txtlname.value == "" )
		{
			alert("Last Name can not be left empty.");
			tform.txtlname.focus();
		}
		else if(tform.txtemail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.txtemail.focus();
		}
		else if( (tform.txtemail.value.indexOf(".") == -1) || (tform.txtemail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.txtemail.focus();
		}
	
		else if( tform.txtadd1.value == "" )
		{
			alert("Address can not be left empty.");
			tform.txtadd1.focus();
		}
			else if( tform.txtcity.value == "" )
		{
			alert("City can not be left empty.");
			tform.txtcity.focus();
		}
		else if(tform.txtstate.value == "" )
		{
			alert( "State can not be left empty." );
			tform.txtstate.focus();
		}
		else if( tform.txtzip.value == "" )
		{
			alert("Zip Code can not be left empty.");
			tform.txtzip.focus();
		}
		else if(isNaN(tform.txtzip.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtzip.focus();
		}
		else if( tform.selCountry.value == "0" )
		{
			alert("Country can not be left empty.");
			tform.selCountry.focus();
		}
		else if( tform.txtphone.value == "" )
		{
			alert("Telephone Number can not be left empty.");
			tform.txtphone.focus();
		}	
		else if(isNaN(tform.txtphone.value))
		{
			alert("Please enter a valid Telephone Number");
			tform.txtphone.focus();
		}
		else if( tform.txtuser.value == "" )
		{
			alert("User ID can not be left empty.");
			tform.txtuser.focus();
		}
		else if( tform.txtuser.value.length < 8 )
		{
			alert("User ID must be in between 8 to 32 characters ");
			tform.txtuser.focus();
		}
		else if( tform.txtpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtpass.focus();
		}
		else if( tform.txtpass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtpass.focus();
		}
		else if( tform.txtpass2.value != tform.txtpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtpass2.focus();
		}
		else if( tform.SecretQuestion.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.SecretQuestion.focus();
		}
		else if( tform.txtres.value == "" )
		{
			alert("Response field can not be left empty.");
			tform.txtres.focus();
		}
		else{
	 	tform.submit();
		}
}




	
function fValidatFieldLoginBusiness(tform)
	{
		if(tform.textBName.value == "" )
		{
			alert("Business Name can not be left empty.");
			tform.textBName.focus();
		}
		else if( tform.selBType.value == "0" )
		{
			alert("Business Type can not be left empty.");
			tform.selBType.focus();
		}
		else if( tform.txtadd1.value == "" )
		{
			alert("Address can not be left empty.");
			tform.txtadd1.focus();
		}
			else if( tform.txtcity.value == "" )
		{
			alert("City can not be left empty.");
			tform.txtcity.focus();
		}
		else if(tform.txtstate.value == "" )
		{
			alert( "State can not be left empty." );
			tform.txtstate.focus();
		}
		else if( tform.txtzip.value == "" )
		{
			alert("Zip Code can not be left empty.");
			tform.txtzip.focus();
		}
		else if(isNaN(tform.txtzip.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtzip.focus();
		}
		else if( tform.selcountry.value == "0" )
		{
			alert("Country can not be left empty.");
			tform.selcountry.focus();
		}
		else if( tform.txtphone.value == "" )
		{
			alert("Telephone Number can not be left empty.");
			tform.txtphone.focus();
		}	
		else if(isNaN(tform.txtphone.value))
		{
			alert("Please enter a valid Telephone Number");
			tform.txtphone.focus();
		}
		else if(tform.txtfname.value == "" )
		{
			alert("First Name can not be left empty.");
			tform.txtfname.focus();
		}
		else if( tform.txtlname.value == "" )
		{
			alert("Last Name can not be left empty.");
			tform.txtlname.focus();
		}
		else if(tform.txtemail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.txtemail.focus();
		}
		else if( (tform.txtemail.value.indexOf(".") == -1) || (tform.txtemail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.txtemail.focus();
		}
		else if( tform.txtuser.value == "" )
		{
			alert("User ID can not be left empty.");
			tform.txtuser.focus();
		}
		else if( tform.txtuser.value.length < 8 ) 
		{
			alert("User ID must be more than 8 characters ");
			tform.txtuser.focus();
		}
		else if( tform.txtpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtpass.focus();
		}
		else if( tform.txtpass.value.length < 6 )
		{
			alert("Password must be more than 6 characters alphanumeric or more ");
			tform.txtpass.focus();
		}
		else if( tform.txtpass2.value != tform.txtpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtpass2.focus();
		}
		else if( tform.SecretQuestion.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.SecretQuestion.focus();
		}
		else if( tform.txtres.value == "" )
		{
			alert("Response field can not be left empty.");
			tform.txtres.focus();
		}
		else{
	 	tform.submit();
		}
}

	
	

function fValidatFieldLoginBusiness2(tform)
	{
		if(tform.textBName.value == "" )
		{
			alert("Business Name can not be left empty.");
			tform.textBName.focus();
		}
		else if( tform.selBType.value == "0" )
		{
			alert("Business Type can not be left empty.");
			tform.selBType.focus();
		}
		else if( tform.txtadd1.value == "" )
		{
			alert("Address can not be left empty.");
			tform.txtadd1.focus();
		}
			else if( tform.txtcity.value == "" )
		{
			alert("City can not be left empty.");
			tform.txtcity.focus();
		}
		else if(tform.txtstate.value == "" )
		{
			alert( "State can not be left empty." );
			tform.txtstate.focus();
		}
		else if( tform.txtzip.value == "" )
		{
			alert("Zip Code can not be left empty.");
			tform.txtzip.focus();
		}
		else if(isNaN(tform.txtzip.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtzip.focus();
		}
		else if( tform.selcountry.value == "0" )
		{
			alert("Country can not be left empty.");
			tform.selcountry.focus();
		}
		else if( tform.txtphone.value == "" )
		{
			alert("Telephone Number can not be left empty.");
			tform.txtphone.focus();
		}	
		else if(isNaN(tform.txtphone.value))
		{
			alert("Please enter a valid Telephone Number");
			tform.txtphone.focus();
		}
		else if(tform.txtfname.value == "" )
		{
			alert("First Name can not be left empty.");
			tform.txtfname.focus();
		}
		else if( tform.txtlname.value == "" )
		{
			alert("Last Name can not be left empty.");
			tform.txtlname.focus();
		}
		else if(tform.txtemail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.txtemail.focus();
		}
		else if( (tform.txtemail.value.indexOf(".") == -1) || (tform.txtemail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.txtemail.focus();
		}
		else if( tform.txtuser.value == "" )
		{
			alert("User ID can not be left empty.");
			tform.txtuser.focus();
		}
		else if( tform.txtuser.value.length < 8 ) 
		{
			alert("User ID must be more than 8 characters ");
			tform.txtuser.focus();
		}
		else if( tform.txtpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtpass.focus();
		}
		else if( tform.txtpass.value.length < 6 )
		{
			alert("Password must be more than 6 characters alphanumeric or more ");
			tform.txtpass.focus();
		}
		else if( tform.txtpass2.value != tform.txtpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtpass2.focus();
		}
		else if( tform.SecretQuestion.value == "0" )
		{
			alert("Secret Question can not be left empty.");
			tform.SecretQuestion.focus();
		}
		else if( tform.txtres.value == "" )
		{
			alert("Response field can not be left empty.");
			tform.txtres.focus();
		}
		else{
	 	tform.submit();
		}
}

	
	
function fValidatFieldPassword(tform)
{
		if( tform.txtnpass.value == "" )
		{
			alert("Password can not be left empty.");
			tform.txtnpass.focus();
		}
		else if( tform.txtnpass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtnpass.focus();
		}
		else if( tform.txtnpass2.value != tform.txtnpass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtnpass2.focus();
		}
		else{
			tform.submit();
	}
}
	
	
	
	function fValidatFieldCredit(tform)
	{
	
		if(tform.txtcard.value == "" )
		{
			alert("Credit Card can not be left empty.");
			tform.txtcard.focus();
		}
		else if( tform.txtcnumb.value == "" )
		{
			alert("Credit Card Number can not be left empty.");
			tform.txtcnumb.focus();
		}
		else if(isNaN(tform.txtcnumb.value))
		{
			alert("Please enter a valid Credit Card Number");
			tform.txtcnumb.focus();
		}
		else if( tform.txtcnumb.value.length != 16 )
		{
			alert("Credit Card Number must be 16 numbers ");
			tform.txtcnumb.focus();
		}
		else if( tform.selmonth.value == "0" )
		{
			alert("Expiry Month can not be left empty.");
			tform.selmonth.focus();
		}
		else if( tform.selyear.value == "0" )
		{
			alert("Expiry Year can not be left empty.");
			tform.selyear.focus();
		}
			else if( tform.txtcardname.value == "" )
		{
			alert("Card Holder Name can not be left empty.");
			tform.txtcardname.focus();
		}
			else if( tform.txtcid.value == "" )
		{
			alert("Credit Card ID can not be left empty.");
			tform.txtcid.focus();
		}
		else if( tform.txtcid.value.length != 3 )
		{
			alert("Credit Card ID must be 3 numbers ");
			tform.txtcid.focus();
		}
		else if(isNaN(tform.txtcid.value))
		{
			alert("Please enter a valid Credit Card ID");
			tform.txtcid.focus();
		}
		else if(tform.txtcemail.value == "" )
		{
			alert( "Email Address can not be left empty." );
			tform.txtcemail.focus();
		}
		else if( (tform.txtcemail.value.indexOf(".") == -1) || (tform.txtcemail.value.indexOf("@") == -1) )
		{
			alert("Please enter valid email address to proceed.");
			tform.txtcemail.focus();
		}
		else if( tform.txtcadd.value == "" )
		{
			alert("Address can not be left empty.");
			tform.txtcadd.focus();
		}	else if( tform.txtccity.value == "" )
		{
			alert("City can not be left empty.");
			tform.txtccity.focus();
		}	else if( tform.txtcstate.value == "" )
		{
			alert("State can not be left empty.");
			tform.txtcstate.focus();
		}
		else if( tform.txtczip.value == "" )
		{
			alert("Zip Code can not be left empty.");
			tform.txtczip.focus();
		}
		else if(isNaN(tform.txtczip.value))
		{
			alert("Please enter a valid Zip Code");
			tform.txtczip.focus();
		}
		else if( tform.selCountry.value == "0" )
		{
			alert("Country can not be left empty.");
			tform.selCountry.focus();
		}
		else{
	 	tform.submit();
		}
}





// -----------------------

function fCheckPassword(pForm)
{
	//Checking if empty fields
	if( pForm.UserName.value == '')
	{
		alert("User Name can not be left empty.");
		pForm.UserName.focus();
	}
	else if( pForm.Password.value == '')
	{
		alert("Password can not be left empty.");
		pForm.Password.focus();
	}
	else if( pForm.RePassword.value == '')
	{
		alert("Please Re-Type your password for confirmation, it can not be left empty.");
		pForm.RePassword.focus();
	}
	//////////////////////////
	else if( pForm.Password.value != pForm.RePassword.value )
	{
		alert("Passwords didn't match, correct your passwords.");
		pForm.Password.select();
	}
	else if( pForm.Admin.checked == false && (pForm.UserName.value == "Admin" || pForm.UserName.value == "admin"
				|| pForm.UserName.value == "Administrator" || pForm.UserName.value == "administrator") )
	{
		alert( "'"+pForm.UserName.value+"' is reserved for Administrators, please choose another User Name.");
		pForm.UserName.select();
	}
	else
		pForm.submit();
}
function fCheckUpPassword(uform)
{
	if( uform.NPassword.value == '' )
	{
		alert("New Password can not be left empty.");
		uform.NPassword.focus();
	}
	else if( uform.RNPassword.value == '' )
	{
		alert("Please Re-Type your password for confirmation, it can not be left empty.");
		uform.RNPassword.focus();
	}
	else if( uform.NPassword.value != uform.RNPassword.value )
	{
		alert("New Passwords didn't match, correct your passwords.");
		uform.NPassword.select();
	}
	else
		uform.submit();
}

function fValueValidate(vform)
{
	if( vform.value.value == '' )
	{
		alert("Value can not be left empty. You must specify some value.");
		vform.value.focus();
	}
	else if( vform.type.value == -1 )
	{
		alert("You have to select its type too, it can not be left empty.");
		vform.type.focus();
	}
	else
		vform.submit();
}

function fDeleteCheck(formName)
{
	//For calling use this onClick event--->   return fDeleteCheck(formname);

	var ml = formName;
	var len = ml.elements.length;
	
	for (var i = 0; i < len; i++) 
	{
			if (ml.elements[i].checked == true)
			{
				formName.submit();
				return true;
			}
	}
	
	alert("Please select record to perform delete operation");
	return false;	
}

function sRedirect(loc){
//	alert("Yahoo");
	location = loc;   //loc;
}
function cancel(){
	location = "../AdminSys/list.php";
}
function cCancel(){
	location = "../ClientSys/list.php";
}

function fLoginValidate(){
		if (frmLogin.txtUserName.value==''){
			alert("Please enter user name to proceed.");
			frmLogin.txtUserName.focus();
		} 
		else if(frmLogin.txtPassword.value==''){
			alert("Please enter password to proceed.");
			frmLogin.txtPassword.focus();
		}
		else {
			frmLogin.submit();
		}
}

function fAddValidate(){
		if(frmAdd.txtArea.value == 'Null'){
			alert("Please select area of property to proceed.");
			frmAdd.txtArea.focus();
		}
		else if (frmAdd.txtLocation.value==''){
			alert("Please enter Location to proceed.");
			frmAdd.txtLocation.focus();
		} 
		else if(frmAdd.txtType.value == 'Null'){
			alert("Please select a property type to proceed.");
			frmAdd.txtType.focus();
		}
		else if(frmAdd.txtPrice.value==''){
			alert("Please enter Price to proceed.");
			frmAdd.txtPrice.focus();
		}
		else if(isNaN(frmAdd.txtPrice.value)){
			alert("Price must be numeric.");
			frmAdd.txtPrice.focus();
		}
		else if(frmAdd.txtAssesment.value==''){
			alert("Please enter Assesment to proceed.");
			frmAdd.txtAssesment.focus();
		}
		else if(isNaN(frmAdd.txtAssesment.value)){
			alert("Assesment must be numeric.");
			frmAdd.txtAssesment.focus();
		}
		else if(frmAdd.txtTaxes.value==''){
			alert("Please enter Taxes to proceed.");
			frmAdd.txtTaxes.focus();
		}
		else if(isNaN(frmAdd.txtTaxes.value)){
			alert("Tax must be numeric.");
			frmAdd.txtTaxes.focus();
		}
		else if(frmAdd.txtMarketTime.value==''){
			alert("Please enter Market Time to proceed.");
			frmAdd.txtMarketTime.focus();
		}
		else if(frmAdd.txtSquareFootage.value==''){
			alert("Please enter Square Footage to proceed.");
			frmAdd.txtSquareFootage.focus();
		}
		else if(frmAdd.txtBedrooms.value == 'Null'){
			alert("Please select Bedrooms to proceed.");
			frmAdd.txtBedrooms.focus();
		}
		else if(frmAdd.txtBaths.value == 'Null'){
			alert("Please select Baths to proceed.");
			frmAdd.txtBaths.focus();
		}
		else if(frmAdd.txtDiningRoom.value==''){
			alert("Please enter Dining Room to proceed.");
			frmAdd.txtDiningRoom.focus();
		}
		else if(frmAdd.txtLivingRoom.value==''){
			alert("Please enter Living Room to proceed.");
			frmAdd.txtLivingRoom.focus();
		}
		else if(frmAdd.txtMasterBed.value==''){
			alert("Please enter Master Bed to proceed.");
			frmAdd.txtMasterBed.focus();
		}
		else if(frmAdd.txtBedRoom2.value==''){
			alert("Please enter Bed Room2 to proceed.");
			frmAdd.txtBedRoom2.focus();
		}
		else if(frmAdd.txtBedRoom3.value==''){
			alert("Please enter Bed Room3 to proceed.");
			frmAdd.txtBedRoom3.focus();
		}
		else if(frmAdd.txtBedRoom4.value==''){
			alert("Please enter Bed Room4 to proceed.");
			frmAdd.txtBedRoom4.focus();
		}
		else if(frmAdd.txtKitchen.value==''){
			alert("Please enter Kitchen to proceed.");
			frmAdd.txtKitchen.focus();
		}
		else if(frmAdd.txtYearBuilt.value==''){
			alert("Please enter YearBuild to proceed.");
			frmAdd.txtYearBuilt.focus();
		}
		else if(frmAdd.txtNeighbourhood.value==''){
			alert("Please enter Neighbourhood to proceed.");
			frmAdd.txtNeighbourhood.focus();
		}
		else if(frmAdd.txtDescription.value==''){
			alert("Please enter Description to proceed.");
			frmAdd.txtDescription.focus();
		}
		else if(frmAdd.file.value==''){
			alert("Please enter Image file to proceed.");
			frmAdd.file.focus();
		}
		else {
			frmAdd.submit();
		}
}

function fUpValidate(){
		if (frmUpdate.txtLocation.value==''){
			alert("Please enter Location to proceed.");
			frmUpdate.txtLocation.focus();
		}
		else if(frmUpdate.txtType.value == 'Null'){
			alert("Please select a property type to proceed.");
			frmUpdate.txtType.focus();
		}
		else if(frmUpdate.txtPrice.value==''){
			alert("Please enter Price to proceed.");
			frmUpdate.txtPrice.focus();
		}
		else if(isNaN(frmUpdate.txtPrice.value)){
			alert("Price must be numeric.");
			frmUpdate.txtPrice.focus();
		}
		else if(frmUpdate.txtAssesment.value==''){
			alert("Please enter Assesment to proceed.");
			frmUpdate.txtAssesment.focus();
		}
		else if(isNaN(frmUpdate.txtAssesment.value)){
			alert("Assesment must be numeric.");
			frmUpdate.txtAssesment.focus();
		}
		else if(frmUpdate.txtTaxes.value==''){
			alert("Please enter Taxes to proceed.");
			frmUpdate.txtTaxes.focus();
		}
		else if(isNaN(frmUpdate.txtTaxes.value)){
			alert("Tax must be numeric.");
			frmUpdate.txtTaxes.focus();
		}
		else if(frmUpdate.txtMarketTime.value==''){
			alert("Please enter Market Time to proceed.");
			frmUpdate.txtMarketTime.focus();
		}
		else if(frmUpdate.txtSquareFootage.value==''){
			alert("Please enter Square Footage to proceed.");
			frmUpdate.txtSquareFootage.focus();
		}
		else if(frmUpdate.txtBedrooms.value==''){
			alert("Please enter Bedrooms to proceed.");
			frmUpdate.txtBedrooms.focus();
		}
		else if(frmUpdate.txtBaths.value==''){
			alert("Please enter Baths to proceed.");
			frmUpdate.txtBaths.focus();
		}
		else if(frmUpdate.txtDiningRoom.value==''){
			alert("Please enter Dining Room to proceed.");
			frmUpdate.txtDiningRoom.focus();
		}
		else if(frmUpdate.txtLivingRoom.value==''){
			alert("Please enter Living Room to proceed.");
			frmUpdate.txtLivingRoom.focus();
		}
		else if(frmUpdate.txtMasterBed.value==''){
			alert("Please enter Master Bed to proceed.");
			frmUpdate.txtMasterBed.focus();
		}
		else if(frmUpdate.txtBedRoom2.value==''){
			alert("Please enter Bed Room2 to proceed.");
			frmUpdate.txtBedRoom2.focus();
		}
		else if(frmUpdate.txtBedRoom3.value==''){
			alert("Please enter Bed Room3 to proceed.");
			frmUpdate.txtBedRoom3.focus();
		}
		else if(frmUpdate.txtBedRoom4.value==''){
			alert("Please enter Bed Room4 to proceed.");
			frmUpdate.txtBedRoom4.focus();
		}
		else if(frmUpdate.txtKitchen.value==''){
			alert("Please enter Kitchen to proceed.");
			frmUpdate.txtKitchen.focus();
		}
		else if(frmUpdate.txtYearBuilt.value==''){
			alert("Please enter YearBuild to proceed.");
			frmUpdate.txtYearBuilt.focus();
		}
		else if(frmUpdate.txtNeighbourhood.value==''){
			alert("Please enter Neighbourhood to proceed.");
			frmUpdate.txtNeighbourhood.focus();
		}
		else if(frmUpdate.txtDescription.value==''){
			alert("Please enter Description to proceed.");
			frmUpdate.txtDescription.focus();
		}
		else {
			frmUpdate.submit();
		}
}



/////////////////////////////////////////////////////////////////////////////////////////
function fCompanyInfoValidate(){

		if (frmCompanyInfo.txtDomainName.value==''){
			alert("Please enter domain name to proceed.");
			frmCompanyInfo.txtDomainName.focus();
		} 
		else if (frmCompanyInfo.txtName.value==''){
			alert("Please enter company name to proceed.");
			frmCompanyInfo.txtName.focus();
		}
		else if (frmCompanyInfo.txtEmail.value==''){
			alert("Please enter email address to proceed.");
			frmCompanyInfo.txtEmail.focus();
		}
		else if (frmCompanyInfo.txtSlogan.value==''){
			alert("Please enter company slogan to proceed.");
			frmCompanyInfo.txtSlogan.focus();
		}
		else if (frmCompanyInfo.txtTelephone.value==''){
			alert("Please enter company telephone to proceed.");
			frmCompanyInfo.txtTelephone.focus();
		}
		else if (frmCompanyInfo.txtFax.value==''){
			alert("Please enter company fax to proceed.");
			frmCompanyInfo.txtFax.focus();
		}
		else if (frmCompanyInfo.txtLogoFile.value==''){
			alert("Please select logo file to proceed.");
			frmCompanyInfo.txtLogoFile.focus();
		}
		else if (frmCompanyInfo.txtAddress.value==''){
			alert("Please enter company address to proceed.");
			frmCompanyInfo.txtAddress.focus();
		}
		else if (frmCompanyInfo.txtFacts.value==''){
			alert("Please enter company facts to proceed.");
			frmCompanyInfo.txtFacts.focus();
		}
		else if (frmCompanyInfo.txtLink1.value==''){
			alert("Please enter link1 facts to proceed.");
			frmCompanyInfo.txtLink1.focus();
		}
		else if (frmCompanyInfo.txtLink2.value==''){
			alert("Please enter link2 facts to proceed.");
			frmCompanyInfo.txtLink2.focus();
		}
		else if (frmCompanyInfo.txtLink3.value==''){
			alert("Please enter link3 facts to proceed.");
			frmCompanyInfo.txtLink3.focus();
		}
		else if (frmCompanyInfo.txtLink4.value==''){
			alert("Please enter link4 facts to proceed.");
			frmCompanyInfo.txtLink4.focus();
		}
		else if (frmCompanyInfo.txtLink5.value==''){
			alert("Please enter link5 facts to proceed.");
			frmCompanyInfo.txtLink5.focus();
		}
		else if (frmCompanyInfo.txtLink6.value==''){
			alert("Please enter link6 facts to proceed.");
			frmCompanyInfo.txtLink6.focus();
		}
		else if (frmCompanyInfo.txtLink7.value==''){
			alert("Please enter link7 facts to proceed.");
			frmCompanyInfo.txtLink7.focus();
		}
		else {
			frmCompanyInfo.submit();
		}
}

//var popUpWin=0;
function popUpWindow(URLStr)
{
//  if(popUpWin)
// {
//    if(!popUpWin.closed) popUpWin.close();
//  }
// 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+''
  popUpWin = open(URLStr, 'popUpWin');
}
function winopen(url)
{
	window.open(url,"PrintFlyer","toolbar,menubar,scrollbars,addressbar");
}


function AdminLogin(){
		if (frmAdminLogin.txtUserName.value==''){
			alert("Please enter user name to proceed further.");
			frmAdminLogin.txtUserName.focus();
		} 
		else if (frmAdminLogin.txtPassword.value==''){
			alert("Please enter password to proceed further.");
			frmAdminLogin.txtPassword.focus();
		}
		else {
			frmAdminLogin.submit();
		}
}


//////////////////////////////////////////////////////////////////////////////
// Script for Morgage Calculator
function mortgage()
{
form = document.test
dnpmt=form.DownPayment.value
Price= form.Price.value
perc = (dnpmt/100) * Price
prin= Price-perc
tax=Math.floor(form.Taxes.value / 12)
assess=Math.floor(form.Assessment.value)
extra= tax+assess
intRate = (form.InterestRate.value/100) / 12
Term= form.Term.value * 12
MonthPayment=Math.floor((prin*intRate)/(1-Math.pow((1+intRate),(-1*Term)))*100)/100
form.Principle.value=MonthPayment
form.MonthlyTax.value=tax
form.MonthlyAssessment.value=assess
form.MonthlyPayment.value=MonthPayment + extra
}

function Calculate()
{
form = document.test
dnpmt=form.DownPayment.value
Price= form.Price.value
perc = (dnpmt/100) * Price
prin= Price-perc
tax=Math.floor(form.Taxes.value / 12)
assess=Math.floor(form.Assessment.value)
extra= tax+assess
intRate = (form.InterestRate.value/100) / 12
Term= form.Term.value * 12
MonthPayment=Math.floor((prin*intRate)/(1-Math.pow((1+intRate),(-1*Term)))*100)/100
form.Principle.value=MonthPayment
form.MonthlyTax.value=tax
form.MonthlyAssessment.value=assess
form.MonthlyPayment.value=MonthPayment + extra
}




	function ms11ValidateFields(tform)
	{
		if( tform.txtUser.value == "" )
		{
			alert("Required fields can not be left empty.");
			tform.txtUser.focus();
		}
		else if( tform.txtPass.value == "" )
		{
			alert("Required fields can not be left empty.");
			tform.txtPass.focus();
		}
		else if( tform.txtPass.value.length < 6 )
		{
			alert("Password must be six characters alphanumeric or more ");
			tform.txtPass.focus();
		}
		else if( tform.txtPass2.value != tform.txtPass.value )
		{
			alert("Your confirm password field doesn't match to Password field.");
			tform.txtPass2.focus();
		}
		else if( tform.SecretQuestion.value == "0" )
		{
			alert("Required fields can not be left empty.");
			tform.SecretQuestion.focus();
		}
		else if( tform.txtres.value == "" )
		{
			alert("Required fields can not be left empty.");
			tform.txtres.focus();
		}
	
		else {
			frmUserLoginArea.submit();
		}
}




var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
	if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
