var xmlHttp = null;
var xmlAddCartHttp;
var xmlLoginHttp;
var xmlForgotpwd;
var xmlChangepwdHttp;
var xmlCheckUserHttp;
var xmlCheckEmailHttp;
var xmlLogUserHttp;
var xmlRegInsertHttp;
var xmlLoadIndexProductHttp;
var xmlLoadProductHttp;
var xmlLogOffHttp;
var xmlpostcommentsHttp;
var xmlfeedbackcommentsHttp;
var xmlreviewcommentsHttp;
var cartQtys='';
var cartShopIds='';
var Pquantity='';
var ShopAmt='';
var xmlDeleteCartHttp;
var glbProducyDetailId;
var overlayDuration = 0.4;
var MyDisplayDiv;
var overlayDuration1 = 0.4;
var MyDisplayDiv1;
var overlayDuration2 = 0.4;
var MyDisplayDiv2;
var password;
var get_id;
var ProductList;


function shopmore()
{
window.location="showroom.php";	
}
function billing()
{
window.location="checkout.php";	
}
function loginfunction()
{
window.location="login.php";	
}
/* javascript for popup windows starts here */

//popup window for login
function expandingWindow(website) {
var windowprops='width=315,height=220,scrollbar=no,status=no,resizable=no'
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var leftdist = 350;    // distance to left edge of window
var topdist = 250;     // distance to top edge of window

/*if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < 270; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < 330; sizewidth += widthspeed)
sizer.resizeTo(330, 270);
sizer.location = website;
}
else
{*/
var mwin=window.open(website,'mywindow',windowprops);
mwin.moveTo(300,300);
/*}*/
}


//popup window for billing
function expandingWin(website) {
var windowprops='width=510,height=450,scrollbar=no,status=no,resizable=no'
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var leftdist = 350;    // distance to left edge of window
var topdist = 250;     // distance to top edge of window

/*if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < 270; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < 330; sizewidth += widthspeed)
sizer.resizeTo(330, 270);
sizer.location = website;
}
else
{*/
var mwin=window.open(website,'mywindow',windowprops);
mwin.moveTo(300,300);
/*}*/
}

//popup window for forgetpassword
function expandingforgetpass(website) {
//window.close();
//window.parent.refresh();
//window.parent.reload();
window.close();
var windowforget='width=357,height=140,scrollbar=no,status=no,resizable=no';
var mwinf=window.open(website,'mywindowforpass',windowforget);
mwinf.moveTo(300,300);	
}

//popup window for register
function expandregister(website) {
swebsite = website.split("~");
if(swebsite[0]=="l")
{
	window.close();
}
var windowprops='width=462,height=250,scrollbar=no,status=no,resizable=no';
var mwin=window.open(swebsite[1],'mywindowreg',windowprops);
mwin.moveTo(300,300);
}

//popup window for changepassword
function expandchangepassword(website) {    
var windowprops='width=430,height=250,scrollbar=no,status=no,resizable=no';
var mwin=window.open(website,'mywindow',windowprops);
mwin.moveTo(300,300);
}

//  End -->

/* javascript for popup windows ends here */

function getViewPort1() {
var vpw1;
var vph1;
var vYscroll1;

if (typeof window.innerWidth != 'undefined'){
vpw1 = window.innerWidth,
vph1 = window.innerHeight
vYscroll1 = window.pageYOffset;
}

else if (typeof document.documentElement != 'undefined'
&& typeof document.documentElement.clientWidth !=
'undefined' && document.documentElement.clientWidth != 0) {
vpw1 = document.documentElement.clientWidth,
vph1 = document.documentElement.clientHeight
vYscroll1 = document.documentElement.scrollTop;
}

else {
vpw1 = document.getElementsByTagName('body')[0].clientWidth,
vph1 = document.getElementsByTagName('body')[0].clientHeight
vYscroll1 = document.body.scrollTop;
}

return {w: vpw1, h: vph1, yScroll: vYscroll1};
}

function displayBox1(DisplayConcept) {
	var status;
	status="y";
	if(DisplayConcept=="CheckoutDiv")
	{
		var arr_qty = document.getElementsByName('pqty[]');
		var len = arr_qty.length;
		for ( i=0; i < len; i++ ) {
		if((arr_qty[i].value==0) || (arr_qty[i].value==00) || (arr_qty[i].value==000) || (arr_qty[i].value==""))
		{
			status="n";
		}
		}
		if(status=="n")
		{
			//alert("Please check all the product quantity...!");
		}
		else
		{
			document.getElementById("Emptycheck").style.display="none";
			MyDisplayDiv1 = DisplayConcept;
			document.getElementById('fade2').className='black_overlay1';
			Element.hide('fade2'); 
			new Effect.Appear('fade2', { duration: overlayDuration1, from: 0.0, to: 0.8 });
			window.setTimeout(newDisplayBox1,1000);
		}
	}
	else
	{
		MyDisplayDiv1 = DisplayConcept;
		document.getElementById('fade2').className='black_overlay1';
		Element.hide('fade2'); 
		new Effect.Appear('fade2', { duration: overlayDuration1, from: 0.0, to: 0.8 });
		window.setTimeout(newDisplayBox1,1000);
	}
}


function newDisplayBox1() {
////alert(MyDisplayDiv);
vp1 = getViewPort1();
document.getElementById(MyDisplayDiv1).className='myclass';
document.getElementById(MyDisplayDiv1).style.top = (vp1.yScroll + parseInt(vp1.h/2, 10) - parseInt(320/2, 10)) + 'px';
document.getElementById(MyDisplayDiv1).style.left = (parseInt(vp1.w/2, 10) - parseInt(500/2, 10)) + 'px';
Element.hide(MyDisplayDiv1); 
new Effect.Appear(MyDisplayDiv1);
}

function displayBox_back1(DivName) {
	document.getElementById("billname").value="";
	document.getElementById("address").value="";
	document.getElementById("shippingaddress").value="";
	document.getElementById("country").value=0;
	document.getElementById("state").value="";
	document.getElementById("city").value="";
	document.getElementById("zipcode").value="";
	document.getElementById("Email").value="";
	document.getElementById("phoneno").value="";
	document.getElementById("billname_err").style.display="none";
	document.getElementById("address_err").style.display="none";
	document.getElementById("shippingaddress_err").style.display="none";
	document.getElementById("city_err").style.display="none";
	document.getElementById("state_err").style.display="none";
	document.getElementById("country_err").style.display="none";
	document.getElementById("zipcode_err").style.display="none";
	document.getElementById("Email_err").style.display="none";
	document.getElementById("phoneno_err").style.display="none";
	
	/*var loadClear = document.getElementById("state").value;
	//alert(loadClear);
	for(var i=0; i < loadClear.options.length; i++)
	{
		loadClear[i].value="";
	}*/
	//document.getElementById(element.name+"_err").innerHTML="";
	//document.getElementById('mynewdiv').className='myclass1';
	new Effect.Fade(DivName);
	window.setTimeout(newDisplayBox_back1,1000);
}
function newDisplayBox_back1() {
new Effect.Fade('fade2');
//document.getElementById('fade').className='black_overlay';
}
//login div
function getViewPort2() {
var vpw2;
var vph2;
var vYscroll2;

if (typeof window.innerWidth != 'undefined'){
vpw2 = window.innerWidth,
vph2 = window.innerHeight
vYscroll2 = window.pageYOffset;
}

else if (typeof document.documentElement != 'undefined'
&& typeof document.documentElement.clientWidth !=
'undefined' && document.documentElement.clientWidth != 0) {
vpw2 = document.documentElement.clientWidth,
vph2 = document.documentElement.clientHeight
vYscroll2 = document.documentElement.scrollTop;
}

else {
vpw2 = document.getElementsByTagName('body')[0].clientWidth,
vph2 = document.getElementsByTagName('body')[0].clientHeight
vYscroll2 = document.body.scrollTop;
}

return {w: vpw2, h: vph2, yScroll: vYscroll2};
}


function displayBox2(DisplayConcept) {
MyDisplayDiv2 = DisplayConcept;

document.getElementById('fade2').className='black_overlay1';
Element.hide('fade2'); 
new Effect.Appear('fade2', { duration: overlayDuration2, from: 0.0, to: 0.8 });
window.setTimeout(newDisplayBox2,1000);
}
function newDisplayBox2() {
////alert(MyDisplayDiv);
vp2=getViewPort2();
document.getElementById(MyDisplayDiv2).className='myclass';
document.getElementById(MyDisplayDiv2).style.top = (vp2.yScroll + parseInt(vp2.h/2, 10) - parseInt(200/2, 10)) + 'px';
document.getElementById(MyDisplayDiv2).style.left = (parseInt(vp2.w/2, 10) - parseInt(300/2, 10)) + 'px';
//document.getElementById(MyDisplayDiv2).style.display='block';
//document.getElementById(MyDisplayDiv2).style.top = '18px';

<!--(vp2.yScroll + parseInt(vp2.h/2, 10) - parseInt(550/2, 10)) + 'px'-->;
//document.getElementById(MyDisplayDiv2).style.left = '543px';<!--(parseInt(vp2.w/2, 10) - parseInt(5/2, 10)) + 'px';-->
Element.hide(MyDisplayDiv2); 
new Effect.Appear(MyDisplayDiv2);
}

// ## Log in Starts ## //

function displayBox_back2(DivName) {
	document.getElementById("loginuname").value="";
	document.getElementById("pass").value="";
	document.getElementById('errpass').style.display="none";
	document.getElementById('erruser').style.display="none";
//document.getElementById('mynewdiv').className='myclass1';
new Effect.Fade(DivName);
window.setTimeout(newDisplayBox_back2,1000);
}
function newDisplayBox_back2() {
new Effect.Fade('fade2');
//document.getElementById('fade').className='black_overlay';
}
// ## Log in End ## //

// ## Change Password Starts ## //

function displayBox3(DisplayConcept) {
MyDisplayDiv3 = DisplayConcept;

document.getElementById('fade2').className='black_overlay1';
Element.hide('fade2'); 
new Effect.Appear('fade2', { duration: overlayDuration2, from: 0.0, to: 0.8 });
window.setTimeout(newDisplayBox3,1000);
}
function newDisplayBox3() {
////alert(MyDisplayDiv);
vp2=getViewPort2();
document.getElementById(MyDisplayDiv3).className='myclass';
document.getElementById(MyDisplayDiv3).style.top = (vp2.yScroll + parseInt(vp2.h/2, 10) - parseInt(200/2, 10)) + 'px';
document.getElementById(MyDisplayDiv3).style.left = (parseInt(vp2.w/2, 10) - parseInt(300/2, 10)) + 'px';
//document.getElementById(MyDisplayDiv2).style.display='block';
//document.getElementById(MyDisplayDiv2).style.top = '18px';

<!--(vp2.yScroll + parseInt(vp2.h/2, 10) - parseInt(550/2, 10)) + 'px'-->;
//document.getElementById(MyDisplayDiv2).style.left = '543px';<!--(parseInt(vp2.w/2, 10) - parseInt(5/2, 10)) + 'px';-->
Element.hide(MyDisplayDiv3); 
new Effect.Appear(MyDisplayDiv3);
}

function displayBox_back3(DivName) {
	document.getElementById("OP").value="";
	document.getElementById("NP").value="";
	document.getElementById("CP").value="";
	document.getElementById('OldError').style.display="none";
	document.getElementById('NewError').style.display="none";
	document.getElementById('ConfirmError').style.display="none";
	document.getElementById('ConfirmPassError').style.display="none";
	document.getElementById('ConfirmMissmatch').style.display="none";
	document.getElementById("PError").style.display="none";
	document.getElementById("CPError").style.display="none";
//document.getElementById('mynewdiv').className='myclass1';
new Effect.Fade(DivName);
window.setTimeout(newDisplayBox_back3,1000);
}
function newDisplayBox_back3() {
new Effect.Fade('fade2');
//document.getElementById('fade').className='black_overlay';
}

// ## Change Password End ## //

// ## Forgot Password Starts ## //
function displayBox4(DisplayConcept) {
MyDisplayDiv4 = DisplayConcept;

document.getElementById('fade2').className='black_overlay1';
Element.hide('fade2'); 
new Effect.Appear('fade2', { duration: overlayDuration2, from: 0.0, to: 0.8 });
window.setTimeout(newDisplayBox4,1000);
document.getElementById('signinDiv').style.display="none";
}
function newDisplayBox4() {
////alert(MyDisplayDiv);
vp2=getViewPort2();
document.getElementById(MyDisplayDiv4).className='myclass';
document.getElementById(MyDisplayDiv4).style.top = (vp2.yScroll + parseInt(vp2.h/2, 10) - parseInt(200/2, 10)) + 'px';
document.getElementById(MyDisplayDiv4).style.left = (parseInt(vp2.w/2, 10) - parseInt(300/2, 10)) + 'px';
//document.getElementById(MyDisplayDiv2).style.display='block';
//document.getElementById(MyDisplayDiv2).style.top = '18px';

<!--(vp2.yScroll + parseInt(vp2.h/2, 10) - parseInt(550/2, 10)) + 'px'-->;
//document.getElementById(MyDisplayDiv2).style.left = '543px';<!--(parseInt(vp2.w/2, 10) - parseInt(5/2, 10)) + 'px';-->
Element.hide(MyDisplayDiv4); 
new Effect.Appear(MyDisplayDiv4);
}
function displayBox_back4(DivName) {
	document.getElementById("forgotp").value="";
	document.getElementById("ForgotMailError").style.display="none";
	document.getElementById("Forgot_Username").style.display = "none";
	document.getElementById("ForgotMailError1").style.display="none";
	document.getElementById("ForgotMailError2").style.display="none";
	document.getElementById("GetPass").style.display="none";
	document.getElementById("GetNotPass").style.display="none";

new Effect.Fade(DivName);
window.setTimeout(newDisplayBox_back4,1000);
}
function newDisplayBox_back4() {
new Effect.Fade('fade2');
//document.getElementById('fade').className='black_overlay';
}

// ## Forgot Password End ## //

function getViewPort() {
var vpw;
var vph;
var vYscroll;

if (typeof window.innerWidth != 'undefined'){
vpw = window.innerWidth,
vph = window.innerHeight
vYscroll = window.pageYOffset;
}

else if (typeof document.documentElement != 'undefined'
&& typeof document.documentElement.clientWidth !=
'undefined' && document.documentElement.clientWidth != 0) {
vpw = document.documentElement.clientWidth,
vph = document.documentElement.clientHeight
vYscroll = document.documentElement.scrollTop;
}

else {
vpw = document.getElementsByTagName('body')[0].clientWidth,
vph = document.getElementsByTagName('body')[0].clientHeight
vYscroll = document.body.scrollTop;
}

return {w: vpw, h: vph, yScroll: vYscroll};
}

function displayBox(DisplayConcept) {
MyDisplayDiv = DisplayConcept;

document.getElementById('fade2').className='black_overlay1';
Element.hide('fade2'); 
new Effect.Appear('fade2', { duration: overlayDuration, from: 0.0, to: 0.8 });
window.setTimeout(newDisplayBox,1000);
document.getElementById("signinDiv").style.display = "none";
document.getElementById('errpass').style.display="none";
document.getElementById('erruser').style.display="none";

//## Register Values ## //
document.getElementById("uname").value="";
document.getElementById("pass").value="";
document.getElementById("cpass").value="";
document.getElementById("mail").value="";
document.getElementById("uname_err").style.display="none";
document.getElementById("changename").style.display="none";
document.getElementById("pass_err").style.display="none";
document.getElementById("cpass_err").style.display="none";
document.getElementById("mail_err").style.display="none";
document.getElementById("changemail").style.display="none";
}
function newDisplayBox() {
////alert(MyDisplayDiv);
vp = getViewPort();
document.getElementById(MyDisplayDiv).className='myclass';
document.getElementById(MyDisplayDiv).style.top = (vp.yScroll + parseInt(vp.h/2, 10) - parseInt(200/2, 10)) + 'px';
document.getElementById(MyDisplayDiv).style.left = (parseInt(vp.w/2, 10) - parseInt(300/2, 10)) + 'px';
Element.hide(MyDisplayDiv); 
new Effect.Appear(MyDisplayDiv);
}

function displayBox_back(DivName) {
	document.register.uname.value="";
	document.register.pass.value="";
	document.getElementById("uname").value="";
	document.getElementById("pass").value="";
	document.getElementById("cpass").value="";
	document.getElementById("mail").value="";
	document.getElementById("uname_err").style.display="none";
	document.getElementById("changename").style.display="none";
	document.getElementById("pass_err").style.display="none";
	document.getElementById("cpass_err").style.display="none";
	document.getElementById("mail_err").style.display="none";
	document.getElementById("changemail").style.display="none";
	//document.getElementById("uname").style.display="none";
//document.getElementById('mynewdiv').className='myclass1';
new Effect.Fade(DivName);
window.setTimeout(newDisplayBox_back,1000);
}

function newDisplayBox_back() {
new Effect.Fade('fade2');
//document.getElementById('fade').className='black_overlay';
}

function mycontact(DisplayConcept) {
MyDisplayDiv = DisplayConcept;
document.getElementById('fade2').className='black_overlay1';
Element.hide('fade2'); 
new Effect.Appear('fade2', { duration: overlayDuration, from: 0.0, to: 0.8 });
window.setTimeout(checkurl,1000);
}


function checkurl() {
var expectedHash = window.location.hash;
	try {
		if(expectedHash!="") {
			var nav = expectedHash.split("#");
			////alert(nav[1].search("/"));
			if(nav[1].search("/")==-1) {
				
				if(nav[1]=="Index") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "inline";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";
					indexproducts();
				}
				
				if(nav[1]=="AboutUs") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "inline";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "inline";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread1") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "inline";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread2") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "inline";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread3") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "inline";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread4") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "inline";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread5") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "inline";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread6") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "inline";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread7") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "inline";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				if(nav[1]=="ShowThread8") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "inline";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="ShowThread9") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "inline";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="post_comments") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "inline";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
					if(nav[1]=="review_comments") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "inline";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";

				}
				
				if(nav[1]=="waterConv") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "inline";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="none";
					//document.getElementById("obj_flash").height="0px";
					//document.getElementById("obj_flash").width="0px";
					document.getElementById("img_flash").style.display="inline";
					document.getElementById("img_flash").src="flash/water-conservation.jpg";

				}
				
				if(nav[1]=="ShowRoom") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "inline";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";
					document.getElementById('error_occur').style.display="none";
					loadproducts(1);loadShopCart();
				}
				
				if(nav[1]=="Faq") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "inline";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="none";
					//document.getElementById("obj_flash").height="0px";
					//document.getElementById("obj_flash").width="0px";
					document.getElementById("img_flash").style.display="inline";
					document.getElementById("img_flash").src="flash/FAQ.jpg";
			
				}
				
				if(nav[1]=="ContactUs") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "inline";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="none";
					document.getElementById("img_flash").style.display="inline";
					document.getElementById("img_flash").src="flash/contact us.jpg";
			
				}
				if(nav[1]=="paymentsucess") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("paymentfailed").style.display = "none";
					document.getElementById("paymentsucess").style.display = "inline";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="none";
					document.getElementById("img_flash").style.display="inline";
					document.getElementById("img_flash").src="flash/contact us.jpg";
			
				}
				if(nav[1]=="paymentcancelled") {
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "none";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("paymentfailed").style.display = "inline";
					document.getElementById("paymentsucess").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="none";
					document.getElementById("img_flash").style.display="inline";
					document.getElementById("img_flash").src="flash/contact us.jpg";
			
				}
				
			
			} else {
					////alert(nav[1]);
					var resultSetID = nav[1].split("/");
					new Effect.Fade('fade2');
					document.getElementById("indexData").style.display = "none";
					document.getElementById("aboutusData").style.display = "none";
					document.getElementById("showthreadData").style.display = "none";
					document.getElementById("showthread1Data").style.display = "none";
					document.getElementById("showthread2Data").style.display = "none";
					document.getElementById("showthread3Data").style.display = "none";
					document.getElementById("showthread4Data").style.display = "none";
					document.getElementById("showthread5Data").style.display = "none";
					document.getElementById("showthread6Data").style.display = "none";
					document.getElementById("showthread7Data").style.display = "none";
					document.getElementById("showthread8Data").style.display = "none";
					document.getElementById("showthread9Data").style.display = "none";
					document.getElementById("Postyourcomments").style.display = "none";
					document.getElementById("reviewcomments").style.display = "none";
					document.getElementById("waterConvData").style.display = "none";
					document.getElementById("ShowRoomData").style.display = "inline";
					document.getElementById("FaqData").style.display = "none";
					document.getElementById("ContactUsData").style.display = "none";
					document.getElementById("errfeedback").style.display = "none";
					document.getElementById("obj_flash").style.display="inline";
					document.getElementById("img_flash").style.display="none";
					//document.getElementById("LoginData").style.display = "none";
					//document.getElementById("RegisterData").style.display = "none";
					loadproductDetail(resultSetID[1]);loadShopCart();
			}
		} else {
			document.getElementById("indexData").style.display = "inline";
		}
	}catch(e){
		//alert(e.discription + " My Error ");
	}
}

function addNavigation(navData,getid){
	get_id = getid;
	try{
		window.location.hash = navData;
		if(navData=="AboutUs") {
		mycontact('aboutusData');
		}
		if(navData=="Index") {
		mycontact('indexData');
		}
		if(navData=="ShowThread") {
		mycontact('showthreadData');
		}
		if(navData=="ShowThread1") {
		mycontact('showthread1Data');
		}
		if(navData=="ShowThread2") {
		mycontact('showthread2Data');
		}
		if(navData=="ShowThread3") {
		mycontact('showthread3Data');
		}
		if(navData=="ShowThread4") {
		mycontact('showthread4Data');
		}
		if(navData=="ShowThread5") {
		mycontact('showthread5Data');
		}
		if(navData=="ShowThread6") {
		mycontact('showthread6Data');
		}
		if(navData=="ShowThread7") {
		mycontact('showthread7Data');
		}
		if(navData=="ShowThread8") {
		mycontact('showthread8Data');
		}
		
		if(navData=="ShowThread9") {
		mycontact('showthread9Data');
		}
		
		if(navData=="post_comments") {
		mycontact('Postyourcomments');
		}
		
		if(navData=="review_comments") {
		mycontact('reviewcomments');
		}
		
		if(navData=="waterConv") {
		mycontact('waterConvData');
		}
		
		if(navData=="ShowRoom") {
		mycontact('ShowRoomData');
		}
		
		if(navData=="Faq") {
		mycontact('FaqData');
		}
		
		if(navData=="ContactUs") {
		mycontact('ContactUsData');
		}
		
		if(navData=="Checkout") {
		mycontact('CheckoutData');
		}
		
		if(navData.search("ProductDetail")!=-1)
		{
			var resultSetID = navData.split("/");
			glbProducyDetailId = resultSetID[1];
			if(resultSetID[0]=="ProductDetail") 
				{
					mycontact('ShowRoomData');
				}
		}
		
	}catch(e){
		//alert(e.discription + " err");
	}

}

function addnav(maincat,subcat,productid) {
	try{
		if(maincat!="") {
		window.location.hash = maincat;
		checkurl();
		}
		if(maincat!="" && subcat!="") {
		window.location.hash = maincat + "/" + subcat;
		checkurl();
		}
		if(maincat!="" && subcat!="" && productid!="") {
		window.location.hash =maincat + "/" + subcat + "/" + productid;
		checkurl();
		}
		
		
	}catch(e){
		//alert(e.discription + " err");
	}
}


function loadproducts(page,c) {
	try {
		var url = "includes/load.products.php?page=" +page+"&Cid="+c;
		////alert(url);
		xmlLoadProductHttp = GetXmlHttpObject();
		xmlLoadProductHttp.onreadystatechange = stateProducts;
		xmlLoadProductHttp.open("GET",url,true);
		xmlLoadProductHttp.send(null);
		document.getElementById("listproducts").innerHTML = "<img src=images/product-loader.gif>";
	} catch(e) {
	//alert(e.discription);
	}
}

function stateProducts() {
	try {
		if(xmlLoadProductHttp.readyState==4 || xmlLoadProductHttp.readyState=="complete") {
			try{
				document.getElementById("listproducts").innerHTML = "";
			var result = xmlLoadProductHttp.responseText;
			////alert(result);
				document.getElementById("listproducts").innerHTML = result;
			} catch(e) {
			//alert(e.description);
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}

function indexproducts() {
	try {
	var url = "includes/index.products.php";
	
	////alert(url);
		xmlLoadIndexProductHttp=GetXmlHttpObject();
		xmlLoadIndexProductHttp.onreadystatechange = stateindexproducts;
		xmlLoadIndexProductHttp.open("GET",url,true);
		xmlLoadIndexProductHttp.send(null);
		document.getElementById("indexlist").innerHTML = "<img src=images/product-loader.gif>";
	} catch(e) {
	//alert(e.discription);
	}
}

function stateindexproducts() {
	try {
		if(xmlLoadIndexProductHttp.readyState==4 || xmlLoadIndexProductHttp.readyState=="complete") {
			try{
				document.getElementById("indexlist").innerHTML = "";
			var result = xmlLoadIndexProductHttp.responseText;
			////alert(result);
				document.getElementById("indexlist").innerHTML = result;
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}


function loadproductDetail(productid) {
	try {
	var url = "includes/load.product.detail.php?productid=" + productid+"&Pcid="+get_id;
	////alert(url);
		xmlLoadProductDetailHttp = GetXmlHttpObject();
		xmlLoadProductDetailHttp.onreadystatechange = stateProductDetail;
		xmlLoadProductDetailHttp.open("GET",url,true);
		xmlLoadProductDetailHttp.send(null);
		document.getElementById("listproducts").innerHTML = "<img src=images/product-loader.gif>";
	} catch(e) {
	//alert(e.discription + "Error MYn");
	}
}

function stateProductDetail() {
	try {
		if(xmlLoadProductDetailHttp.readyState==4 || xmlLoadProductDetailHttp.readyState=="complete") {
			try{
				document.getElementById("listproducts").innerHTML = "";
			var result = xmlLoadProductDetailHttp.responseText;
			////alert(result);
				document.getElementById("listproducts").innerHTML = result;
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}

function loadShopCart() {
	try {
	var url = "includes/load.shopping.list.php";
	////alert(url);
		xmlLoadShopListHttp = GetXmlHttpObject();
		xmlLoadShopListHttp.onreadystatechange = stateLoadShopList;
		xmlLoadShopListHttp.open("GET",url,true);
		xmlLoadShopListHttp.send(null);
	} catch(e) {
	//alert(e.discription);
	}
}

function stateLoadShopList() {
	try {
		if(xmlLoadShopListHttp.readyState<=3)
		{
			document.getElementById("shoppinglist").innerHTML = "<img src=images/shopping-loader.gif>";	
		}
		else if(xmlLoadShopListHttp.readyState==4 || xmlLoadShopListHttp.readyState=="complete") {
			try{
			var result = xmlLoadShopListHttp.responseText;
			////alert(result);
			result = result.split("counter");
			////alert(result[1]);
				document.getElementById("shoppinglist").innerHTML = result[0];
				document.getElementById("shoppingcount").innerHTML = result[1];
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}


function updatecart() {
var pqty = document.getElementsByName('pqty[]');
var sid = document.getElementsByName('sid[]');
var Amt = document.getElementsByName('Amt[]');
var qty = document.getElementsByName('qty[]');
var pqtyLength = pqty.length;
var sidLength = sid.length;
var amtLength = Amt.length;
var qtyLength = qty.length;
////alert(qtyLength);
	for ( i=0; i < pqtyLength; i++ ) {
		if((pqty[i].value==0) || (pqty[i].value==00) || (pqty[i].value==000) || (pqty[i].value==""))
		{
			pqty[i].value=1;
			cartQtys += pqty[i].value + ",";
			////alert(cartQtys);
			////alert(pqty[i]);
		}
		else if(pqty[i].value!="undefined") {
		cartQtys += pqty[i].value + ",";
		////alert(cartQtys);
		}
	}
	for ( j=0; j < sidLength; j++ ) {
		if(sid[j].value!="undefined") {
		cartShopIds += sid[j].value + ",";
		}
	}
	for ( k=0; k < qtyLength; k++ ) {
		if(qty[k].value!="undefined") {
		Pquantity += qty[k].value + ",";
		////alert(Pquantity);
		}
	}
	for ( l=0; l < amtLength; l++ ) {
		if(Amt[l].value!="undefined") {
		ShopAmt += Amt[l].value + ",";
		////alert(Pquantity);
		}
	}
	////alert(cartQtys + "-" + cartShopIds);
	try {
	var url = "includes/update.cart.php?productqtys=" + cartQtys + "&shoppingids=" + cartShopIds +"&ProductQuantity="+Pquantity +"&Totalamt="+ShopAmt;
	////alert(url);
		xmlUpdateCartHttp = GetXmlHttpObject();
		xmlUpdateCartHttp.onreadystatechange = stateUpdateCart;
		xmlUpdateCartHttp.open("GET",url,true);
		xmlUpdateCartHttp.send(null);
	} catch(e) {
	//alert(e.discription);
	}
}
function stateUpdateCart() {
	try {
		if(xmlUpdateCartHttp.readyState==4 || xmlUpdateCartHttp.readyState=="complete") {
			try{
			document.getElementById('error_occur').style.display="none";
			var result = xmlUpdateCartHttp.responseText;
			////alert(result);
			var s_result = result.substring(result.length-9,result.length)
			////alert(s_result);
			if(s_result=="updated" || s_result=="edupdated" || s_result=="teupdated") {
			//alert(s_result);
			//document.getElementById('error_occur').style.display="none";
			loadShopCart();
			}
			else if(s_result=="Notupdate")
			{
				////alert(s_result);
				document.getElementById('error_occur').innerHTML = "sorry stock not available";
				document.getElementById('error_occur').style.display="inline";
				loadShopCart();
			}
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}

//var pqty = document.getElementsByName('pqty[]');

function validname(pqty) {
	pqty.value = pqty.value.replace(/[^\u00D1\u00F10-9]*/ig,'');
} 

function deletecart(shoppingid) {
		try {
		var url = "includes/delete.cart.php?shoppingid=" + shoppingid;
		////alert(url);
		xmlDeleteCartHttp = GetXmlHttpObject();
		xmlDeleteCartHttp.onreadystatechange = stateDeleteCart;
		xmlDeleteCartHttp.open("GET",url,true);
		xmlDeleteCartHttp.send(null);
		} catch(e) {
		//alert(e.discription);
		}
}

function stateDeleteCart() {
	try {
		if(xmlDeleteCartHttp.readyState==4 || xmlDeleteCartHttp.readyState=="complete") {
			try{
			var result = xmlDeleteCartHttp.responseText;
			////alert(result);
				if(result=="deleted") {
				loadShopCart();
				}
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}

function del()
{
	var d = confirm("Do you want delete this product?");
	return d;
	document.getElementById('error_occur').style.display="none";
}

function addcart(productid,product_qty,user_id) {
	try {
	var url = "includes/addto.cart.php?productid=" + productid  + "&product_qty=" + product_qty + "&user_id="+ user_id;
	////alert(url);
		xmlAddCartHttp = GetXmlHttpObject();
		xmlAddCartHttp.onreadystatechange = stateAddCart;
		xmlAddCartHttp.open("GET",url,true);
		xmlAddCartHttp.send(null);
	} catch(e) {
	//alert(e.discription);
	}
}

function stateAddCart() {
	try {
		if(xmlAddCartHttp.readyState==4 || xmlAddCartHttp.readyState=="complete") {
			try{
			
			var result = xmlAddCartHttp.responseText;
				if(result=="added") 
				{
					////alert(result);
					loadShopCart();
					document.getElementById('error_occur').style.display="none";
				}
				else if(result=="Notadded") 
				{
					////alert(result);
					document.getElementById('error_occur').innerHTML = "Sorry stock not available";
					document.getElementById('error_occur').style.display="inline";
				}
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}


function LogUser() {
	try {
	var url = "includes/user.status.php";
	////alert(url);
		xmlLogUserHttp = GetXmlHttpObject();
		xmlLogUserHttp.onreadystatechange = stateLogUser;
		xmlLogUserHttp.open("GET",url,true);
		xmlLogUserHttp.send(null);
		//document.getElementById("LogOff").innerHTML = "<img src=images/product-loader.gif>";
	} catch(e) {
	//alert(e.discription + "Error MYn");
	}
}

function stateLogUser() {
	try {
		if(xmlLogUserHttp.readyState==4 || xmlLogUserHttp.readyState=="complete") {
			try{
				
			var result = xmlLogUserHttp.responseText;
			
			if(result==1) {
					document.getElementById("UserOut").style.visibility = "hidden";
					document.getElementById("UserIn").style.visibility = "visible";
					document.getElementById("UserIn").style.height = "15px";
					document.getElementById("UserOut").style.height = "0px";
					//document.getElementById("CheckOther").style.display = "none";
					//document.getElementById("CheckUser").style.display = "block";
				} 
				
			if(result==0) {
				document.getElementById("UserIn").style.visibility = "hidden";
				document.getElementById("UserOut").style.visibility = "visible";
				document.getElementById("UserOut").style.height = "15px";
				document.getElementById("UserIn").style.height = "0px";
				//document.getElementById("CheckUser").style.display = "none";
				//document.getElementById("CheckOther").style.display = "block";
				}
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}

function LogOff() {
	try {
	var url = "includes/sign.out.user.php";
	////alert(url);
		xmlLogOffHttp = GetXmlHttpObject();
		xmlLogOffHttp.onreadystatechange = stateLogOff;
		xmlLogOffHttp.open("GET",url,true);
		xmlLogOffHttp.send(null);
		//document.getElementById("LogOff").innerHTML = "<img src=images/product-loader.gif>";
	} catch(e) {
	//alert(e.discription + "Error MYn");
	}
}

function stateLogOff() {
	try {
		if(xmlLogOffHttp.readyState==4 || xmlLogOffHttp.readyState=="complete") {
			try {
				//document.getElementById("LogOff").innerHTML = "";
			var result = xmlLogOffHttp.responseText;
			////alert(result);
			if(result=="sign off") {
					window.location.reload();
//					addNavigation('Index');
					var uname = document.getElementById("loginuname").value="";
					var pass = document.getElementById("pass").value="";
					//var errpass = document.getElementById("errpass").style.display = "none";
					LogUser();
				}
			} catch(e) {
			//alert(e.description);	
			}
		}
	}
	catch(e) {
	//alert(e.description);
	}
}

// ## login valid End ## //

// ## Change Pasword ## //

function checkLoginForm() 
{
	var loginuname = document.getElementById("loginuname").value;
	var pass = document.getElementById("pass").value;
	
	/////  regular exp ////
	var reWhiteSpace = new RegExp(/^\s+$/);
	var stringval = new RegExp(/^[a-zA-Z]/);
	
	/////////// user name starts //////////
	if (loginuname== "") {
	hideAllErrors();
	document.getElementById("erruser").style.display = "inline";
	document.getElementById("erruser").innerHTML="Please enter user name";
	document.getElementById("loginuname").select();
	document.getElementById("loginuname").focus();
	return false;
	}
	
	else if (reWhiteSpace.test(loginuname)) {
	hideAllErrors();
	document.getElementById("erruser").innerHTML="Whitespace is not allowed";
	document.getElementById("erruser").style.display = "inline";
	document.getElementById("loginuname").value="";
	document.getElementById("loginuname").select();
	document.getElementById("loginuname").focus();
	return false;
	}
	
	if(pass=="") {
	hideAllErrors();
	document.getElementById("errpass").style.display = "inline";
	document.getElementById("errpass").innerHTML="Please Enter Password";
	document.getElementById("pass").select();
	document.getElementById("pass").focus();
	return false;
	}
		
	if (reWhiteSpace.test(pass)) {
	hideAllErrors();
	document.getElementById("errpass").innerHTML="Whitespace is not allowed";
	document.getElementById("errpass").style.display = "inline";
	document.getElementById("pass").value="";
	document.getElementById("pass").select();
	document.getElementById("pass").focus();
	return false;
	}
	
	var myurl = "includes/login.user.php?uname=" + document.getElementById("loginuname").value + "&pass=" + document.getElementById("pass").value
	////alert(myurl);
	xmlLoginHttp=GetXmlHttpObject();
	xmlLoginHttp.onreadystatechange=stateChanged;
	//alert
	xmlLoginHttp.open("post",myurl,true);
	xmlLoginHttp.send(null);
	return false;
	//document.getElementById("loader").style.display = "inline";
}

function stateChanged() 
{ 
	if (xmlLoginHttp.readyState==4 || xmlLoginHttp.readyState=="complete")
	{ 
	var result = xmlLoginHttp.responseText;
	arres = result.split("~~")
	////alert(result);
		if(arres[0]=="correct") 
		{

			window.location="index.php";
	return false;
			
			/*document.getElementById("signinDiv").style.display = "none";
			//addNavigation('Index');
			LogUser();
			document.getElementById('errpass').style.display="none";
			document.getElementById('erruser').style.display="none";*/
		}
		 
		else if(result=="username") 
		{
			document.getElementById("errpass").innerHTML = "Incorrect Username";	
	return false;  
		} 
		else if(result=="password") 
		{
			document.getElementById("errpass").innerHTML = "Incorrect Password";	 
	return false; 
		} 
		else if(result=="in correct") 
		{
			document.getElementById("errpass").innerHTML = "Wrong username or password";
	return false;
		} 
		
		else  
		{
			document.getElementById('errpass').style.display="none";
			document.getElementById('erruser').style.display="none";
	return false;
		}
	}
}


function checkForgotpwd() 
{
	var forgotpwd = document.getElementById("forgotp").value;
	
	/////  regular exp ////
	var reWhiteSpace = new RegExp(/^\s+$/);
	var stringval = new RegExp(/^[a-zA-Z]/);
	//alert(forgotpwd);
	if (forgotpwd=="") {
	//hideAllErrors();
	document.getElementById("Forgot_Username").style.display = "inline";
	document.getElementById("Forgot_Username").innerHTML="Please enter your E-mail";
	document.getElementById("ForgotMailError").style.display="none";
	document.getElementById("ForgotMailError1").style.display="none";
	document.getElementById("ForgotMailError2").style.display="none";
	document.getElementById("GetPass").style.display="none";
	document.getElementById("GetNotPass").style.display="none";
	return false;
	}
	
	else if (reWhiteSpace.test(forgotpwd)) {
	//hideAllErrors();
	document.getElementById("Forgot_Username").innerHTML="Whitespace is not allowed";
	document.getElementById("Forgot_Username").style.display = "inline";
	document.getElementById("forgotpwd").value="";
	document.getElementById("ForgotMailError").style.display="none";
	document.getElementById("ForgotMailError1").style.display="none";
	document.getElementById("ForgotMailError2").style.display="none";
	document.getElementById("GetPass").style.display="none";
	document.getElementById("GetNotPass").style.display="none";
	return false;
	}
	
	else if((forgotpwd.charCodeAt(0)< 97 || forgotpwd.charCodeAt(0) > 122)&&(forgotpwd.charCodeAt(0) < 65 || forgotpwd.charCodeAt(0) > 90)) 
	{
		document.getElementById("ForgotMailError2").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Email address should start with a character</font>";
		document.getElementById("ForgotMailError2").style.display="inline";
		document.getElementById("Forgot_Username").style.display="none";
		document.getElementById("ForgotMailError").style.display="none";
		document.getElementById("ForgotMailError1").style.display="none";
		document.getElementById("GetPass").style.display="none";
		document.getElementById("GetNotPass").style.display="none";
		return false;
	}
	
	else if (!isNotEmail(forgotpwd)) {
	//hideAllErrors();
	//alert("hai");
	document.getElementById("ForgotMailError1").style.display = "inline";
	document.getElementById("ForgotMailError2").style.display="none";
	document.getElementById("Forgot_Username").style.display="none";
	return false;
	}
	
	else if (!checkemail(forgotpwd)) {
	//hideAllErrors();
	//alert("hai");
	document.getElementById("ForgotMailError1").style.display = "inline";
	document.getElementById("ForgotMailError2").style.display="none";
	document.getElementById("Forgot_Username").style.display="none";
	return false;
	}
	
	var myurl = "includes/forgot.pwd.php?forgotpwd=" + document.getElementById("forgotp").value;
	////alert(myurl);
	xmlForgotpwd=GetXmlHttpObject();
	xmlForgotpwd.onreadystatechange=stateCheckforgotpwd;
	xmlForgotpwd.open("post",myurl,true);
	xmlForgotpwd.send(null);
	//return false;
	//document.getElementById("loader").style.display = "inline";
}

function stateCheckforgotpwd() 
{ 
	if (xmlForgotpwd.readyState==4 || xmlForgotpwd.readyState=="complete")
	{ 
	var result = xmlForgotpwd.responseText;
	sresult = result.split("~");
	
		if(result=="CheckForgotEmail")
		{   
			document.getElementById("ForgotMailError").innerHTML="There is no user registered with this email address.";
			document.getElementById("ForgotMailError").style.display="inline";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError1").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("GetPass").style.display="none";
			document.getElementById("GetNotPass").style.display="none";
		}
		
		else if(result=="SendPass")
		{
			
			//document.getElementById("GetPass").innerHTML="The Password has been sent to your mail address";
			//document.getElementById("GetPass").style.display="inline";
			document.getElementById("GetNotPass").style.display="none";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError").style.display="none";
			document.getElementById("ForgotMailError1").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("forgotp").value="";
			//document.getElementById("forgotDiv").style.display="none";
			//addNavigation('Index');
			alert("The Password has been sent to your mail address");
			window.location="login.php";
		}
		
		else if(sresult[1]=="NotSend")
		{
			//alert("failure");
			document.getElementById("GetNotPass").innerHTML="There was a problem to sending mail";
			document.getElementById("GetNotPass").style.display="inline";
			document.getElementById("GetPass").style.display="none";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError").style.display="none";
			document.getElementById("ForgotMailError1").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("forgotp").value="";
		}
	}
}

function checkChangePasswd() 
{
	var OP = document.getElementById("OP").value; // Old Password
	var NP = document.getElementById("NP").value; // New Password
	var CP = document.getElementById("CP").value; // Confirm Password

	/////  regular exp ////
	var reWhiteSpace = new RegExp(/^\s+$/);
	var stringval = new RegExp(/^[a-zA-Z]/);
	
	/////////// user name starts //////////
	if (OP=="") {
	//hideAllErrors();
	document.getElementById("OldError").style.display="inline";
	document.getElementById("OldError").innerHTML="Please enter old password";
	document.getElementById("OP").select();
	document.getElementById("OP").focus();
	return false;
	}
	
	else if (reWhiteSpace.test(OP)) {
	//hideAllErrors();
	document.getElementById("OldError").innerHTML="Whitespace is not allowed";
	document.getElementById("OldError").style.display="inline";
	document.getElementById("OP").value="";
	document.getElementById("OP").select();
	document.getElementById("OP").focus();
	return false;
	}
	
	if(NP=="") {
	//hideAllErrors();
	document.getElementById("NewError").style.display="inline";
	document.getElementById("NewError").innerHTML="Please enter new password";
	document.getElementById("PError").style.display="none";
	document.getElementById("NP").select();
	document.getElementById("NP").focus();
	return false;
	}
		
	if (reWhiteSpace.test(NP)) {
	//hideAllErrors();
	document.getElementById("NewError").innerHTML="Whitespace is not allowed";
	document.getElementById("NewError").style.display="inline";
	document.getElementById("NP").value="";
	document.getElementById("NP").select();
	document.getElementById("NP").focus();
	return false;
	}
	
	if(NP.length < 6){
	//hideAllErrors();
	document.getElementById("PError").innerHTML="Please enter greaterthan 6 char of password";
	document.getElementById("PError").style.display="inline";
	document.getElementById("NewError").style.display="none";
	document.getElementById("NP").select();
	document.getElementById("NP").focus();
	return false;
	}
	
	if(CP=="") {
	//hideAllErrors();
	document.getElementById("ConfirmError").style.display="inline";
	document.getElementById("ConfirmError").innerHTML="Please enter confirm password";
	document.getElementById("CPError").style.display="none";
	document.getElementById("CP").select();
	document.getElementById("CP").focus();
	return false;
	}
		
	if (reWhiteSpace.test(CP)) {
	//hideAllErrors();
	document.getElementById("ConfirmError").innerHTML="Whitespace is not allowed";
	document.getElementById("ConfirmError").style.display="inline";
	document.getElementById("CPError").style.display="none";
	document.getElementById("CP").value="";
	document.getElementById("CP").select();
	document.getElementById("CP").focus();
	return false;
	}
	
	if(CP.length < 6){
	//hideAllErrors();
	document.getElementById("CPError").innerHTML="Please enter greaterthan 6 char of password";
	document.getElementById("CPError").style.display="inline";
	document.getElementById("ConfirmError").style.display="none";
	document.getElementById("CP").select();
	document.getElementById("CP").focus();
	return false;
	}
	
	var myurl = "includes/change.pwd.php?OP=" + document.getElementById("OP").value + "&NP=" + document.getElementById("NP").value + "&CP=" + document.getElementById("CP").value;
	////alert(myurl);
	xmlChangepwdHttp=GetXmlHttpObject();
	xmlChangepwdHttp.onreadystatechange=stateChangedpwd;
	xmlChangepwdHttp.open("post",myurl,true);
	xmlChangepwdHttp.send(null);
	//document.getElementById("loader").style.display = "inline";
}

function stateChangedpwd() 
{ 
	if (xmlChangepwdHttp.readyState==4 || xmlChangepwdHttp.readyState=="complete")
	{ 
	
	var result = xmlChangepwdHttp.responseText;
	////alert(result);
		if(result=="WrongPass")
		{
			document.getElementById("ConfirmPassError").innerHTML="Please enter your correct password";
			document.getElementById("ConfirmMissmatch").style.display="none";
			document.getElementById("OldError").style.display="none";
			document.getElementById("NewError").style.display="none";
			document.getElementById("ConfirmError").style.display="none";
			document.getElementById("PError").style.display="none";
			document.getElementById("CPError").style.display="none";
			document.getElementById("PasswordChanged").style.display="none";
			
		}
		
		else if(result=="MissMatch")
		{
			document.getElementById("ConfirmMissmatch").innerHTML="Missmatch your password";
			document.getElementById("ConfirmMissmatch").style.display="inline";
			document.getElementById("ConfirmPassError").style.display="none";
			document.getElementById("OldError").style.display="none";
			document.getElementById("NewError").style.display="none";
			document.getElementById("ConfirmError").style.display="none";
			document.getElementById("PError").style.display="none";
			document.getElementById("CPError").style.display="none";
			document.getElementById("PasswordChanged").style.display="none";
		}
		
		else if(result=="UP")
		{
			
			document.getElementById("PasswordChanged").innerHTML="Your password is changed";
			document.getElementById("PasswordChanged").style.display="inline";
			document.getElementById("OP").value="";
			document.getElementById("NP").value="";
			document.getElementById("CP").value="";
			document.getElementById("OldError").style.display="none";
			document.getElementById("NewError").style.display="none";
			document.getElementById("ConfirmError").style.display = "none";
			document.getElementById("ConfirmPassError").style.display="none";
			document.getElementById("ConfirmMissmatch").style.display="none";
			//document.getElementById("ChangeDiv").style.display = "none";
			document.getElementById("PError").style.display="none";
			document.getElementById("CPError").style.display="none";
			window.location="index.php"

		}
	
	}
}

function addCommands()
{
	////alert(document.getElementById("txt_Commands").value);
	//errcommands
		
		if(trim(document.getElementById("txt_Commands").value)=="")
		{
			document.getElementById('errcommands').innerHTML="Please enter your valid comments";
			document.getElementById('errcommands').style.display="block";
		}

		else
		{
			xmlpostcommentsHttp=GetXmlHttpObject();
			xmlpostcommentsHttp.onreadystatechange=add_state;
			xmlpostcommentsHttp.open("GET","includes/commands.php?commands="+document.getElementById("txt_Commands").value,true);
			xmlpostcommentsHttp.send(null);
			document.getElementById('errcommands').style.display="none";
		}
}

function add_state() 
{ 
	if (xmlpostcommentsHttp.readyState==4 || xmlpostcommentsHttp.readyState=="complete")
	{ 
		//var result = xmlpostcommentsHttp.responseText;
		//alert("Your comments has been posted successfully");
		document.getElementById("txt_Commands").value="";
		window.location="bestsellers.php";
		/*addNavigation('ShowThread9');*/
	}
}

function post_comments(categ)
{	
	document.getElementById("txt_Commands").value="";
	xmlpostcommentsHttp=GetXmlHttpObject();
	url = "includes/commands.php?cate="+categ;
	xmlpostcommentsHttp.onreadystatechange=post_state;
	xmlpostcommentsHttp.open("GET",url,true);
	xmlpostcommentsHttp.send(null);
}

function post_state() 
{ 
	if (xmlpostcommentsHttp.readyState==4 || xmlpostcommentsHttp.readyState=="complete")
	{ 
		document.getElementById("txt_Commands").value="";
		document.getElementById('errcommands').innerHTML="";
		addNavigation('post_comments');
	}
}

function review_comments(cate)
{	
	xmlreviewcommentsHttp=GetXmlHttpObject();
	xmlreviewcommentsHttp.onreadystatechange=review_state;
	xmlreviewcommentsHttp.open("GET","includes/reviewlisting.php?cate="+cate);
	xmlreviewcommentsHttp.send(null);
}

function review_state() 
{ 
	if (xmlreviewcommentsHttp.readyState==4 || xmlreviewcommentsHttp.readyState=="complete")
	{ 
		document.getElementById("reviewcomments").innerHTML=xmlreviewcommentsHttp.responseText;
		addNavigation('review_comments');
	}
}

/*function trim(s)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not a whitespace, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (c != " ") returnString += c;
    }
    return returnString;
}*/

function feedbackCommands()
{
	////alert(document.getElementById("txt_Commands").value);
	//errcommands
		var char=/^[a-z\sA-z\.]*$/;
		if(trim(document.getElementById("txt_Feedbacks").value)=="")
		{   
			document.getElementById('errfeedback').innerHTML="Please enter your valid feedbacks";
			document.getElementById('errfeedback').style.display="block";
		}
		else if (!char.test(document.getElementById("txt_Feedbacks").value))
		{
			document.getElementById('errfeedback').innerHTML="Only Characters allowed";
			document.getElementById('errfeedback').style.display="block";
		}

		else
		{   
			xmlfeedbackcommentsHttp=GetXmlHttpObject();
			xmlfeedbackcommentsHttp.onreadystatechange=feedbackadd_state;
			xmlfeedbackcommentsHttp.open("GET","includes/feedback.php?feedbacks="+document.getElementById("txt_Feedbacks").value,true);
			xmlfeedbackcommentsHttp.send(null);
			document.getElementById('errfeedback').style.display="none";
		}
}

function feedbackadd_state() 
{ 
	if (xmlfeedbackcommentsHttp.readyState==4 || xmlfeedbackcommentsHttp.readyState=="complete")
	{ 
		//var result = xmlpostcommentsHttp.responseText;
		////alert(document.getElementById("txt_Feedbacks").value.length);
		//alert("Your comments has been posted successfully");
		document.getElementById("txt_Feedbacks").value="";
		document.getElementById("errfeedback").style.display="none";
		window.location="contactus.php";
	}
}

function hideAllErrors() {
document.getElementById("erruser").style.display = "none";
document.getElementById("errpass").style.display = "none";
}

//login valid completed

//Register validation

function validation(dynamic,str,filename) {

    var element;
   	var FirstError = '';
	var lastElement = '';
	var Content = '';
	var last = '';
	var lcon = '';
	var radioErr = '';
	var prvPass = '';
	var prvEmail = '';
	var QueryString = '';
	var totData = '';
	var xmlInsertHttp;
	password=dynamic.elements[1].value;
   	for (i = 0; i < dynamic.elements.length; i++) 
	{
        element = dynamic.elements[i];
		
			if(str.search(element.name)==-1)
			{
			
				
switch (element.type) 
{
case 'text':

var Regname = element.name;

if(Regname.search("uname")!=-1)
{
	if(element.value=="")
	{	
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter your username</font>";
		document.getElementById("uname_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(element.value.length < 3)
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter greater than 3 characters</font>";
		document.getElementById("uname_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if((element.value.charCodeAt(0)< 97 || element.value.charCodeAt(0) > 122)&&(element.value.charCodeAt(0) < 65 || element.value.charCodeAt(0) > 90))
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Name should be start with a character</font>";
		document.getElementById("uname_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		document.getElementById("uname_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

var Bill = element.name;

if(Bill.search("billname")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter your billing name</font>";
		document.getElementById("billname_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(element.value.length < 3)
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter greater than 3 characters</font>";
		document.getElementById("billname_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if((element.value.charCodeAt(0)< 97 || element.value.charCodeAt(0) > 122)&&(element.value.charCodeAt(0) < 65 || element.value.charCodeAt(0) > 90))
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Billing name should start with a character</font>";
		document.getElementById("billname_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById("billname_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

var Billcity = element.name;

if(Billcity.search("city")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter the city name</font>";
		document.getElementById("city_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if((element.value.charCodeAt(0)< 97 || element.value.charCodeAt(0) > 122)&&(element.value.charCodeAt(0) < 65 || element.value.charCodeAt(0) > 90))
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>City name should start with a character</font>";
		document.getElementById("city_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(!charcheck(element.value))
	{
		document.getElementById("city_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById("city_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

var Billzipcode = element.name;

if(Billzipcode.search("zipcode")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter the zipcode</font>";
		document.getElementById("zipcode_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(!validateZIP(element.value))
	{
		//document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Please enter the valid zipcode</font>";
		document.getElementById("zipcode_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById("zipcode_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

var Billphoneno = element.name;

/*if(Billphoneno.search("phoneno")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter the mobile number</font>";
		document.getElementById("phoneno_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(!checkInternationalPhone(element.value))
	{
		document.getElementById("phoneno_err").innerHTML="Please enter a valid mobile number";
		document.getElementById("phoneno_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(!Numbersonly(element.value))
	{
		document.getElementById("phoneno_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if((element.value < 10))
	{
		document.getElementById("phoneno_err").innerHTML="Please enter a 10-digit valid mobile number";
		document.getElementById("phoneno_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById("phoneno_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}
*/
var myval = element.name;

if(myval.search("mail")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter the E-mail</font>";
		document.getElementById("mail_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if((element.value.charCodeAt(0)< 97 || element.value.charCodeAt(0) > 122)&&(element.value.charCodeAt(0) < 65 || element.value.charCodeAt(0) > 90)) 
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Email address should start with a character</font>";
		document.getElementById("mail_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(!isNotEmail(element.value)) 
	{
		document.getElementById("mail_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(!checkemail(element.value))
	{
		document.getElementById("mail_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		//document.getElementById("mail_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

// ## Billing Information Mail ## //

var BillMail = element.name;

if(BillMail.search("Email")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter the E-mail</font>";
		document.getElementById("Email_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if((element.value.charCodeAt(0)< 97 || element.value.charCodeAt(0) > 122)&&(element.value.charCodeAt(0) < 65 || element.value.charCodeAt(0) > 90)) 
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Email address should start with a character</font>";
		document.getElementById("Email_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(!isNotEmail(element.value)) 
	{
		document.getElementById("Email_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(!checkemail(element.value))
	{
		document.getElementById("Email_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		document.getElementById("Email_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}
break;
			
case 'textarea':

var address = element.name;

if(address.search("address")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="Please enter the address";
		document.getElementById("address_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(!checkspecial(element.value))
	{
		document.getElementById("address").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		//document.getElementById("address_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

var shippingaddress = element.name;

if(shippingaddress.search("shippingaddress")!=-1)
{
	////alert(element.name);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="Please enter the shipping address";
		document.getElementById("shippingaddress_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else if(!checkspecialShipping(element.value))
	{
		document.getElementById("shippingaddress_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		document.getElementById("shippingaddress_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}
break;

case 'password':

var pwd = element.name;

if(pwd.search('pass')!=-1)
{
	////alert(pwd);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter password</font>";
		document.getElementById("pass_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(element.value.length<6) 
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px;color:#FF0000'>Password should be at least 6 characters long</font>";
		document.getElementById("pass_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		document.getElementById("pass_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
	
}

var cpwd = element.name;

if(cpwd.search('cpass')!=-1)
{
	if(element.value=="")
	{
		document.getElementById("cpass_err").style.display="inline";
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter confirm password</font>";
		FirstError += element.name + ",";	
	}
	else if(password!=element.value)

	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Password missmatch</font>";
		document.getElementById("cpass_err").style.display="inline";
		FirstError += element.name + ",";
	}

	else
	{
		document.getElementById(element.name+"_err").innerHTML="";
		document.getElementById("cpass_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}	
}	
break;

case 'select-one':

var Billcountry = element.name;

if(Billcountry.search("country")!=-1)
{
	////alert(Billcountry);
	if(element.value==0)
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please select the country</font>";
		document.getElementById("country_err").style.display="inline";
		FirstError += element.name + ",";
	}
	else
	{
		document.getElementById("country_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}

var Billstate = element.name;

if(Billstate.search("state")!=-1)
{
	////alert(element.value);
	if(element.value=="")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please select the state</font>";
		document.getElementById("state_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else if(element.value=="-Select-")
	{
		document.getElementById(element.name+"_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please select the state</font>";
		document.getElementById("state_err").style.display="inline";
		FirstError += element.name + ",";
	}
	
	else
	{
		document.getElementById("state_err").style.display="none";
		totData += element.name + '=' + escape(element.value) + '&';
		QueryString += element.name + "=" + element.value + "&";
	}
}
break;

case 'hidden':
if(element.value=="")
{
	document.getElementById(element.name+"_err").innerHTML="<img src=images/delete.png>";
	FirstError += element.name + ",";
}
else
{
	document.getElementById(element.name+"_err").innerHTML="<img src=images/checkbullet.gif>";
	totData += element.name + '=' + escape(element.value) + '&';
	QueryString += element.name + "=" + element.value + "&";
}
break;
		
case 'radio':
if (element.checked)
{
	if (element.name == last)
	{
		if (lcon.lastIndexOf('&') == lcon.length-1)
		{
			lcon = lcon.substr(0, lcon.length - 1);
		}
			lcon += ',' + escape(element.value);
		} 
		else 
		{
			lcon += element.name + '=' + escape(element.value);
		}
			lcon += '&';
			last = element.name;
			document.getElementById(element.name+"_err").innerHTML="<img src=images/checkbullet.gif>";
			//document.getElementById(element.name+"_label").className="content";
		} 
		else 
		{
			document.getElementById(element.name+"_err").innerHTML="<img src=images/delete.png>";
			//document.getElementById(element.name+"_label").className="err_content";
			if(FirstError.search(element.name)==-1) {
			FirstError += element.name + ",";
		}
	}
break;

case 'checkbox':
if (element.checked)
{
	if (element.name == lastElement)
	{
		if (Content.lastIndexOf('&') == Content.length-1)
		{
			Content = Content.substr(0, Content.length - 1);
		}
			Content += ',' + escape(element.value);
		} 
		else 
		{
			Content += element.name + '=' + escape(element.value);
		}
			Content += '&';
			lastElement = element.name;
			document.getElementById(element.name+"_err").innerHTML="<img src=images/checkbullet.gif>";
			//document.getElementById(element.name+"_label").className="content";
		} 
		else
		{
		document.getElementById(element.name+"_err").innerHTML="<img src=images/delete.png>";
			if(FirstError.search(element.name)==-1)
			{
				FirstError += element.name + ",";
			}
		}
break;
			default:
				totData += lcon;
				totData += Content;
				QueryString += Content;
				var result = Content.split("&");
				for(a=0;a<result.length-1;a++)
				{
				var newdata = result[a].split("=");
					if(newdata[1].length>0) 
					{
						FirstError = FirstError.replace(newdata[0]+",","");
						document.getElementById(newdata[0]+"_err").innerHTML="";
					}
				}
				QueryString += lcon;
				var res = lcon.split("&");
				for(b=0;b<res.length-1;b++)
				{
					var data = res[b].split("=");
					if(data[1].length>0)
					{
						FirstError = FirstError.replace(data[0]+",","");
						document.getElementById(data[0]+"_err").innerHTML="";	
					}
				}
				if(QueryString.length>255) 
				{
					////alert("QueryString is Greater than 255 :" + QueryString.length);
				}
				////alert(QueryString);
				conErr = FirstError.split(",");
				if(conErr[0]=="country")
				{
				FirstError="";
				}
				if(FirstError.length>0) 
				{
					var resErr = FirstError.split(",");
					if(resErr[0]=="country")
					{
					return true;
					}
					else
					{
					document.getElementsByName(resErr[0])[0].focus();
					return false;
					}
				}
				else if(filename.length>0)
				{	
					//alert(filename);
					var url = filename + '?' + totData;
					xmlRegInsertHttp=GetXmlHttpObject();
					xmlRegInsertHttp.onreadystatechange=stateRegInsert;
					xmlRegInsertHttp.open("get",url,true);
					xmlRegInsertHttp.send(null);
				}
				break;
		}
    	}else{ // (non mantadory fields)
		totData += element.name + '=' + escape(element.value)+ '&';
		//alert(totData);	
	     }
	}
}

function stateRegInsert() 
{ 
	if (xmlRegInsertHttp.readyState==4 || xmlRegInsertHttp.readyState=="complete")
	{ 
		var result = xmlRegInsertHttp.responseText;
		//alert(result);
		sresult = result.split("~");
		if(sresult[1]==1) {
			alert("Successfully Registered...!");
			//document.getElementById("RegisterDiv").style.display = "none";
			//document.getElementById("RegisterResultDiv").style.display = "block";
			document.getElementById("uname").value="";
			document.getElementById("pass").value="";
			document.getElementById("cpass").value="";
			document.getElementById("mail").value="";
			//displayBox2('signinDiv');
			//window.location="index.php";
			window.location="login.php";
			/*window.close();
			window.opener.location.reload();*/
			
		} else if(result==2) {
				//document.getElementById("CheckoutDiv").style.display = "none";
				//document.getElementById("Emptycheck").style.dispaly="none";
//				document.getElementById("billname").value="";
//				document.getElementById("address").value="";
//				document.getElementById("shippingaddress").value="";
//				document.getElementById("country").value="";
//				document.getElementById("state").value="";
//				document.getElementById("city").value="";
//				document.getElementById("zipcode").value="";
//				document.getElementById("Email").value="";
//				document.getElementById("phoneno").value="";
				//document.getElementById(element.name+"_err").innerHTML="";
				//addNavigation('ShowRoom');
				window.location="includes/paypal.check.php";
		} 
		else if(result==3) 
		{
			document.getElementById("mail_err").style.display = "block";
			document.getElementById("mail_err").innerHTML="Change UserName or Email";
		}
	}
}

function Cartempty()
{
var b = document.getElementsByTagName('input');
//////alert(b);
var count=0;
for (i=0;i<b.length;i++)
{
	var box=b[i];
		if(	box.value!='' && box.type=='text')
		{
		count++;
		break;
		}
}

	if (count!="")
	{
		//////alert(count);
		//////alert('You put something in the box');
		document.getElementById('Errorempty').innerHTML="Quantity should not be empty";
	}
	else 
	{
		//alert ('You Must Enter Something in the box ');
		document.getElementById('Errorempty').innerHTML="Quantity should not be empty";
		//document.getElementById('Errorempty').style.display="none";
	}
return true;
	
}

/*    mailstr=value;
	
	a = mailstr.indexOf(".");

	b = mailstr.indexOf("@");

	c = mailstr.indexOf(" ");
	
	d = mailstr.lastIndexOf(".");

	e = mailstr.length;

	if( (a == -1) || (b == -1) || (c != -1) || (d < b) || ( d == e - 1) || (b+1 == a) )
	{
	  return true
	}
	else
	return false;*/

function validateZIP(field)
{
var valid = "0123456789-";
var hyphencount = 0;

if (field.length!=5)
{
//////alert("Please enter your 5 digit or 5 digit+4 zip code.");
document.getElementById("zipcode_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Please enter valid zipcode.</font>";
//Please enter your 5 digit or 5 digit+4 zip code.
return false;
}
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
//////alert("Invalid characters in your zip code.  Please try again.");
document.getElementById("zipcode_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid characters in your zip code.</font>";
return false;
}
//if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
////////alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
//document.getElementById("zipcode_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The hyphen character should be used with a properly formatted 5 digit+four zip code, like '123456-7890'.Please try again.</font>";
//return false;
//   }
}
return true;
}
	
function isNotEmail(value)
{
	/* The following variable tells the rest of the function whether or not
	to verify that the address ends in a two-letter country or well-known
	TLD.  1 means check it, 0 means don't. */
	var checkTLD=1;
	/* The following is the list of known TLDs that an e-mail address must end with. */
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	/* The following pattern is used to check if the entered e-mail address
	fits the user@domain format.  It also is used to separate the username
	from the domain. */
	var emailPat=/^(.+)@(.+)$/;
	/* The following string represents the pattern for matching all special
	characters.  We don't want to allow special characters in the address. 
	These characters include ( ) < > @ , ; : \ " . [ ] */
	var specialChars="\\(\\)><@,;:\\\\\\\"\\_\\[\\]";
	var specialCharsfordot="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	/* The following string represents the range of characters allowed in a 
	username or domainname.  It really states which chars aren't allowed.
	*/
	var validChars="\[^\\s" + specialChars + "\]";
	var validCharsdot="\[^\\s" + specialCharsfordot + "\]";
	/* The following pattern applies if the "user" is a quoted string (in
	which case, there are no rules about which characters are allowed
	and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
	is a legal e-mail address. */
	var quotedUser="(\"[^\"]*\")";
	/* The following pattern applies for domains that are IP addresses,
	rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
	e-mail address. NOTE: The square brackets are required. */
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	/* The following string represents an atom (basically a series of non-special characters.) */
	var atom=validChars + '+';
	var atomdot=validCharsdot + '+';
	/* The following string represents one word in the typical username.
	For example, in john.doe@somewhere.com, john and doe are words.
	Basically, a word is either an atom or quoted string. */
	var word="(" + atom + "|" + quotedUser + ")";
	var worddot="(" + atomdot + "|" + quotedUser + ")";
	// The following pattern describes the structure of the user
    var userPats=new RegExp("^" + worddot + "(\\." + worddot + ")*$");
	var userPat=new RegExp("^" + word + "(\\_" + word + ")*$");
	/* The following pattern describes the structure of a normal symbolic
	domain, as opposed to ipDomainPat, shown above. */
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	/* Finally, let's start trying to figure out if the supplied address is valid. */
	/* Begin with the coarse pattern to simply break up user@domain into
	different pieces that are easy to analyze. */
	var matchArray=value.match(emailPat);
	if (matchArray==null)
	{
		/* Too many/few @'s or something; basically, this address doesn't
		even fit the general mould of a valid e-mail address. */
		//////alert("Email address seems incorrect (check @ and . )");
		document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Email address seems incorrect (check @ and . )</font>";
		document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Email address seems incorrect (check @ and . )</font>";
		document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Email address seems incorrect (check @ and . )</font>";
		document.getElementById("Forgot_Username").style.display="none";
		document.getElementById("ForgotMailError").style.display="none";
		document.getElementById("ForgotMailError2").style.display="none";
		document.getElementById("GetPass").style.display="none";
		document.getElementById("GetNotPass").style.display="none";
		return false;
	}
	var user=matchArray[1];
	var domain=matchArray[2];
	// Start by checking that only basic ASCII characters are in the strings (0-127).
	for (i=0; i<user.length; i++)
	{
		if (user.charCodeAt(i)>127)
		{
			//////alert("This Email Address contains invalid characters.");
			document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This Email Address contains invalid characters</font>";
			document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This Email Address contains invalid characters</font>";
			document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This Email Address contains invalid characters</font>";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("GetPass").style.display="none";
			document.getElementById("GetNotPass").style.display="none";
			return false;
		}
	}
	for (i=0; i<domain.length; i++)
	{
		if (domain.charCodeAt(i)>127)
		{
			//////alert("This domain name contains invalid characters.");
			document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This domain name contains invalid characters</font>";
			document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This domain name contains invalid characters</font>";
			document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This domain name contains invalid characters</font>";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("GetPass").style.display="none";
			document.getElementById("GetNotPass").style.display="none";
			return false;
		}
	}
	// See if "user" is valid 
	if (user.match(userPat)==null)
	{
	// user is not valid
		//////alert("Invalid Email.");
		document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid Email</font>";
		document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid Email</font>";
		document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid Email</font>";
		document.getElementById("Forgot_Username").style.display="none";
		document.getElementById("ForgotMailError").style.display="none";
		document.getElementById("ForgotMailError2").style.display="none";
		document.getElementById("GetPass").style.display="none";
		document.getElementById("GetNotPass").style.display="none";
		return false;
	}
	
	if (user.match(userPats)==null)
	{
	// user is not valid
		//////alert("Invalid Email.");
		document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid Email</font>";
		document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid Email</font>";
		document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Invalid Email</font>";
		document.getElementById("Forgot_Username").style.display="none";
		document.getElementById("ForgotMailError").style.display="none";
		document.getElementById("ForgotMailError2").style.display="none";
		document.getElementById("GetPass").style.display="none";
		document.getElementById("GetNotPass").style.display="none";
		return false;
	}
	/* if the e-mail address is at an IP address (as opposed to a symbolic
	host name) make sure the IP address is valid. */
	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null)
	{
		// this is an IP address
		for (var i=1;i<=4;i++)
		{
			if (IPArray[i]>255)
			{
				//////alert("Destination IP address is invalid!");
				document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Destination IP address is invalid!</font>";
				document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Destination IP address is invalid!</font>";
				document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Destination IP address is invalid!</font>";
				document.getElementById("Forgot_Username").style.display="none";
				document.getElementById("ForgotMailError").style.display="none";
				document.getElementById("ForgotMailError2").style.display="none";
				document.getElementById("GetPass").style.display="none";
				document.getElementById("GetNotPass").style.display="none";
				return false;
		   }
		}
		return true;
	}
	// Domain is symbolic name.  Check if it's valid.
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	
	for (i=0;i<len;i++)
	{
		if (domArr[i].search(atomPat)==-1)
		{
			//////alert("The Domain Name does not seem to be valid.");
			document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The Domain Name does not seem to be valid</font>";
			document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The Domain Name does not seem to be valid</font>";
			document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The Domain Name does not seem to be valid</font>";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("GetPass").style.display="none";
			document.getElementById("GetNotPass").style.display="none";
			return false;
		}
	}
	
	/* domain name seems valid, but now make sure that it ends in a
	known top-level domain (like com, edu, gov) or a two-letter word,
	representing country (uk, nl), and that there's a hostname preceding 
	the domain or country. */
	if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1)
	{
		//////alert("The address must end in a well-known domain or two letter " + "country.");
		document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The address must end in a well-known domain or &nbsp;&nbsp;&nbsp;two letter " + "country.</font>";
		document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The address must end in a well-known domain or &nbsp;&nbsp;&nbsp;two letter " + "country.</font>";
		document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>The address must end in a well-known domain or two letter " + "country.</font>";
		document.getElementById("Forgot_Username").style.display="none";
		document.getElementById("ForgotMailError").style.display="none";
		document.getElementById("ForgotMailError2").style.display="none";
		document.getElementById("GetPass").style.display="none";
		document.getElementById("GetNotPass").style.display="none";
		return false;
	}
	// Make sure there's a host name preceding the domain.
	if (len<2)
	{
		//////alert("This address is missing a hostname!");
		document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This address is missing a hostname!</font>";
		document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This address is missing a hostname!</font>";
		document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>This address is missing a hostname!</font>";
		document.getElementById("Forgot_Username").style.display="none";
		document.getElementById("ForgotMailError").style.display="none";
		document.getElementById("ForgotMailError2").style.display="none";
		document.getElementById("GetPass").style.display="none";
		document.getElementById("GetNotPass").style.display="none";
		return false;
	}
return true;
}

function checkemail(Field)								
{
	var iChars = "!~`#$%&*!`~^+=[]\\\;/{}|\":<>?";
	for (var i = 0; i < Field.length; i++)
	{
		if (iChars.indexOf(Field.charAt(i)) != -1)
		{	
			//////alert("Special characters are not allowed")
			document.getElementById("mail_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Special characters are not allowed</font>";
			document.getElementById("Email_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Special characters are not allowed</font>";
			document.getElementById("ForgotMailError1").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Special characters are not allowed</font>";
			document.getElementById("Forgot_Username").style.display="none";
			document.getElementById("ForgotMailError").style.display="none";
			document.getElementById("ForgotMailError2").style.display="none";
			document.getElementById("GetPass").style.display="none";
			document.getElementById("GetNotPass").style.display="none";
			return false;
		}
	}
return true;
}

function charcheck(Field)						
{
	var iChars = "0123456789!~`@$%&*!`~^+=[]\\\;,:./{}|\"<>?";
    for (var i = 0; i < Field.length; i++)
	{
    	if (iChars.indexOf(Field.charAt(i)) != -1)
		{
			//////alert("Alphabets are not allowed");
				document.getElementById("city_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Characters only allowed</font>";
		document.getElementById("state_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Characters only allowed</font>";
		document.getElementById("country_err").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>Characters only allowed</font>";
			return false;
		}
    }
	document.getElementById("city_err").style.display="none";
	document.getElementById("state_err").style.display="none";
	document.getElementById("country_err").style.display="none";
return true;
}

function Numbersonly(v)
{
	var num=v.charAt(0);
	var numnext = v.charAt(1);
	//////alert(num);
	//if((num==1) || (num==2) || (num==3) || (num==4) || (num==5) || (num==6) || (num==7) || (num==8))
//	{
//		document.getElementById("phoneno_err").innerHTML="Mobile number starts only in Zero OR Nine";
//		return false;
//	}
//	else if((num!=1) && (numnext!=9))
//	{
//		//////alert(numnext);
//		if((numnext==1) || (numnext==2) || (numnext==3) || (numnext==4) || (numnext==5) || (numnext==6) || (numnext==7) || (numnext==8))
//		{
//			document.getElementById("phoneno_err").innerHTML="Mobile number second value must starts in Nine";
//			return false;
//		}
//	}
return true;
}

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}
function trim(s)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not a whitespace, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (c != " ") returnString += c;
    }
    return returnString;
}
function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
var bracket=3
strPhone=trim(strPhone)
if(strPhone.indexOf("+")>1) return false
if(strPhone.indexOf("-")!=-1)bracket=bracket+1
if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return false
var brchr=strPhone.indexOf("(")
if(strPhone.indexOf("(")!=-1 && strPhone.charAt(brchr+2)!=")")return false
if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

/*function ValidateForm(){
	var Phone=document.frmSample.txtPhone
	
	if ((Phone.value==null)||(Phone.value=="")){
		////alert("Please Enter your Phone Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		////alert("Please Enter a Valid Phone Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true
 }*/

function checkspecial(Field)								
{
	var iChars = "!~`@$%&*!`~^+=[]\\\;/{}|\"<>?";
	            
	for (var i = 0; i < Field.length; i++)
	{
		if (iChars.indexOf(Field.charAt(i)) != -1)
		{	
			//////alert("Special characters are not allowed")
			document.getElementById("address").innerHTML="Special characters are not allowed";
			return false;
		}
	}
return true;
}

function checkspecialShipping(Field)								
{
	var iChars = "!~`@$%&*!`~^+=[]\\\;/{}|\"<>?";
	            
	for (var i = 0; i < Field.length; i++)
	{
		if (iChars.indexOf(Field.charAt(i)) != -1)
		{	
			//////alert("Special characters are not allowed")
			document.getElementById("shippingaddress_err").innerHTML="Special characters are not allowed";
			return false;
		}
	}
return true;
}

function checkUserAvailability(username)
{
//////alert(username);
	try {
		var url = 'includes/user.availability.php?unamevalue='+username;
	    //////alert(url);
	    xmlCheckUserHttp=GetXmlHttpObject();
	    xmlCheckUserHttp.onreadystatechange = stateCheckUser;
		xmlCheckUserHttp.open("post",url,true);
	    xmlCheckUserHttp.send(null);
	  //document.getElementById("uname_err").innerHTML="<img src=images/ajax-loader.gif>";
	} catch(e) {
	//alert(e.discription);
	}
}

function stateCheckUser()	
{

	if (xmlCheckUserHttp.readyState==4 || xmlCheckUserHttp.readyState=="complete") 
	{
		//document.getElementById("uname_err").innerHTML=xmlCheckUserHttp.responseText 
		var result=xmlCheckUserHttp.responseText;
		////alert(result);
		/*if(result=="notavailable") {
		//document.getElementById("uname_err").innerHTML="UserName Not Available";
		//document.getElementById("RegisterDiv").style.display = "none";
		//addNavigation('ShowRoom');
		//LogUser();
		}*/ 
		if(result=="UserName Already Exits")
		{
		document.getElementById("changename").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>User name already exist</font>";
		document.getElementById('changename').style.display="inline";
		document.getElementById("uname_err").style.display="none";
		//document.getElementById("reguname").value="";
		}  
		else 
		{
		document.getElementById("changename").innerHTML="";
		document.getElementById('changename').style.display="none";
//		document.getElementById('errpass').style.display="none";
		document.getElementById("uname_err").style.display="inline";
		}
	} 
}


function checkemailavailablity(email)
{
	try {
		//var email=document.getElementById('email').value;
		////alert(email);
	    var url = 'includes/email.availability.php?emailvalue='+email;
	    /////alert(url);
	    xmlCheckEmailHttp=GetXmlHttpObject();
	    xmlCheckEmailHttp.onreadystatechange=stateCheckEmail;
		xmlCheckEmailHttp.open("post",url,true);
	    xmlCheckEmailHttp.send(null);
	  //document.getElementById("uname_err").innerHTML="<img src=images/ajax-loader.gif>";
	} catch(e) {
	//alert(e.discription);
	}
}

function stateCheckEmail()	
{
if (xmlCheckEmailHttp.readyState==4 || xmlCheckEmailHttp.readyState=="complete")
	{ 
	//document.getElementById("email_err").innerHTML=xmlCheckEmailHttp.responseText
	var result1= xmlCheckEmailHttp.responseText;
	////alert(result1);
		
		/*if(result1=="notavailable") {
		//document.getElementById("mail_err").innerHTML="EmailId Not Available";
					//document.getElementById("RegisterDiv").style.display = "none";
					//addNavigation('ShowRoom');
					//LogUser();
		} */
			 if(result1=="EmailId Already Exits"){
					document.getElementById("changemail").innerHTML="<font style='font-family:Verdana; font-weight:normal; font-size:11px; color:#FF0000'>EmailID already exist asdfasfd</font>";
					document.getElementById('changemail').style.display="inline";
					document.getElementById("mail_err").style.display="none";
					document.getElementById("Email_err").style.display="none";
					//document.getElementById("mail").value="";
				} else {
					document.getElementById("changemail").innerHTML="";
					document.getElementById('errpass').style.display="none";
					document.getElementById("changemail").style.display="none";
					document.getElementById("mail_err").style.display="none";
					document.getElementById("Email_err").style.display="none";
				}
				
	}
}

/*function reg_val(uname)
{
	//var uname=document.getElementById('uname').value;
	////alert(uname);
	if(uname=="")
	{
		document.getElementById("uname_err").innerHTML="<img src=images/delete.png>";
	}
	else
	{
		//checkUserAvailability(uname,'');
		document.getElementById("uname_err").innerHTML="";
	}
}*/

/*function reg_val1(pass)
{
	
	//var pass=document.getElementById('pass').value;
	//alert(pass);
	if(pass=="")
	{
		document.getElementById("pass_err").innerHTML="<img src=images/delete.png>";
		
	}
	else if(pass.length<4)
	{
		
		document.getElementById("pass_err").innerHTML="<font color='red'>minimum 4 <font>";
		document.getElementById('pass').value="";
	}
	else
	{
		document.getElementById("pass_err").innerHTML="";
	}
}

function reg_val2(cpass)
{	
	//var cpass=document.getElementById('cpass').value;
	//alert(cpass);
	var pass=document.getElementById('pass').value;
	if(cpass=="")
	{
		document.getElementById("cpass_err").innerHTML="<img src=images/delete.png>";
	}
	else if(pass!=cpass)
	{
		
        ////alert("hai");
        document.getElementById("cpass_err").innerHTML="<font color='red'><font>";
		document.getElementById('cpass').value="";
	}
	else
	{
		document.getElementById("cpass_err").innerHTML="";
	}
}*/

/*function reg_val3(email)
{
	////alert(email);
	var email=document.getElementById('mail').value;
	 var mail_id=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
	if(email=="")
	{
		document.getElementById("mail_err").innerHTML="<img src=images/delete.png>";
	}
	else if(!email.match(mail_id)) 
    {
 		document.getElementById("mail_err").innerHTML="<font color='red'>Invalid Mail id<font>";
   		return true;
 	} 
	else
	{
		//checkUserAvailability('',email);
		document.getElementById("mail_err").innerHTML="";
		
	}
}*/

// Register validation completed


function FillCountry(cboCountry, cboState, sDefaultCountry)
{
	var sDefaultCountry, sDefault, sCountry

	cboCountry.options[0].length=0
    for(i=1;i<sCountryString.split("|").length;i++)
	{
		sCountry = sCountryString.split("|")[i];
        if (sDefaultCountry == sCountry)
		{
			sDefault=true;
            if (navigator.appName=="Microsoft Internet Explorer")
			{cboState.focus();
			}
		}
		else {sDefault=false;}

		if (sDefault)
		{
			cboCountry.options[i]=new Option(sCountry,sCountry,sDefault,sDefault);
		}
		else
		{
			cboCountry.options[i]=new Option(sCountryString.split("|")[i]);
		}
	}
}
if (navigator.appName=="Netscape")
{
isNav=true
}


function FillState(cboCountry, cboState, sDefaultState)
{
	var sDefaultState, sState, sDefault

	cboState.options.length=0
	for(i=0;i<sStateArray[cboCountry.selectedIndex].split("|").length;i++)
	{
		sState = sStateArray[cboCountry.selectedIndex].split("|")[i];

		if(sDefaultState == sState) 
		{
			sDefault=true;
			if (navigator.appName=="Microsoft Internet Explorer")
			{
				cboState.focus();
			}
		}
		else 
		{
			sDefault=false;
		}

		if(sDefault) {cboState.options[i]=new Option(sState,sState,sDefault,sDefault)}
		else {cboState.options[i]=new Option(sState,sState);}
	}
}

var sCountryString = "|Afghanistan|Albania|Algeria|American Samoa|Angola|Anguilla|Antartica|Antigua and Barbuda|Argentina|Armenia|Aruba|Ashmore and Cartier  Island|Australia|Austria|Azerbaijan|Bahamas|Bahrain|Bangladesh|Barbados|Belarus|Belgium|Belize|Benin|Bermuda|Bhutan|Bolivia|Bosnia and Herzegovina|Botswana|Brazil|British Virgin Islands|Brunei|Bulgaria|Burkina Faso|Burma|Burundi|Cambodia|Cameroon|Canada|Cape Verde|Cayman Islands|Central African Republic|Chad|Chile|China|Christmas Island|Clipperton Island|Cocos (Keeling) Islands|Colombia|Comoros|Congo, Democratic Republic of the|Congo, Republic of the|Cook Islands|Costa Rica|Cote d'Ivoire|Croatia|Cuba|Cyprus|Czeck Republic|Denmark|Djibouti|Dominica|Dominican Republic|Ecuador|Egypt|El Salvador|Equatorial Guinea|Eritrea|Estonia|Ethiopia|Europa Island|Falkland Islands (Islas Malvinas)|Faroe Islands|Fiji|Finland|France|French Guiana|French Polynesia|French Southern and Antarctic Lands|Gabon|Gambia, The|Gaza Strip|Georgia|Germany|Ghana|Gibraltar|Glorioso  Islands|Greece|Greenland|Grenada|Guadeloupe|Guam|Guatemala|Guernsey|Guinea|Guinea-Bissau|Guyana|Haiti|Heard Island and McDonald Islands|Holy See (Vatican City)|Honduras|Hong  Kong|Howland Island|Hungary|Iceland|India|Indonesia|Iran|Iraq|Ireland|Ireland, Northern|Israel|Italy|Jamaica|Jan Mayen|Japan|Jarvis Island|Jersey|Johnston Atoll|Jordan|Juan de Nova Island|Kazakhstan|Kenya|Kiribati|Korea, North|Korea, South|Kuwait|Kyrgyzstan|Laos|Latvia|Lebanon|Lesotho|Liberia|Libya|Liechtenstein|Lithuania|Luxembourg|Macau|Macedonia, The Former Yugoslav Republic of|Madagascar|Malawi|Malaysia|Maldives|Mali|Malta|Man, Isle of|Marshall Islands|Martinique|Mauritania|Mauritius|Mayotte|Mexico|Micronesia, Federated States of|Midway Islands|Moldova|Monaco|Mongolia|Montserrat|Morocco|Mozambique|Namibia|Nauru|Nepal|Netherlands|Netherlands Antilles|New Caledonia|New 	Zealand|Nicaragua|Niger|Nigeria|Niue|Norfolk Island|Northern Mariana Islands|Norway|Oman|Pakistan|Palau|Panama|Papua New Guinea|Paraguay|Peru|Philippines|Pitcaim 	Islands|Poland|Portugal|Puerto Rico|Qatar|Reunion|Romainia|Russia|Rwanda|Saint Helena|Saint Kitts and Nevis|Saint Lucia|Saint Pierre and Miquelon|Saint Vincent and the  Grenadines|Samoa|San Marino|Sao Tome and Principe|Saudi Arabia|Scotland|Senegal|Serbia|Seychelles|Sierra Leone|Singapore|Slovakia|Slovenia|Solomon Islands|Somalia|South Africa|South Georgia and the South Sandwich Islandss|Spain|Spratly Islands|Sri Lanka|Sudan|Suriname|Svalbard|Swaziland|Sweden|Switzerland|Syria|Taiwan|Tajikistan|Tanzania|Thailand|Tobago|Toga|Tokelau|Tonga|Trinidad|Tunisia|Turkey|Turkmenistan|Tuvalu|Uganda|Ukraine|United Arab Emirates|United Kingdom|Uruguay|USA|Uzbekistan|Vanuatu|Venezuela|Vietnam|Virgin Islands|Wales|Wallis and Futuna|West Bank|Western Sahara|Yemen|Zambia|Zimbabwe"
var sStateArray = new Array()
sStateArray[0]=""
////alert(sStateArray[1]);
sStateArray[1]="-Select-|Badakhshan|Badghis|Baghlan|Balkh|Bamian|Farah|Faryab|Ghazni|Ghowr|Helmand|Herat|Jowzjan|Kabol|Kandahar|Kapisa|Konar|Kondoz|Laghman|Lowgar|Nangarhar|Nimruz|Oruzgan|Paktia|Paktika|Parvan|Samangan|Sar-e Pol|Takhar|Vardak|Zabol"
sStateArray[2]="-Select-|Berat|Bulqize|Delvine|Devoll (Bilisht)|Diber (Peshkopi)|Durres|Elbasan|Fier|Gjirokaster|Gramsh|Has (Krume)|Kavaje|Kolonje (Erseke)|Korce|Kruje|Kucove|Kukes|Kurbin|Lezhe|Librazhd|Lushnje|Malesi e Madhe (Koplik)|Mallakaster (Ballsh)|Mat (Burrel)|Mirdite (Rreshen)|Peqin|Permet|Pogradec|Puke|Sarande|Shkoder|Skrapar (Corovode)|Tepelene|Tirane (Tirana)|Tirane (Tirana)|Tropoje (Bajram Curri)|Vlore"
sStateArray[3]="-Select-|Adrar|Ain Defla|Ain Temouchent|Alger|Annaba|Batna|Bechar|Bejaia|Biskra|Blida|Bordj Bou Arreridj|Bouira|Boumerdes|Chlef|Constantine|Djelfa|El Bayadh|El Oued|El Tarf|Ghardaia|Guelma|Illizi|Jijel|Khenchela|Laghouat|M'Sila|Mascara|Medea|Mila|Mostaganem|Naama|Oran|Ouargla|Oum el Bouaghi|Relizane|Saida|Setif|Sidi Bel Abbes|Skikda|Souk Ahras|Tamanghasset|Tebessa|Tiaret|Tindouf|Tipaza|Tissemsilt|Tizi Ouzou|Tlemcen"
sStateArray[4]="-Select-|Eastern|Manu'a|Rose Island|Swains Island|Western"
sStateArray[5]="-Select-|Andorra la Vella|Bengo|Benguela|Bie|Cabinda|Canillo|Cuando Cubango|Cuanza Norte|Cuanza Sul|Cunene|Encamp|Escaldes-Engordany|Huambo|Huila|La Massana|Luanda|Lunda Norte|Lunda Sul|Malanje|Moxico|Namibe|Ordino|Sant Julia de Loria|Uige|Zaire"
sStateArray[6]="-Select-|Anguilla"
sStateArray[7]="-Select-|Antartica"
sStateArray[8]="-Select-|Barbuda|Redonda|Saint George|Saint John|Saint Mary|Saint Paul|Saint Peter|Saint Philip"
sStateArray[9]="-Select-|Antartica e Islas del Atlantico Sur|Buenos Aires|Buenos Aires Capital Federal|Catamarca|Chaco|Chubut|Cordoba|Corrientes|Entre Rios|Formosa|Jujuy|La Pampa|La Rioja|Mendoza|Misiones|Neuquen|Rio Negro|Salta|San Juan|San Luis|Santa Cruz|Santa Fe|Santiago del Estero|Tierra del Fuego|Tucuman"
sStateArray[10]="-Select-|Aragatsotn|Ararat|Armavir|Geghark'unik'|Kotayk'|Lorri|Shirak|Syunik'|Tavush|Vayots' Dzor|Yerevan"
sStateArray[11]="-Select-|Aruba"
sStateArray[12]="-Select-|Ashmore and Cartier Island"
sStateArray[13]="-Select-|Australian Capital Territory|New South Wales|Northern Territory|Queensland|South Australia|Tasmania|Victoria|Western Australia"
sStateArray[14]="-Select-|Burgenland|Kaernten|Niederoesterreich|Oberoesterreich|Salzburg|Steiermark|Tirol|Vorarlberg|Wien"
sStateArray[15]="-Select-|Abseron Rayonu|Agcabadi Rayonu|Agdam Rayonu|Agdas Rayonu|Agstafa Rayonu|Agsu Rayonu|Ali Bayramli Sahari|Astara Rayonu|Baki Sahari|Balakan Rayonu|Barda Rayonu|Beylaqan Rayonu|Bilasuvar Rayonu|Cabrayil Rayonu|Calilabad Rayonu|Daskasan Rayonu|Davaci Rayonu|Fuzuli Rayonu|Gadabay Rayonu|Ganca Sahari|Goranboy Rayonu|Goycay Rayonu|Haciqabul Rayonu|Imisli Rayonu|Ismayilli Rayonu|Kalbacar Rayonu|Kurdamir Rayonu|Lacin Rayonu|Lankaran Rayonu|Lankaran Sahari|Lerik Rayonu|Masalli Rayonu|Mingacevir Sahari|Naftalan Sahari|Naxcivan Muxtar Respublikasi|Neftcala Rayonu|Oguz Rayonu|Qabala Rayonu|Qax Rayonu|Qazax Rayonu|Qobustan Rayonu|Quba Rayonu|Qubadli Rayonu|Qusar Rayonu|Saatli Rayonu|Sabirabad Rayonu|Saki Rayonu|Saki Sahari|Salyan Rayonu|Samaxi Rayonu|Samkir Rayonu|Samux Rayonu|Siyazan Rayonu|Sumqayit Sahari|Susa Rayonu|Susa Sahari|Tartar Rayonu|Tovuz Rayonu|Ucar Rayonu|Xacmaz Rayonu|Xankandi Sahari|Xanlar Rayonu|Xizi Rayonu|Xocali Rayonu|Xocavand Rayonu|Yardimli Rayonu|Yevlax Rayonu|Yevlax Sahari|Zangilan Rayonu|Zaqatala Rayonu|Zardab Rayonu"
sStateArray[16]="-Select-|Acklins and Crooked Islands|Bimini|Cat Island|Exuma|Freeport|Fresh Creek|Governor's Harbour|Green Turtle Cay|Harbour Island|High Rock|Inagua|Kemps Bay|Long Island|Marsh Harbour|Mayaguana|New Providence|Nicholls Town and Berry Islands|Ragged Island|Rock Sound|San Salvador and Rum Cay|Sandy Point"
sStateArray[17]="-Select-|Al Hadd|Al Manamah|Al Mintaqah al Gharbiyah|Al Mintaqah al Wusta|Al Mintaqah ash Shamaliyah|Al Muharraq|Ar Rifa' wa al Mintaqah al Janubiyah|Jidd Hafs|Juzur Hawar|Madinat 'Isa|Madinat Hamad|Sitrah"
sStateArray[18]="-Select-|Barisal|Chittagong|Dhaka|Khulna|Rajshahi|Sylhet"
sStateArray[19]="-Select-|Bridgetown|Christ Church|Saint Andrew|Saint George|Saint James|Saint John|Saint Joseph|Saint Lucy|Saint Michael|Saint Peter|Saint Philip|Saint Thomas"
sStateArray[20]="-Select-|Brestskaya (Brest)|Homyel'skaya (Homyel')|Horad Minsk|Hrodzyenskaya (Hrodna)|Mahilyowskaya (Mahilyow)|Minskaya|Vitsyebskaya (Vitsyebsk)"
sStateArray[21]="-Select-|Antwerpen|Brabant Wallon|Brussels Capitol Region|Hainaut|Liege|Limburg|Luxembourg|Namur|Oost-Vlaanderen|Vlaams Brabant|West-Vlaanderen"
sStateArray[22]="-Select-|Belize|Cayo|Corozal|Orange Walk|Stann Creek|Toledo"
sStateArray[23]="-Select-|Alibori|Atakora|Atlantique|Borgou|Collines|Couffo|Donga|Littoral|Mono|Oueme|Plateau|Zou"
sStateArray[24]="-Select-|Devonshire|Hamilton|Hamilton|Paget|Pembroke|Saint George|Saint Georges|Sandys|Smiths|Southampton|Warwick"
sStateArray[25]="-Select-|Bumthang|Chhukha|Chirang|Daga|Geylegphug|Ha|Lhuntshi|Mongar|Paro|Pemagatsel|Punakha|Samchi|Samdrup Jongkhar|Shemgang|Tashigang|Thimphu|Tongsa|Wangdi Phodrang"
sStateArray[26]="-Select-|Beni|Chuquisaca|Cochabamba|La Paz|Oruro|Pando|Potosi|Santa Cruz|Tarija"
sStateArray[27]="-Select-|Federation of Bosnia and Herzegovina|Republika Srpska"
sStateArray[28]="-Select-|Central|Chobe|Francistown|Gaborone|Ghanzi|Kgalagadi|Kgatleng|Kweneng|Lobatse|Ngamiland|North-East|Selebi-Pikwe|South-East|Southern"
sStateArray[29]="-Select-|Acre|Alagoas|Amapa|Amazonas|Bahia|Ceara|Distrito Federal|Espirito Santo|Goias|Maranhao|Mato Grosso|Mato Grosso do Sul|Minas Gerais|Para|Paraiba|Parana|Pernambuco|Piaui|Rio de Janeiro|Rio Grande do Norte|Rio Grande do Sul|Rondonia|Roraima|Santa Catarina|Sao Paulo|Sergipe|Tocantins"
sStateArray[30]="-Select-|Anegada|Jost Van Dyke|Tortola|Virgin Gorda"
sStateArray[31]="-Select-|Belait|Brunei and Muara|Temburong|Tutong"
sStateArray[32]="-Select-|Blagoevgrad|Burgas|Dobrich|Gabrovo|Khaskovo|Kurdzhali|Kyustendil|Lovech|Montana|Pazardzhik|Pernik|Pleven|Plovdiv|Razgrad|Ruse|Shumen|Silistra|Sliven|Smolyan|Sofiya|Sofiya-Grad|Stara Zagora|Turgovishte|Varna|Veliko Turnovo|Vidin|Vratsa|Yambol"
sStateArray[33]="-Select-|Bale|Bam|Banwa|Bazega|Bougouriba|Boulgou|Boulkiemde|Comoe|Ganzourgou|Gnagna|Gourma|Houet|Ioba|Kadiogo|Kenedougou|Komandjari|Kompienga|Kossi|Koupelogo|Kouritenga|Kourweogo|Leraba|Loroum|Mouhoun|Nahouri|Namentenga|Naumbiel|Nayala|Oubritenga|Oudalan|Passore|Poni|Samentenga|Sanguie|Seno|Sissili|Soum|Sourou|Tapoa|Tuy|Yagha|Yatenga|Ziro|Zondomo|Zoundweogo"
sStateArray[34]="-Select-|Ayeyarwady|Bago|Chin State|Kachin State|Kayah State|Kayin State|Magway|Mandalay|Mon State|Rakhine State|Sagaing|Shan State|Tanintharyi|Yangon"
sStateArray[35]="-Select-|Bubanza|Bujumbura|Bururi|Cankuzo|Cibitoke|Gitega|Karuzi|Kayanza|Kirundo|Makamba|Muramvya|Muyinga|Mwaro|Ngozi|Rutana|Ruyigi"
sStateArray[36]="-Select-|Banteay Mean Cheay|Batdambang|Kampong Cham|Kampong Chhnang|Kampong Spoe|Kampong Thum|Kampot|Kandal|Kaoh Kong|Keb|Kracheh|Mondol Kiri|Otdar Mean Cheay|Pailin|Phnum Penh|Pouthisat|Preah Seihanu (Sihanoukville)|Preah Vihear|Prey Veng|Rotanah Kiri|Siem Reab|Stoeng Treng|Svay Rieng|Takev"
sStateArray[37]="-Select-|Adamaoua|Centre|Est|Extreme-Nord|Littoral|Nord|Nord-Ouest|Ouest|Sud|Sud-Ouest"
sStateArray[38]="-Select-|Alberta|British Columbia|Manitoba|New Brunswick|Newfoundland|Northwest Territories|Nova Scotia|Nunavut|Ontario|Prince Edward Island|Quebec|Saskatchewan|Yukon Territory"
sStateArray[39]="-Select-|Boa Vista|Brava|Maio|Mosteiros|Paul|Porto Novo|Praia|Ribeira Grande|Sal|Santa Catarina|Santa Cruz|Sao Domingos|Sao Filipe|Sao Nicolau|Sao Vicente|Tarrafal"
sStateArray[40]="-Select-|Creek|Eastern|Midland|South Town|Spot Bay|Stake Bay|West End|Western"
sStateArray[41]="-Select-|Bamingui-Bangoran|Bangui|Basse-Kotto|Gribingui|Haut-Mbomou|Haute-Kotto|Haute-Sangha|Kemo-Gribingui|Lobaye|Mbomou|Nana-Mambere|Ombella-Mpoko|Ouaka|Ouham|Ouham-Pende|Sangha|Vakaga"
sStateArray[42]="-Select-|Batha|Biltine|Borkou-Ennedi-Tibesti|Chari-Baguirmi|Guera|Kanem|Lac|Logone Occidental|Logone Oriental|Mayo-Kebbi|Moyen-Chari|Ouaddai|Salamat|Tandjile"
sStateArray[43]="-Select-|Aisen del General Carlos Ibanez del Campo|Antofagasta|Araucania|Atacama|Bio-Bio|Coquimbo|Libertador General Bernardo O'Higgins|Los Lagos|Magallanes y de la Antartica Chilena|Maule|Region Metropolitana (Santiago)|Tarapaca|Valparaiso"
sStateArray[44]="-Select-|Anhui|Beijing|Chongqing|Fujian|Gansu|Guangdong|Guangxi|Guizhou|Hainan|Hebei|Heilongjiang|Henan|Hubei|Hunan|Jiangsu|Jiangxi|Jilin|Liaoning|Nei Mongol|Ningxia|Qinghai|Shaanxi|Shandong|Shanghai|Shanxi|Sichuan|Tianjin|Xinjiang|Xizang (Tibet)|Yunnan|Zhejiang"
sStateArray[45]="-Select-|Christmas Island"
sStateArray[46]="-Select-|Clipperton Island"
sStateArray[47]="-Select-|Direction Island|Home Island|Horsburgh Island|North Keeling Island|South Island|West Island"
sStateArray[48]="-Select-|Amazonas|Antioquia|Arauca|Atlantico|Bolivar|Boyaca|Caldas|Caqueta|Casanare|Cauca|Cesar|Choco|Cordoba|Cundinamarca|Distrito Capital de Santa Fe de Bogota|Guainia|Guaviare|Huila|La Guajira|Magdalena|Meta|Narino|Norte de Santander|Putumayo|Quindio|Risaralda|San Andres y Providencia|Santander|Sucre|Tolima|Valle del Cauca|Vaupes|Vichada"
sStateArray[49]="-Select-|Anjouan (Nzwani)|Domoni|Fomboni|Grande Comore (Njazidja)|Moheli (Mwali)|Moroni|Moutsamoudou"
sStateArray[50]="-Select-|Bandundu|Bas-Congo|Equateur|Kasai-Occidental|Kasai-Oriental|Katanga|Kinshasa|Maniema|Nord-Kivu|Orientale|Sud-Kivu"
sStateArray[51]="-Select-|Bouenza|Brazzaville|Cuvette|Kouilou|Lekoumou|Likouala|Niari|Plateaux|Pool|Sangha"
sStateArray[52]="-Select-|Aitutaki|Atiu|Avarua|Mangaia|Manihiki|Manuae|Mauke|Mitiaro|Nassau Island|Palmerston|Penrhyn|Pukapuka|Rakahanga|Rarotonga|Suwarrow|Takutea"
sStateArray[53]="-Select-|Alajuela|Cartago|Guanacaste|Heredia|Limon|Puntarenas|San Jose"
sStateArray[54]="-Select-|Abengourou|Abidjan|Aboisso|Adiake'|Adzope|Agboville|Agnibilekrou|Ale'pe'|Bangolo|Beoumi|Biankouma|Bocanda|Bondoukou|Bongouanou|Bouafle|Bouake|Bouna|Boundiali|Dabakala|Dabon|Daloa|Danane|Daoukro|Dimbokro|Divo|Duekoue|Ferkessedougou|Gagnoa|Grand Bassam|Grand-Lahou|Guiglo|Issia|Jacqueville|Katiola|Korhogo|Lakota|Man|Mankono|Mbahiakro|Odienne|Oume|Sakassou|San-Pedro|Sassandra|Seguela|Sinfra|Soubre|Tabou|Tanda|Tiassale|Tiebissou|Tingrela|Touba|Toulepleu|Toumodi|Vavoua|Yamoussoukro|Zuenoula"
sStateArray[55]="-Select-|Bjelovarsko-Bilogorska Zupanija|Brodsko-Posavska Zupanija|Dubrovacko-Neretvanska Zupanija|Istarska Zupanija|Karlovacka Zupanija|Koprivnicko-Krizevacka Zupanija|Krapinsko-Zagorska Zupanija|Licko-Senjska Zupanija|Medimurska Zupanija|Osjecko-Baranjska Zupanija|Pozesko-Slavonska Zupanija|Primorsko-Goranska Zupanija|Sibensko-Kninska Zupanija|Sisacko-Moslavacka Zupanija|Splitsko-Dalmatinska Zupanija|Varazdinska Zupanija|Viroviticko-Podravska Zupanija|Vukovarsko-Srijemska Zupanija|Zadarska Zupanija|Zagreb|Zagrebacka Zupanija"
sStateArray[56]="-Select-|Camaguey|Ciego de Avila|Cienfuegos|Ciudad de La Habana|Granma|Guantanamo|Holguin|Isla de la Juventud|La Habana|Las Tunas|Matanzas|Pinar del Rio|Sancti Spiritus|Santiago de Cuba|Villa Clara"
sStateArray[57]="-Select-|Famagusta|Kyrenia|Larnaca|Limassol|Nicosia|Paphos"
sStateArray[58]="-Select-|Brnensky|Budejovicky|Jihlavsky|Karlovarsky|Kralovehradecky|Liberecky|Olomoucky|Ostravsky|Pardubicky|Plzensky|Praha|Stredocesky|Ustecky|Zlinsky"
sStateArray[59]="-Select-|Arhus|Bornholm|Fredericksberg|Frederiksborg|Fyn|Kobenhavn|Kobenhavns|Nordjylland|Ribe|Ringkobing|Roskilde|Sonderjylland|Storstrom|Vejle|Vestsjalland|Viborg"
sStateArray[60]="-Select-|'Ali Sabih|Dikhil|Djibouti|Obock|Tadjoura"
sStateArray[61]="-Select-|Saint Andrew|Saint David|Saint George|Saint John|Saint Joseph|Saint Luke|Saint Mark|Saint Patrick|Saint Paul|Saint Peter"
sStateArray[62]="-Select-|Azua|Baoruco|Barahona|Dajabon|Distrito Nacional|Duarte|El Seibo|Elias Pina|Espaillat|Hato Mayor|Independencia|La Altagracia|La Romana|La Vega|Maria Trinidad Sanchez|Monsenor Nouel|Monte Cristi|Monte Plata|Pedernales|Peravia|Puerto Plata|Salcedo|Samana|San Cristobal|San Juan|San Pedro de Macoris|Sanchez Ramirez|Santiago|Santiago Rodriguez|Valverde"
sStateArray[63]="-Select-|Azuay|Bolivar|Canar|Carchi|Chimborazo|Cotopaxi|El Oro|Esmeraldas|Galapagos|Guayas|Imbabura|Loja|Los Rios|Manabi|Morona-Santiago|Napo|Orellana|Pastaza|Pichincha|Sucumbios|Tungurahua|Zamora-Chinchipe"
sStateArray[64]="-Select-|Ad Daqahliyah|Al Bahr al Ahmar|Al Buhayrah|Al Fayyum|Al Gharbiyah|Al Iskandariyah|Al Isma'iliyah|Al Jizah|Al Minufiyah|Al Minya|Al Qahirah|Al Qalyubiyah|Al Wadi al Jadid|As Suways|Ash Sharqiyah|Aswan|Asyut|Bani Suwayf|Bur Sa'id|Dumyat|Janub Sina'|Kafr ash Shaykh|Matruh|Qina|Shamal Sina'|Suhaj"
sStateArray[65]="-Select-|Ahuachapan|Cabanas|Chalatenango|Cuscatlan|La Libertad|La Paz|La Union|Morazan|San Miguel|San Salvador|San Vicente|Santa Ana|Sonsonate|Usulutan"
sStateArray[66]="-Select-|Annobon|Bioko Norte|Bioko Sur|Centro Sur|Kie-Ntem|Litoral|Wele-Nzas"
sStateArray[67]="-Select-|Akale Guzay|Barka|Denkel|Hamasen|Sahil|Semhar|Senhit|Seraye"
sStateArray[68]="-Select-|Harjumaa (Tallinn)|Hiiumaa (Kardla)|Ida-Virumaa (Johvi)|Jarvamaa (Paide)|Jogevamaa (Jogeva)|Laane-Virumaa (Rakvere)|Laanemaa (Haapsalu)|Parnumaa (Parnu)|Polvamaa (Polva)|Raplamaa (Rapla)|Saaremaa (Kuessaare)|Tartumaa (Tartu)|Valgamaa (Valga)|Viljandimaa (Viljandi)|Vorumaa (Voru)"
sStateArray[69]="-Select-|Adis Abeba (Addis Ababa)|Afar|Amara|Dire Dawa|Gambela Hizboch|Hareri Hizb|Oromiya|Sumale|Tigray|YeDebub Biheroch Bihereseboch na Hizboch"
sStateArray[70]="-Select-|Europa Island"
sStateArray[71]="-Select-|Falkland Islands (Islas Malvinas)"
sStateArray[72]="-Select-|Bordoy|Eysturoy|Mykines|Sandoy|Skuvoy|Streymoy|Suduroy|Tvoroyri|Vagar"
sStateArray[73]="-Select-|Central|Eastern|Northern|Rotuma|Western"
sStateArray[74]="-Select-|Aland|Etela-Suomen Laani|Ita-Suomen Laani|Lansi-Suomen Laani|Lappi|Oulun Laani"
sStateArray[75]="-Select-|Alsace|Aquitaine|Auvergne|Basse-Normandie|Bourgogne|Bretagne|Centre|Champagne-Ardenne|Corse|Franche-Comte|Haute-Normandie|Ile-de-France|Languedoc-Roussillon|Limousin|Lorraine|Midi-Pyrenees|Nord-Pas-de-Calais|Pays de la Loire|Picardie|Poitou-Charentes|Provence-Alpes-Cote d'Azur|Rhone-Alpes"
sStateArray[76]="-Select-|French Guiana"
sStateArray[77]="-Select-|Archipel des Marquises|Archipel des Tuamotu|Archipel des Tubuai|Iles du Vent|Iles Sous-le-Vent"
sStateArray[78]="-Select-|Adelie Land|Ile Crozet|Iles Kerguelen|Iles Saint-Paul et Amsterdam"
sStateArray[79]="-Select-|Estuaire|Haut-Ogooue|Moyen-Ogooue|Ngounie|Nyanga|Ogooue-Ivindo|Ogooue-Lolo|Ogooue-Maritime|Woleu-Ntem"
sStateArray[80]="-Select-|Banjul|Central River|Lower River|North Bank|Upper River|Western"
sStateArray[81]="-Select-|Gaza Strip"
sStateArray[82]="-Select-|Abashis|Abkhazia or Ap'khazet'is Avtonomiuri Respublika (Sokhumi)|Adigenis|Ajaria or Acharis Avtonomiuri Respublika (Bat'umi)|Akhalgoris|Akhalk'alak'is|Akhalts'ikhis|Akhmetis|Ambrolauris|Aspindzis|Baghdat'is|Bolnisis|Borjomis|Ch'khorotsqus|Ch'okhatauris|Chiat'ura|Dedop'listsqaros|Dmanisis|Dushet'is|Gardabanis|Gori|Goris|Gurjaanis|Javis|K'arelis|K'ut'aisi|Kaspis|Kharagaulis|Khashuris|Khobis|Khonis|Lagodekhis|Lanch'khut'is|Lentekhis|Marneulis|Martvilis|Mestiis|Mts'khet'is|Ninotsmindis|Onis|Ozurget'is|P'ot'i|Qazbegis|Qvarlis|Rust'avi|Sach'kheris|Sagarejos|Samtrediis|Senakis|Sighnaghis|T'bilisi|T'elavis|T'erjolis|T'et'ritsqaros|T'ianet'is|Tqibuli|Ts'ageris|Tsalenjikhis|Tsalkis|Tsqaltubo|Vanis|Zestap'onis|Zugdidi|Zugdidis"
sStateArray[83]="-Select-|Baden-Wuerttemberg|Bayern|Berlin|Brandenburg|Bremen|Hamburg|Hessen|Mecklenburg-Vorpommern|Niedersachsen|Nordrhein-Westfalen|Rheinland-Pfalz|Saarland|Sachsen|Sachsen-Anhalt|Schleswig-Holstein|Thueringen"
sStateArray[84]="-Select-|Ashanti|Brong-Ahafo|Central|Eastern|Greater Accra|Northern|Upper East|Upper West|Volta|Western"
sStateArray[85]="-Select-|Gibraltar"
sStateArray[86]="-Select-|Ile du Lys|Ile Glorieuse"
sStateArray[87]="-Select-|Aitolia kai Akarnania|Akhaia|Argolis|Arkadhia|Arta|Attiki|Ayion Oros (Mt. Athos)|Dhodhekanisos|Drama|Evritania|Evros|Evvoia|Florina|Fokis|Fthiotis|Grevena|Ilia|Imathia|Ioannina|Irakleion|Kardhitsa|Kastoria|Kavala|Kefallinia|Kerkyra|Khalkidhiki|Khania|Khios|Kikladhes|Kilkis|Korinthia|Kozani|Lakonia|Larisa|Lasithi|Lesvos|Levkas|Magnisia|Messinia|Pella|Pieria|Preveza|Rethimni|Rodhopi|Samos|Serrai|Thesprotia|Thessaloniki|Trikala|Voiotia|Xanthi|Zakinthos"
sStateArray[88]="-Select-|Avannaa (Nordgronland)|Kitaa (Vestgronland)|Tunu (Ostgronland)"
sStateArray[89]="-Select-|Carriacou and Petit Martinique|Saint Andrew|Saint David|Saint George|Saint John|Saint Mark|Saint Patrick"
sStateArray[90]="-Select-|Basse-Terre|Grande-Terre|Iles de la Petite Terre|Iles des Saintes|Marie-Galante"
sStateArray[91]="-Select-|Guam"
sStateArray[92]="-Select-|Alta Verapaz|Baja Verapaz|Chimaltenango|Chiquimula|El Progreso|Escuintla|Guatemala|Huehuetenango|Izabal|Jalapa|Jutiapa|Peten|Quetzaltenango|Quiche|Retalhuleu|Sacatepequez|San Marcos|Santa Rosa|Solola|Suchitepequez|Totonicapan|Zacapa"
sStateArray[93]="-Select-|Castel|Forest|St. Andrew|St. Martin|St. Peter Port|St. Pierre du Bois|St. Sampson|St. Saviour|Torteval|Vale"
sStateArray[94]="-Select-|Beyla|Boffa|Boke|Conakry|Coyah|Dabola|Dalaba|Dinguiraye|Dubreka|Faranah|Forecariah|Fria|Gaoual|Gueckedou|Kankan|Kerouane|Kindia|Kissidougou|Koubia|Koundara|Kouroussa|Labe|Lelouma|Lola|Macenta|Mali|Mamou|Mandiana|Nzerekore|Pita|Siguiri|Telimele|Tougue|Yomou"
sStateArray[95]="-Select-|Bafata|Biombo|Bissau|Bolama-Bijagos|Cacheu|Gabu|Oio|Quinara|Tombali"
sStateArray[96]="-Select-|Barima-Waini|Cuyuni-Mazaruni|Demerara-Mahaica|East Berbice-Corentyne|Essequibo Islands-West Demerara|Mahaica-Berbice|Pomeroon-Supenaam|Potaro-Siparuni|Upper Demerara-Berbice|Upper Takutu-Upper Essequibo"
sStateArray[97]="-Select-|Artibonite|Centre|Grand'Anse|Nord|Nord-Est|Nord-Ouest|Ouest|Sud|Sud-Est"
sStateArray[98]="-Select-|Heard Island and McDonald Islands"
sStateArray[99]="-Select-|Holy See (Vatican City)"
sStateArray[100]="-Select-|Atlantida|Choluteca|Colon|Comayagua|Copan|Cortes|El Paraiso|Francisco Morazan|Gracias a Dios|Intibuca|Islas de la Bahia|La Paz|Lempira|Ocotepeque|Olancho|Santa Barbara|Valle|Yoro"
sStateArray[101]="-Select-|Hong Kong"
sStateArray[102]="-Select-|Howland Island"
sStateArray[103]="-Select-|Bacs-Kiskun|Baranya|Bekes|Bekescsaba|Borsod-Abauj-Zemplen|Budapest|Csongrad|Debrecen|Dunaujvaros|Eger|Fejer|Gyor|Gyor-Moson-Sopron|Hajdu-Bihar|Heves|Hodmezovasarhely|Jasz-Nagykun-Szolnok|Kaposvar|Kecskemet|Komarom-Esztergom|Miskolc|Nagykanizsa|Nograd|Nyiregyhaza|Pecs|Pest|Somogy|Sopron|Szabolcs-Szatmar-Bereg|Szeged|Szekesfehervar|Szolnok|Szombathely|Tatabanya|Tolna|Vas|Veszprem|Veszprem|Zala|Zalaegerszeg"
sStateArray[104]="-Select-|Akranes|Akureyri|Arnessysla|Austur-Bardhastrandarsysla|Austur-Hunavatnssysla|Austur-Skaftafellssysla|Borgarfjardharsysla|Dalasysla|Eyjafjardharsysla|Gullbringusysla|Hafnarfjordhur|Husavik|Isafjordhur|Keflavik|Kjosarsysla|Kopavogur|Myrasysla|Neskaupstadhur|Nordhur-Isafjardharsysla|Nordhur-Mulasys-la|Nordhur-Thingeyjarsysla|Olafsfjordhur|Rangarvallasysla|Reykjavik|Saudharkrokur|Seydhisfjordhur|Siglufjordhur|Skagafjardharsysla|Snaefellsnes-og Hnappadalssysla|Strandasysla|Sudhur-Mulasysla|Sudhur-Thingeyjarsysla|Vesttmannaeyjar|Vestur-Bardhastrandarsysla|Vestur-Hunavatnssysla|Vestur-Isafjardharsysla|Vestur-Skaftafellssysla"
sStateArray[105]="-Select-|Andaman and Nicobar Islands|Andhra Pradesh|Arunachal Pradesh|Assam|Bihar|Chandigarh|Chattisgarh|Dadra and Nagar Haveli|Daman and Diu|Delhi|Goa|Gujarat|Haryana|Himachal Pradesh|Jammu and Kashmir|Jharkhand|Karnataka|Kerala|Lakshadweep|Madhya Pradesh|Maharashtra|Manipur|Meghalaya|Mizoram|Nagaland|Orissa|Pondicherry|Punjab|Rajasthan|Sikkim|Tamil Nadu|Tripura|Uttar Pradesh|Uttaranchal|West Bengal"
sStateArray[106]="-Select-|Aceh|Bali|Banten|Bengkulu|East Timor|Gorontalo|Irian Jaya|Jakarta Raya|Jambi|Jawa Barat|Jawa Tengah|Jawa Timur|Kalimantan Barat|Kalimantan Selatan|Kalimantan Tengah|Kalimantan Timur|Kepulauan Bangka Belitung|Lampung|Maluku|Maluku Utara|Nusa Tenggara Barat|Nusa Tenggara Timur|Riau|Sulawesi Selatan|Sulawesi Tengah|Sulawesi Tenggara|Sulawesi Utara|Sumatera Barat|Sumatera Selatan|Sumatera Utara|Yogyakarta"
sStateArray[107]="-Select-|Ardabil|Azarbayjan-e Gharbi|Azarbayjan-e Sharqi|Bushehr|Chahar Mahall va Bakhtiari|Esfahan|Fars|Gilan|Golestan|Hamadan|Hormozgan|Ilam|Kerman|Kermanshah|Khorasan|Khuzestan|Kohgiluyeh va Buyer Ahmad|Kordestan|Lorestan|Markazi|Mazandaran|Qazvin|Qom|Semnan|Sistan va Baluchestan|Tehran|Yazd|Zanjan"
sStateArray[108]="-Select-|Al Anbar|Al Basrah|Al Muthanna|Al Qadisiyah|An Najaf|Arbil|As Sulaymaniyah|At Ta'mim|Babil|Baghdad|Dahuk|Dhi Qar|Diyala|Karbala'|Maysan|Ninawa|Salah ad Din|Wasit"
sStateArray[109]="-Select-|Carlow|Cavan|Clare|Cork|Donegal|Dublin|Galway|Kerry|Kildare|Kilkenny|Laois|Leitrim|Limerick|Longford|Louth|Mayo|Meath|Monaghan|Offaly|Roscommon|Sligo|Tipperary|Waterford|Westmeath|Wexford|Wicklow"
sStateArray[110]="-Select-|Antrim|Ards|Armagh|Ballymena|Ballymoney|Banbridge|Belfast|Carrickfergus|Castlereagh|Coleraine|Cookstown|Craigavon|Derry|Down|Dungannon|Fermanagh|Larne|Limavady|Lisburn|Magherafelt|Moyle|Newry and Mourne|Newtownabbey|North Down|Omagh|Strabane"
sStateArray[111]="-Select-|Central|Haifa|Jerusalem|Northern|Southern|Tel Aviv"
sStateArray[112]="-Select-|Abruzzi|Basilicata|Calabria|Campania|Emilia-Romagna|Friuli-Venezia Giulia|Lazio|Liguria|Lombardia|Marche|Molise|Piemonte|Puglia|Sardegna|Sicilia|Toscana|Trentino-Alto Adige|Umbria|Valle d'Aosta|Veneto"
sStateArray[113]="-Select-|Clarendon|Hanover|Kingston|Manchester|Portland|Saint Andrew|Saint Ann|Saint Catherine|Saint Elizabeth|Saint James|Saint Mary|Saint Thomas|Trelawny|Westmoreland"
sStateArray[114]="-Select-|Jan Mayen"
sStateArray[115]="-Select-|Aichi|Akita|Aomori|Chiba|Ehime|Fukui|Fukuoka|Fukushima|Gifu|Gumma|Hiroshima|Hokkaido|Hyogo|Ibaraki|Ishikawa|Iwate|Kagawa|Kagoshima|Kanagawa|Kochi|Kumamoto|Kyoto|Mie|Miyagi|Miyazaki|Nagano|Nagasaki|Nara|Niigata|Oita|Okayama|Okinawa|Osaka|Saga|Saitama|Shiga|Shimane|Shizuoka|Tochigi|Tokushima|Tokyo|Tottori|Toyama|Wakayama|Yamagata|Yamaguchi|Yamanashi"
sStateArray[116]="-Select-|Jarvis Island"
sStateArray[117]="-Select-|Jersey"
sStateArray[118]="-Select-|Johnston Atoll"
sStateArray[119]="-Select-|'Amman|Ajlun|Al 'Aqabah|Al Balqa'|Al Karak|Al Mafraq|At Tafilah|Az Zarqa'|Irbid|Jarash|Ma'an|Madaba"
sStateArray[120]="-Select-|Juan de Nova Island"
sStateArray[121]="-Select-|Almaty|Aqmola|Aqtobe|Astana|Atyrau|Batys Qazaqstan|Bayqongyr|Mangghystau|Ongtustik Qazaqstan|Pavlodar|Qaraghandy|Qostanay|Qyzylorda|Shyghys Qazaqstan|Soltustik Qazaqstan|Zhambyl"
sStateArray[122]="-Select-|Central|Coast|Eastern|Nairobi Area|North Eastern|Nyanza|Rift Valley|Western"
sStateArray[123]="-Select-|Abaiang|Abemama|Aranuka|Arorae|Banaba|Banaba|Beru|Butaritari|Central Gilberts|Gilbert Islands|Kanton|Kiritimati|Kuria|Line Islands|Line Islands|Maiana|Makin|Marakei|Nikunau|Nonouti|Northern Gilberts|Onotoa|Phoenix Islands|Southern Gilberts|Tabiteuea|Tabuaeran|Tamana|Tarawa|Tarawa|Teraina"
sStateArray[124]="-Select-|Chagang-do (Chagang Province)|Hamgyong-bukto (North Hamgyong Province)|Hamgyong-namdo (South Hamgyong Province)|Hwanghae-bukto (North Hwanghae Province)|Hwanghae-namdo (South Hwanghae Province)|Kaesong-si (Kaesong City)|Kangwon-do (Kangwon Province)|Namp'o-si (Namp'o City)|P'yongan-bukto (North P'yongan Province)|P'yongan-namdo (South P'yongan Province)|P'yongyang-si (P'yongyang City)|Yanggang-do (Yanggang Province)"
sStateArray[125]="-Select-|Ch'ungch'ong-bukto|Ch'ungch'ong-namdo|Cheju-do|Cholla-bukto|Cholla-namdo|Inch'on-gwangyoksi|Kangwon-do|Kwangju-gwangyoksi|Kyonggi-do|Kyongsang-bukto|Kyongsang-namdo|Pusan-gwangyoksi|Soul-t'ukpyolsi|Taegu-gwangyoksi|Taejon-gwangyoksi|Ulsan-gwangyoksi"
sStateArray[126]="-Select-|Al 'Asimah|Al Ahmadi|Al Farwaniyah|Al Jahra'|Hawalli"
sStateArray[127]="-Select-|Batken Oblasty|Bishkek Shaary|Chuy Oblasty (Bishkek)|Jalal-Abad Oblasty|Naryn Oblasty|Osh Oblasty|Talas Oblasty|Ysyk-Kol Oblasty (Karakol)"
sStateArray[128]="-Select-|Attapu|Bokeo|Bolikhamxai|Champasak|Houaphan|Khammouan|Louangnamtha|Louangphabang|Oudomxai|Phongsali|Salavan|Savannakhet|Viangchan|Viangchan|Xaignabouli|Xaisomboun|Xekong|Xiangkhoang"
sStateArray[129]="-Select-|Aizkraukles Rajons|Aluksnes Rajons|Balvu Rajons|Bauskas Rajons|Cesu Rajons|Daugavpils|Daugavpils Rajons|Dobeles Rajons|Gulbenes Rajons|Jekabpils Rajons|Jelgava|Jelgavas Rajons|Jurmala|Kraslavas Rajons|Kuldigas Rajons|Leipaja|Liepajas Rajons|Limbazu Rajons|Ludzas Rajons|Madonas Rajons|Ogres Rajons|Preilu Rajons|Rezekne|Rezeknes Rajons|Riga|Rigas Rajons|Saldus Rajons|Talsu Rajons|Tukuma Rajons|Valkas Rajons|Valmieras Rajons|Ventspils|Ventspils Rajons"
sStateArray[130]="-Select-|Beyrouth|Ech Chimal|Ej Jnoub|El Bekaa|Jabal Loubnane"
sStateArray[131]="-Select-|Berea|Butha-Buthe|Leribe|Mafeteng|Maseru|Mohales Hoek|Mokhotlong|Qacha's Nek|Quthing|Thaba-Tseka"
sStateArray[132]="-Select-|Bomi|Bong|Grand Bassa|Grand Cape Mount|Grand Gedeh|Grand Kru|Lofa|Margibi|Maryland|Montserrado|Nimba|River Cess|Sinoe"
sStateArray[133]="-Select-|Ajdabiya|Al 'Aziziyah|Al Fatih|Al Jabal al Akhdar|Al Jufrah|Al Khums|Al Kufrah|An Nuqat al Khams|Ash Shati'|Awbari|Az Zawiyah|Banghazi|Darnah|Ghadamis|Gharyan|Misratah|Murzuq|Sabha|Sawfajjin|Surt|Tarabulus|Tarhunah|Tubruq|Yafran|Zlitan"
sStateArray[134]="-Select-|Balzers|Eschen|Gamprin|Mauren|Planken|Ruggell|Schaan|Schellenberg|Triesen|Triesenberg|Vaduz"
sStateArray[135]="-Select-|Akmenes Rajonas|Alytaus Rajonas|Alytus|Anyksciu Rajonas|Birstonas|Birzu Rajonas|Druskininkai|Ignalinos Rajonas|Jonavos Rajonas|Joniskio Rajonas|Jurbarko Rajonas|Kaisiadoriu Rajonas|Kaunas|Kauno Rajonas|Kedainiu Rajonas|Kelmes Rajonas|Klaipeda|Klaipedos Rajonas|Kretingos Rajonas|Kupiskio Rajonas|Lazdiju Rajonas|Marijampole|Marijampoles Rajonas|Mazeikiu Rajonas|Moletu Rajonas|Neringa Pakruojo Rajonas|Palanga|Panevezio Rajonas|Panevezys|Pasvalio Rajonas|Plunges Rajonas|Prienu Rajonas|Radviliskio Rajonas|Raseiniu Rajonas|Rokiskio Rajonas|Sakiu Rajonas|Salcininku Rajonas|Siauliai|Siauliu Rajonas|Silales Rajonas|Silutes Rajonas|Sirvintu Rajonas|Skuodo Rajonas|Svencioniu Rajonas|Taurages Rajonas|Telsiu Rajonas|Traku Rajonas|Ukmerges Rajonas|Utenos Rajonas|Varenos Rajonas|Vilkaviskio Rajonas|Vilniaus Rajonas|Vilnius|Zarasu Rajonas"
sStateArray[136]="-Select-|Diekirch|Grevenmacher|Luxembourg"
sStateArray[137]="-Select-|Macau"
sStateArray[138]="-Select-|Aracinovo|Bac|Belcista|Berovo|Bistrica|Bitola|Blatec|Bogdanci|Bogomila|Bogovinje|Bosilovo|Brvenica|Cair (Skopje)|Capari|Caska|Cegrane|Centar (Skopje)|Centar Zupa|Cesinovo|Cucer-Sandevo|Debar|Delcevo|Delogozdi|Demir Hisar|Demir Kapija|Dobrusevo|Dolna Banjica|Dolneni|Dorce Petrov (Skopje)|Drugovo|Dzepciste|Gazi Baba (Skopje)|Gevgelija|Gostivar|Gradsko|Ilinden|Izvor|Jegunovce|Kamenjane|Karbinci|Karpos (Skopje)|Kavadarci|Kicevo|Kisela Voda (Skopje)|Klecevce|Kocani|Konce|Kondovo|Konopiste|Kosel|Kratovo|Kriva Palanka|Krivogastani|Krusevo|Kuklis|Kukurecani|Kumanovo|Labunista|Lipkovo|Lozovo|Lukovo|Makedonska Kamenica|Makedonski Brod|Mavrovi Anovi|Meseista|Miravci|Mogila|Murtino|Negotino|Negotino-Poloska|Novaci|Novo Selo|Oblesevo|Ohrid|Orasac|Orizari|Oslomej|Pehcevo|Petrovec|Plasnia|Podares|Prilep|Probistip|Radovis|Rankovce|Resen|Rosoman|Rostusa|Samokov|Saraj|Sipkovica|Sopiste|Sopotnika|Srbinovo|Star Dojran|Staravina|Staro Nagoricane|Stip|Struga|Strumica|Studenicani|Suto Orizari (Skopje)|Sveti Nikole|Tearce|Tetovo|Topolcani|Valandovo|Vasilevo|Veles|Velesta|Vevcani|Vinica|Vitoliste|Vranestica|Vrapciste|Vratnica|Vrutok|Zajas|Zelenikovo|Zileno|Zitose|Zletovo|Zrnovci"
sStateArray[139]="-Select-|Antananarivo|Antsiranana|Fianarantsoa|Mahajanga|Toamasina|Toliara"
sStateArray[140]="-Select-|Balaka|Blantyre|Chikwawa|Chiradzulu|Chitipa|Dedza|Dowa|Karonga|Kasungu|Likoma|Lilongwe|Machinga (Kasupe)|Mangochi|Mchinji|Mulanje|Mwanza|Mzimba|Nkhata Bay|Nkhotakota|Nsanje|Ntcheu|Ntchisi|Phalombe|Rumphi|Salima|Thyolo|Zomba"
sStateArray[141]="-Select-|Johor|Kedah|Kelantan|Labuan|Melaka|Negeri Sembilan|Pahang|Perak|Perlis|Pulau Pinang|Sabah|Sarawak|Selangor|Terengganu|Wilayah Persekutuan"
sStateArray[142]="-Select-|Alifu|Baa|Dhaalu|Faafu|Gaafu Alifu|Gaafu Dhaalu|Gnaviyani|Haa Alifu|Haa Dhaalu|Kaafu|Laamu|Lhaviyani|Maale|Meemu|Noonu|Raa|Seenu|Shaviyani|Thaa|Vaavu"
sStateArray[143]="-Select-|Gao|Kayes|Kidal|Koulikoro|Mopti|Segou|Sikasso|Tombouctou"
sStateArray[144]="-Select-|Valletta"
sStateArray[145]="-Select-|Man, Isle of"
sStateArray[146]="-Select-|Ailinginae|Ailinglaplap|Ailuk|Arno|Aur|Bikar|Bikini|Bokak|Ebon|Enewetak|Erikub|Jabat|Jaluit|Jemo|Kili|Kwajalein|Lae|Lib|Likiep|Majuro|Maloelap|Mejit|Mili|Namorik|Namu|Rongelap|Rongrik|Toke|Ujae|Ujelang|Utirik|Wotho|Wotje"
sStateArray[147]="-Select-|Martinique"
sStateArray[148]="-Select-|Adrar|Assaba|Brakna|Dakhlet Nouadhibou|Gorgol|Guidimaka|Hodh Ech Chargui|Hodh El Gharbi|Inchiri|Nouakchott|Tagant|Tiris Zemmour|Trarza"
sStateArray[149]="-Select-|Agalega Islands|Black River|Cargados Carajos Shoals|Flacq|Grand Port|Moka|Pamplemousses|Plaines Wilhems|Port Louis|Riviere du Rempart|Rodrigues|Savanne"
sStateArray[150]="-Select-|Mayotte"
sStateArray[151]="-Select-|Aguascalientes|Baja California|Baja California Sur|Campeche|Chiapas|Chihuahua|Coahuila de Zaragoza|Colima|Distrito Federal|Durango|Guanajuato|Guerrero|Hidalgo|Jalisco|Mexico|Michoacan de Ocampo|Morelos|Nayarit|Nuevo Leon|Oaxaca|Puebla|Queretaro de Arteaga|Quintana Roo|San Luis Potosi|Sinaloa|Sonora|Tabasco|Tamaulipas|Tlaxcala|Veracruz-Llave|Yucatan|Zacatecas"
sStateArray[152]="-Select-|Chuuk (Truk)|Kosrae|Pohnpei|Yap"
sStateArray[153]="-Select-|Midway Islands"
sStateArray[154]="-Select-|Balti|Cahul|Chisinau|Chisinau|Dubasari|Edinet|Gagauzia|Lapusna|Orhei|Soroca|Tighina|Ungheni"
sStateArray[155]="-Select-|Fontvieille|La Condamine|Monaco-Ville|Monte-Carlo"
sStateArray[156]="-Select-|Arhangay|Bayan-Olgiy|Bayanhongor|Bulgan|Darhan|Dornod|Dornogovi|Dundgovi|Dzavhan|Erdenet|Govi-Altay|Hentiy|Hovd|Hovsgol|Omnogovi|Ovorhangay|Selenge|Suhbaatar|Tov|Ulaanbaatar|Uvs"
sStateArray[157]="-Select-|Saint Anthony|Saint Georges|Saint Peter's"
sStateArray[158]="-Select-|Agadir|Al Hoceima|Azilal|Ben Slimane|Beni Mellal|Boulemane|Casablanca|Chaouen|El Jadida|El Kelaa des Srarhna|Er Rachidia|Essaouira|Fes|Figuig|Guelmim|Ifrane|Kenitra|Khemisset|Khenifra|Khouribga|Laayoune|Larache|Marrakech|Meknes|Nador|Ouarzazate|Oujda|Rabat-Sale|Safi|Settat|Sidi Kacem|Tan-Tan|Tanger|Taounate|Taroudannt|Tata|Taza|Tetouan|Tiznit"
sStateArray[159]="-Select-|Cabo Delgado|Gaza|Inhambane|Manica|Maputo|Nampula|Niassa|Sofala|Tete|Zambezia"
sStateArray[160]="-Select-|Caprivi|Erongo|Hardap|Karas|Khomas|Kunene|Ohangwena|Okavango|Omaheke|Omusati|Oshana|Oshikoto|Otjozondjupa"
sStateArray[161]="-Select-|Aiwo|Anabar|Anetan|Anibare|Baiti|Boe|Buada|Denigomodu|Ewa|Ijuw|Meneng|Nibok|Uaboe|Yaren"
sStateArray[162]="-Select-|Bagmati|Bheri|Dhawalagiri|Gandaki|Janakpur|Karnali|Kosi|Lumbini|Mahakali|Mechi|Narayani|Rapti|Sagarmatha|Seti"
sStateArray[163]="-Select-|Drenthe|Flevoland|Friesland|Gelderland|Groningen|Limburg|Noord-Brabant|Noord-Holland|Overijssel|Utrecht|Zeeland|Zuid-Holland"
sStateArray[164]="-Select-|Netherlands Antilles"
sStateArray[165]="-Select-|Iles Loyaute|Nord|Sud"
sStateArray[166]="-Select-|Akaroa|Amuri|Ashburton|Bay of Islands|Bruce|Buller|Chatham Islands|Cheviot|Clifton|Clutha|Cook|Dannevirke|Egmont|Eketahuna|Ellesmere|Eltham|Eyre|Featherston|Franklin|Golden Bay|Great Barrier Island|Grey|Hauraki Plains|Hawera|Hawke's Bay|Heathcote|Hikurangi|Hobson|Hokianga|Horowhenua|Hurunui|Hutt|Inangahua|Inglewood|Kaikoura|Kairanga|Kiwitea|Lake|Mackenzie|Malvern|Manaia|Manawatu|Mangonui|Maniototo|Marlborough|Masterton|Matamata|Mount Herbert|Ohinemuri|Opotiki|Oroua|Otamatea|Otorohanga|Oxford|Pahiatua|Paparua|Patea|Piako|Pohangina|Raglan|Rangiora|Rangitikei|Rodney|Rotorua|Runanga|Saint Kilda|Silverpeaks|Southland|Stewart Island|Stratford|Strathallan|Taranaki|Taumarunui|Taupo|Tauranga|Thames-Coromandel|Tuapeka|Vincent|Waiapu|Waiheke|Waihemo|Waikato|Waikohu|Waimairi|Waimarino|Waimate|Waimate West|Waimea|Waipa|Waipawa|Waipukurau|Wairarapa South|Wairewa|Wairoa|Waitaki|Waitomo|Waitotara|Wallace|Wanganui|Waverley|Westland|Whakatane|Whangarei|Whangaroa|Woodville"
sStateArray[167]="-Select-|Atlantico Norte|Atlantico Sur|Boaco|Carazo|Chinandega|Chontales|Esteli|Granada|Jinotega|Leon|Madriz|Managua|Masaya|Matagalpa|Nueva Segovia|Rio San Juan|Rivas"
sStateArray[168]="-Select-|Agadez|Diffa|Dosso|Maradi|Niamey|Tahoua|Tillaberi|Zinder"
sStateArray[169]="-Select-|Abia|Abuja Federal Capital Territory|Adamawa|Akwa Ibom|Anambra|Bauchi|Bayelsa|Benue|Borno|Cross River|Delta|Ebonyi|Edo|Ekiti|Enugu|Gombe|Imo|Jigawa|Kaduna|Kano|Katsina|Kebbi|Kogi|Kwara|Lagos|Nassarawa|Niger|Ogun|Ondo|Osun|Oyo|Plateau|Rivers|Sokoto|Taraba|Yobe|Zamfara"
sStateArray[170]="-Select-|Niue"
sStateArray[171]="-Select-|Norfolk Island"
sStateArray[172]="-Select-|Northern Islands|Rota|Saipan|Tinian"
sStateArray[173]="-Select-|Akershus|Aust-Agder|Buskerud|Finnmark|Hedmark|Hordaland|More og Romsdal|Nord-Trondelag|Nordland|Oppland|Oslo|Ostfold|Rogaland|Sogn og Fjordane|Sor-Trondelag|Telemark|Troms|Vest-Agder|Vestfold"
sStateArray[174]="-Select-|Ad Dakhiliyah|Al Batinah|Al Wusta|Ash Sharqiyah|Az Zahirah|Masqat|Musandam|Zufar"
sStateArray[175]="-Select-|Balochistan|Federally Administered Tribal Areas|Islamabad Capital Territory|North-West Frontier Province|Punjab|Sindh"
sStateArray[176]="-Select-|Aimeliik|Airai|Angaur|Hatobohei|Kayangel|Koror|Melekeok|Ngaraard|Ngarchelong|Ngardmau|Ngatpang|Ngchesar|Ngeremlengui|Ngiwal|Palau Island|Peleliu|Sonsoral|Tobi"
sStateArray[177]="-Select-|Bocas del Toro|Chiriqui|Cocle|Colon|Darien|Herrera|Los Santos|Panama|San Blas|Veraguas"
sStateArray[178]="-Select-|Bougainville|Central|Chimbu|East new Britain|East Sepik|Eastern Highlands|Enga|Gulf|Madang|Manus|Milne Bay|Morobe|National Capital|New Ireland|Northern|Sandaun|Southern Highlands|West New Britain|Western|Western Highlands"
sStateArray[179]="-Select-|Alto Paraguay|Alto Parana|Amambay|Asuncion (city)|Boqueron|Caaguazu|Caazapa|Canindeyu|Central|Concepcion|Cordillera|Guaira|Itapua|Misiones|Neembucu|Paraguari|Presidente Hayes|San Pedro"
sStateArray[180]="-Select-|Amazonas|Ancash|Apurimac|Arequipa|Ayacucho|Cajamarca|Callao|Cusco|Huancavelica|Huanuco|Ica|Junin|La Libertad|Lambayeque|Lima|Loreto|Madre de Dios|Moquegua|Pasco|Piura|Puno|San Martin|Tacna|Tumbes|Ucayali"
sStateArray[181]="-Select-|Abra|Agusan del Norte|Agusan del Sur|Aklan|Albay|Angeles|Antique|Aurora|Bacolod|Bago|Baguio|Bais|Basilan|Basilan City|Bataan|Batanes|Batangas|Batangas City|Benguet|Bohol|Bukidnon|Bulacan|Butuan|Cabanatuan|Cadiz|Cagayan|Cagayan de Oro|Calbayog|Caloocan|Camarines Norte|Camarines Sur|Camiguin|Canlaon|Capiz|Catanduanes|Cavite|Cavite City|Cebu|Cebu City|Cotabato|Dagupan|Danao|Dapitan|Davao City Davao|Davao del Sur|Davao Oriental|Dipolog|Dumaguete|Eastern Samar|General Santos|Gingoog|Ifugao|Iligan|Ilocos Norte|Ilocos Sur|Iloilo|Iloilo City|Iriga|Isabela|Kalinga-Apayao|La Carlota|La Union|Laguna|Lanao del Norte|Lanao del Sur|Laoag|Lapu-Lapu|Legaspi|Leyte|Lipa|Lucena|Maguindanao|Mandaue|Manila|Marawi|Marinduque|Masbate|Mindoro Occidental|Mindoro Oriental|Misamis Occidental|Misamis Oriental|Mountain|Naga|Negros Occidental|Negros Oriental|North Cotabato|Northern Samar|Nueva Ecija|Nueva Vizcaya|Olongapo|Ormoc|Oroquieta|Ozamis|Pagadian|Palawan|Palayan|Pampanga|Pangasinan|Pasay|Puerto Princesa|Quezon|Quezon City|Quirino|Rizal|Romblon|Roxas|Samar|San Carlos (in Negros Occidental)|San Carlos (in Pangasinan)|San Jose|San Pablo|Silay|Siquijor|Sorsogon|South Cotabato|Southern Leyte|Sultan Kudarat|Sulu|Surigao|Surigao del Norte|Surigao del Sur|Tacloban|Tagaytay|Tagbilaran|Tangub|Tarlac|Tawitawi|Toledo|Trece Martires|Zambales|Zamboanga|Zamboanga del Norte|Zamboanga del Sur"
sStateArray[182]="-Select-|Pitcaim Islands"
sStateArray[183]="-Select-|Dolnoslaskie|Kujawsko-Pomorskie|Lodzkie|Lubelskie|Lubuskie|Malopolskie|Mazowieckie|Opolskie|Podkarpackie|Podlaskie|Pomorskie|Slaskie|Swietokrzyskie|Warminsko-Mazurskie|Wielkopolskie|Zachodniopomorskie"
sStateArray[184]="-Select-|Acores (Azores)|Aveiro|Beja|Braga|Braganca|Castelo Branco|Coimbra|Evora|Faro|Guarda|Leiria|Lisboa|Madeira|Portalegre|Porto|Santarem|Setubal|Viana do Castelo|Vila Real|Viseu"
sStateArray[185]="-Select-|Adjuntas|Aguada|Aguadilla|Aguas Buenas|Aibonito|Anasco|Arecibo|Arroyo|Barceloneta|Barranquitas|Bayamon|Cabo Rojo|Caguas|Camuy|Canovanas|Carolina|Catano|Cayey|Ceiba|Ciales|Cidra|Coamo|Comerio|Corozal|Culebra|Dorado|Fajardo|Florida|Guanica|Guayama|Guayanilla|Guaynabo|Gurabo|Hatillo|Hormigueros|Humacao|Isabela|Jayuya|Juana Diaz|Juncos|Lajas|Lares|Las Marias|Las Piedras|Loiza|Luquillo|Manati|Maricao|Maunabo|Mayaguez|Moca|Morovis|Naguabo|Naranjito|Orocovis|Patillas|Penuelas|Ponce|Quebradillas|Rincon|Rio Grande|Sabana Grande|Salinas|San German|San Juan|San Lorenzo|San Sebastian|Santa Isabel|Toa Alta|Toa Baja|Trujillo Alto|Utuado|Vega Alta|Vega Baja|Vieques|Villalba|Yabucoa|Yauco"
sStateArray[186]="-Select-|Ad Dawhah|Al Ghuwayriyah|Al Jumayliyah|Al Khawr|Al Wakrah|Ar Rayyan|Jarayan al Batinah|Madinat ash Shamal|Umm Salal"
sStateArray[187]="-Select-|Reunion"
sStateArray[188]="-Select-|Alba|Arad|Arges|Bacau|Bihor|Bistrita-Nasaud|Botosani|Braila|Brasov|Bucuresti|Buzau|Calarasi|Caras-Severin|Cluj|Constanta|Covasna|Dimbovita|Dolj|Galati|Giurgiu|Gorj|Harghita|Hunedoara|Ialomita|Iasi|Maramures|Mehedinti|Mures|Neamt|Olt|Prahova|Salaj|Satu Mare|Sibiu|Suceava|Teleorman|Timis|Tulcea|Vaslui|Vilcea|Vrancea"
sStateArray[189]="-Select-|Adygeya (Maykop)|Aginskiy Buryatskiy (Aginskoye)|Altay (Gorno-Altaysk)|Altayskiy (Barnaul)|Amurskaya (Blagoveshchensk)|Arkhangel'skaya|Astrakhanskaya|Bashkortostan (Ufa)|Belgorodskaya|Bryanskaya|Buryatiya (Ulan-Ude)|Chechnya (Groznyy)|Chelyabinskaya|Chitinskaya|Chukotskiy (Anadyr')|Chuvashiya (Cheboksary)|Dagestan (Makhachkala)|Evenkiyskiy (Tura)|Ingushetiya (Nazran')|Irkutskaya|Ivanovskaya|Kabardino-Balkariya (Nal'chik)|Kaliningradskaya|Kalmykiya (Elista)|Kaluzhskaya|Kamchatskaya (Petropavlovsk-Kamchatskiy)|Karachayevo-Cherkesiya (Cherkessk)|Kareliya (Petrozavodsk)|Kemerovskaya|Khabarovskiy|Khakasiya (Abakan)|Khanty-Mansiyskiy (Khanty-Mansiysk)|Kirovskaya|Komi (Syktyvkar)|Komi-Permyatskiy (Kudymkar)|Koryakskiy (Palana)|Kostromskaya|Krasnodarskiy|Krasnoyarskiy|Kurganskaya|Kurskaya|Leningradskaya|Lipetskaya|Magadanskaya|Mariy-El (Yoshkar-Ola)|Mordoviya (Saransk)|Moskovskaya|Moskva (Moscow)|Murmanskaya|Nenetskiy (Nar'yan-Mar)|Nizhegorodskaya|Novgorodskaya|Novosibirskaya|Omskaya|Orenburgskaya|Orlovskaya (Orel)|Penzenskaya|Permskaya|Primorskiy (Vladivostok)|Pskovskaya|Rostovskaya|Ryazanskaya|Sakha (Yakutsk)|Sakhalinskaya (Yuzhno-Sakhalinsk)|Samarskaya|Sankt-Peterburg (Saint Petersburg)|Saratovskaya|Severnaya Osetiya-Alaniya [North Ossetia] (Vladikavkaz)|Smolenskaya|Stavropol'skiy|Sverdlovskaya (Yekaterinburg)|Tambovskaya|Tatarstan (Kazan')|Taymyrskiy (Dudinka)|Tomskaya|Tul'skaya|Tverskaya|Tyumenskaya|Tyva (Kyzyl)|Udmurtiya (Izhevsk)|Ul'yanovskaya|Ust'-Ordynskiy Buryatskiy (Ust'-Ordynskiy)|Vladimirskaya|Volgogradskaya|Vologodskaya|Voronezhskaya|Yamalo-Nenetskiy (Salekhard)|Yaroslavskaya|Yevreyskaya"
sStateArray[190]="-Select-|Butare|Byumba|Cyangugu|Gikongoro|Gisenyi|Gitarama|Kibungo|Kibuye|Kigali Rurale|Kigali-ville|Ruhengeri|Umutara"
sStateArray[191]="-Select-|Ascension|Saint Helena|Tristan da Cunha"
sStateArray[192]="-Select-|Christ Church Nichola Town|Saint Anne Sandy Point|Saint George Basseterre|Saint George Gingerland|Saint James Windward|Saint John Capisterre|Saint John Figtree|Saint Mary Cayon|Saint Paul Capisterre|Saint Paul Charlestown|Saint Peter Basseterre|Saint Thomas Lowland|Saint Thomas Middle Island|Trinity Palmetto Point"
sStateArray[193]="-Select-|Anse-la-Raye|Castries|Choiseul|Dauphin|Dennery|Gros Islet|Laborie|Micoud|Praslin|Soufriere|Vieux Fort"
sStateArray[194]="-Select-|Miquelon|Saint Pierre"
sStateArray[195]="-Select-|Charlotte|Grenadines|Saint Andrew|Saint David|Saint George|Saint Patrick"
sStateArray[196]="-Select-|A'ana|Aiga-i-le-Tai|Atua|Fa'asaleleaga|Gaga'emauga|Gagaifomauga|Palauli|Satupa'itea|Tuamasaga|Va'a-o-Fonoti|Vaisigano"
sStateArray[197]="-Select-|Acquaviva|Borgo Maggiore|Chiesanuova|Domagnano|Faetano|Fiorentino|Monte Giardino|San Marino|Serravalle"
sStateArray[198]="-Select-|Principe|Sao Tome"
sStateArray[199]="-Select-|'Asir|Al Bahah|Al Hudud ash Shamaliyah|Al Jawf|Al Madinah|Al Qasim|Ar Riyad|Ash Sharqiyah (Eastern Province)|Ha'il|Jizan|Makkah|Najran|Tabuk"
sStateArray[200]="-Select-|Aberdeen City|Aberdeenshire|Angus|Argyll and Bute|City of Edinburgh|Clackmannanshire|Dumfries and Galloway|Dundee City|East Ayrshire|East Dunbartonshire|East Lothian|East Renfrewshire|Eilean Siar (Western Isles)|Falkirk|Fife|Glasgow City|Highland|Inverclyde|Midlothian|Moray|North Ayrshire|North Lanarkshire|Orkney Islands|Perth and Kinross|Renfrewshire|Shetland Islands|South Ayrshire|South Lanarkshire|Stirling|The Scottish Borders|West Dunbartonshire|West Lothian"
sStateArray[201]="-Select-|Dakar|Diourbel|Fatick|Kaolack|Kolda|Louga|Saint-Louis|Tambacounda|Thies|Ziguinchor"
sStateArray[202]="-Select-|Becej|Bela Crkva|Belgrade|Cacak|Kosovska Mitrovica|Kraljevo|Nis|Novi Becej|Novi Beograd|Novi Pazar|Novi Sad|Pozarevac|Pristina|Subotica|Vrsac|Zemun"
sStateArray[203]="-Select-|Anse aux Pins|Anse Boileau|Anse Etoile|Anse Louis|Anse Royale|Baie Lazare|Baie Sainte Anne|Beau Vallon|Bel Air|Bel Ombre|Cascade|Glacis|Grand' Anse (on Mahe)|Grand' Anse (on Praslin)|La Digue|La Riviere Anglaise|Mont Buxton|Mont Fleuri|Plaisance|Pointe La Rue|Port Glaud|Saint Louis|Takamaka"
sStateArray[204]="-Select-|Eastern|Northern|Southern|Western"
sStateArray[205]="-Select-|Singapore"
sStateArray[206]="-Select-|Banskobystricky|Bratislavsky|Kosicky|Nitriansky|Presovsky|Trenciansky|Trnavsky|Zilinsky"
sStateArray[207]="-Select-|Ajdovscina|Beltinci|Bled|Bohinj|Borovnica|Bovec|Brda|Brezice|Brezovica|Cankova-Tisina|Celje|Cerklje na Gorenjskem|Cerknica|Cerkno|Crensovci|Crna na Koroskem|Crnomelj|Destrnik-Trnovska Vas|Divaca|Dobrepolje|Dobrova-Horjul-Polhov Gradec|Dol pri Ljubljani|Domzale|Dornava|Dravograd|Duplek|Gorenja Vas-Poljane|Gorisnica|Gornja Radgona|Gornji Grad|Gornji Petrovci|Grosuplje|Hodos Salovci|Hrastnik|Hrpelje-Kozina|Idrija|Ig|Ilirska Bistrica|Ivancna Gorica|Izola|Jesenice|Jursinci|Kamnik|Kanal|Kidricevo|Kobarid|Kobilje|Kocevje|Komen|Koper|Kozje|Kranj|Kranjska Gora|Krsko|Kungota|Kuzma|Lasko|Lenart|Lendava|Litija|Ljubljana|Ljubno|Ljutomer|Logatec|Loska Dolina|Loski Potok|Luce|Lukovica|Majsperk|Maribor|Medvode|Menges|Metlika|Mezica|Miren-Kostanjevica|Mislinja|Moravce|Moravske Toplice|Mozirje|Murska Sobota|Muta|Naklo|Nazarje|Nova Gorica|Novo Mesto|Odranci|Ormoz|Osilnica|Pesnica|Piran|Pivka|Podcetrtek|Podvelka-Ribnica|Postojna|Preddvor|Ptuj|Puconci|Race-Fram|Radece|Radenci|Radlje ob Dravi|Radovljica|Ravne-Prevalje|Ribnica|Rogasevci|Rogaska Slatina|Rogatec|Ruse|Semic|Sencur|Sentilj|Sentjernej|Sentjur pri Celju|Sevnica|Sezana|Skocjan|Skofja Loka|Skofljica|Slovenj Gradec|Slovenska Bistrica|Slovenske Konjice|Smarje pri Jelsah|Smartno ob Paki|Sostanj|Starse|Store|Sveti Jurij|Tolmin|Trbovlje|Trebnje|Trzic|Turnisce|Velenje|Velike Lasce|Videm|Vipava|Vitanje|Vodice|Vojnik|Vrhnika|Vuzenica|Zagorje ob Savi|Zalec|Zavrc|Zelezniki|Ziri|Zrece"
sStateArray[208]="-Select-|Bellona|Central|Choiseul (Lauru)|Guadalcanal|Honiara|Isabel|Makira|Malaita|Rennell|Temotu|Western"
sStateArray[209]="-Select-|Awdal|Bakool|Banaadir|Bari|Bay|Galguduud|Gedo|Hiiraan|Jubbada Dhexe|Jubbada Hoose|Mudug|Nugaal|Sanaag|Shabeellaha Dhexe|Shabeellaha Hoose|Sool|Togdheer|Woqooyi Galbeed"
sStateArray[210]="-Select-|Eastern Cape|Free State|Gauteng|KwaZulu-Natal|Mpumalanga|North-West|Northern Cape|Northern Province|Western Cape"
sStateArray[211]="-Select-|Bird Island|Bristol Island|Clerke Rocks|Montagu Island|Saunders Island|South Georgia|Southern Thule|Traversay Islands"
sStateArray[212]="-Select-|Andalucia|Aragon|Asturias|Baleares (Balearic Islands)|Canarias (Canary Islands)|Cantabria|Castilla y Leon|Castilla-La Mancha|Cataluna|Ceuta|Communidad Valencian|Extremadura|Galicia|Islas Chafarinas|La Rioja|Madrid|Melilla|Murcia|Navarra|Pais Vasco (Basque Country)|Penon de Alhucemas|Penon de Velez de la Gomera"
sStateArray[213]="-Select-|Spratly Islands"
sStateArray[214]="-Select-|Central|Eastern|North Central|North Eastern|North Western|Northern|Sabaragamuwa|Southern|Uva|Western"
sStateArray[215]="-Select-|A'ali an Nil|Al Bahr al Ahmar|Al Buhayrat|Al Jazirah|Al Khartum|Al Qadarif|Al Wahdah|An Nil al Abyad|An Nil al Azraq|Ash Shamaliyah|Bahr al Jabal|Gharb al Istiwa'iyah|Gharb Bahr al Ghazal|Gharb Darfur|Gharb Kurdufan|Janub Darfur|Janub Kurdufan|Junqali|Kassala|Nahr an Nil|Shamal Bahr al Ghazal|Shamal Darfur|Shamal Kurdufan|Sharq al Istiwa'iyah|Sinnar|Warab"
sStateArray[216]="-Select-|Brokopondo|Commewijne|Coronie|Marowijne|Nickerie|Para|Paramaribo|Saramacca|Sipaliwini|Wanica"
sStateArray[217]="-Select-|Barentsoya|Bjornoya|Edgeoya|Hopen|Kvitoya|Nordaustandet|Prins Karls Forland|Spitsbergen"
sStateArray[218]="-Select-|Hhohho|Lubombo|Manzini|Shiselweni"
sStateArray[219]="-Select-|Blekinge|Dalarnas|Gavleborgs|Gotlands|Hallands|Jamtlands|Jonkopings|Kalmar|Kronobergs|Norrbottens|Orebro|Ostergotlands|Skane|Sodermanlands|Stockholms|Uppsala|Varmlands|Vasterbottens|Vasternorrlands|Vastmanlands|Vastra Gotalands"
sStateArray[220]="-Select-|Aargau|Ausser-Rhoden|Basel-Landschaft|Basel-Stadt|Bern|Fribourg|Geneve|Glarus|Graubunden|Inner-Rhoden|Jura|Luzern|Neuchatel|Nidwalden|Obwalden|Sankt Gallen|Schaffhausen|Schwyz|Solothurn|Thurgau|Ticino|Uri|Valais|Vaud|Zug|Zurich"
sStateArray[221]="-Select-|Al Hasakah|Al Ladhiqiyah|Al Qunaytirah|Ar Raqqah|As Suwayda'|Dar'a|Dayr az Zawr|Dimashq|Halab|Hamah|Hims|Idlib|Rif Dimashq|Tartus"
sStateArray[222]="-Select-|Chang-hua|Chi-lung|Chia-i|Chia-i|Chung-hsing-hsin-ts'un|Hsin-chu|Hsin-chu|Hua-lien|I-lan|Kao-hsiung|Kao-hsiung|Miao-li|Nan-t'ou|P'eng-hu|P'ing-tung|T'ai-chung|T'ai-chung|T'ai-nan|T'ai-nan|T'ai-pei|T'ai-pei|T'ai-tung|T'ao-yuan|Yun-lin"
sStateArray[223]="-Select-|Viloyati Khatlon|Viloyati Leninobod|Viloyati Mukhtori Kuhistoni Badakhshon"
sStateArray[224]="-Select-|Arusha|Dar es Salaam|Dodoma|Iringa|Kagera|Kigoma|Kilimanjaro|Lindi|Mara|Mbeya|Morogoro|Mtwara|Mwanza|Pemba North|Pemba South|Pwani|Rukwa|Ruvuma|Shinyanga|Singida|Tabora|Tanga|Zanzibar Central/South|Zanzibar North|Zanzibar Urban/West"
sStateArray[225]="-Select-|Amnat Charoen|Ang Thong|Buriram|Chachoengsao|Chai Nat|Chaiyaphum|Chanthaburi|Chiang Mai|Chiang Rai|Chon Buri|Chumphon|Kalasin|Kamphaeng Phet|Kanchanaburi|Khon Kaen|Krabi|Krung Thep Mahanakhon (Bangkok)|Lampang|Lamphun|Loei|Lop Buri|Mae Hong Son|Maha Sarakham|Mukdahan|Nakhon Nayok|Nakhon Pathom|Nakhon Phanom|Nakhon Ratchasima|Nakhon Sawan|Nakhon Si Thammarat|Nan|Narathiwat|Nong Bua Lamphu|Nong Khai|Nonthaburi|Pathum Thani|Pattani|Phangnga|Phatthalung|Phayao|Phetchabun|Phetchaburi|Phichit|Phitsanulok|Phra Nakhon Si Ayutthaya|Phrae|Phuket|Prachin Buri|Prachuap Khiri Khan|Ranong|Ratchaburi|Rayong|Roi Et|Sa Kaeo|Sakon Nakhon|Samut Prakan|Samut Sakhon|Samut Songkhram|Sara Buri|Satun|Sing Buri|Sisaket|Songkhla|Sukhothai|Suphan Buri|Surat Thani|Surin|Tak|Trang|Trat|Ubon Ratchathani|Udon Thani|Uthai Thani|Uttaradit|Yala|Yasothon"
sStateArray[226]="-Select-|Tobago"
sStateArray[227]="-Select-|De La Kara|Des Plateaux|Des Savanes|Du Centre|Maritime"
sStateArray[228]="-Select-|Atafu|Fakaofo|Nukunonu"
sStateArray[229]="-Select-|Ha'apai|Tongatapu|Vava'u"
sStateArray[230]="-Select-|Arima|Caroni|Mayaro|Nariva|Port-of-Spain|Saint Andrew|Saint David|Saint George|Saint Patrick|San Fernando|Victoria"
sStateArray[231]="-Select-|Ariana|Beja|Ben Arous|Bizerte|El Kef|Gabes|Gafsa|Jendouba|Kairouan|Kasserine|Kebili|Mahdia|Medenine|Monastir|Nabeul|Sfax|Sidi Bou Zid|Siliana|Sousse|Tataouine|Tozeur|Tunis|Zaghouan"
sStateArray[232]="-Select-|Adana|Adiyaman|Afyon|Agri|Aksaray|Amasya|Ankara|Antalya|Ardahan|Artvin|Aydin|Balikesir|Bartin|Batman|Bayburt|Bilecik|Bingol|Bitlis|Bolu|Burdur|Bursa|Canakkale|Cankiri|Corum|Denizli|Diyarbakir|Duzce|Edirne|Elazig|Erzincan|Erzurum|Eskisehir|Gaziantep|Giresun|Gumushane|Hakkari|Hatay|Icel|Igdir|Isparta|Istanbul|Izmir|Kahramanmaras|Karabuk|Karaman|Kars|Kastamonu|Kayseri|Kilis|Kirikkale|Kirklareli|Kirsehir|Kocaeli|Konya|Kutahya|Malatya|Manisa|Mardin|Mugla|Mus|Nevsehir|Nigde|Ordu|Osmaniye|Rize|Sakarya|Samsun|Sanliurfa|Siirt|Sinop|Sirnak|Sivas|Tekirdag|Tokat|Trabzon|Tunceli|Usak|Van|Yalova|Yozgat|Zonguldak"
sStateArray[233]="-Select-|Ahal Welayaty|Balkan Welayaty|Dashhowuz Welayaty|Lebap Welayaty|Mary Welayaty"
sStateArray[234]="-Select-|Tuvalu"
sStateArray[235]="-Select-|Adjumani|Apac|Arua|Bugiri|Bundibugyo|Bushenyi|Busia|Gulu|Hoima|Iganga|Jinja|Kabale|Kabarole|Kalangala|Kampala|Kamuli|Kapchorwa|Kasese|Katakwi|Kibale|Kiboga|Kisoro|Kitgum|Kotido|Kumi|Lira|Luwero|Masaka|Masindi|Mbale|Mbarara|Moroto|Moyo|Mpigi|Mubende|Mukono|Nakasongola|Nebbi|Ntungamo|Pallisa|Rakai|Rukungiri|Sembabule|Soroti|Tororo"
sStateArray[236]="-Select-|Avtonomna Respublika Krym (Simferopol')|Cherkas'ka (Cherkasy)|Chernihivs'ka (Chernihiv)|Chernivets'ka (Chernivtsi)|Dnipropetrovs'ka (Dnipropetrovs'k)|Donets'ka (Donets'k)|Ivano-Frankivs'ka (Ivano-Frankivs'k)|Kharkivs'ka (Kharkiv)|Khersons'ka (Kherson)|Khmel'nyts'ka (Khmel'nyts'kyy)|Kirovohrads'ka (Kirovohrad)|Kyyiv|Kyyivs'ka (Kiev)|L'vivs'ka (L'viv)|Luhans'ka (Luhans'k)|Mykolayivs'ka (Mykolayiv)|Odes'ka (Odesa)|Poltavs'ka (Poltava)|Rivnens'ka (Rivne)|Sevastopol'|Sums'ka (Sumy)|Ternopil's'ka (Ternopil')|Vinnyts'ka (Vinnytsya)|Volyns'ka (Luts'k)|Zakarpats'ka (Uzhhorod)|Zaporiz'ka (Zaporizhzhya)|Zhytomyrs'ka (Zhytomyr)"
sStateArray[237]="-Select-|'Ajman|Abu Zaby (Abu Dhabi)|Al Fujayrah|Ash Shariqah (Sharjah)|Dubayy (Dubai)|Ra's al Khaymah|Umm al Qaywayn"
sStateArray[238]="-Select-|Barking and Dagenham|Barnet|Barnsley|Bath and North East Somerset|Bedfordshire|Bexley|Birmingham|Blackburn with Darwen|Blackpool|Bolton|Bournemouth|Bracknell Forest|Bradford|Brent|Brighton and Hove|Bromley|Buckinghamshire|Bury|Calderdale|Cambridgeshire|Camden|Cheshire|City of Bristol|City of Kingston upon Hull|City of London|Cornwall|Coventry|Croydon|Cumbria|Darlington|Derby|Derbyshire|Devon|Doncaster|Dorset|Dudley|Durham|Ealing|East Riding of Yorkshire|East Sussex|Enfield|Essex|Gateshead|Gloucestershire|Greenwich|Hackney|Halton|Hammersmith and Fulham|Hampshire|Haringey|Harrow|Hartlepool|Havering|Herefordshire|Hertfordshire|Hillingdon|Hounslow|Isle of Wight|Islington|Kensington and Chelsea|Kent|Kingston upon Thames|Kirklees|Knowsley|Lambeth|Lancashire|Leeds|Leicester|Leicestershire|Lewisham|Lincolnshire|Liverpool|Luton|Manchester|Medway|Merton|Middlesbrough|Milton Keynes|Newcastle upon Tyne|Newham|Norfolk|North East Lincolnshire|North Lincolnshire|North Somerset|North Tyneside|North Yorkshire|Northamptonshire|Northumberland|Nottingham|Nottinghamshire|Oldham|Oxfordshire|Peterborough|Plymouth|Poole|Portsmouth|Reading|Redbridge|Redcar and Cleveland|Richmond upon Thames|Rochdale|Rotherham|Rutland|Salford|Sandwell|Sefton|Sheffield|Shropshire|Slough|Solihull|Somerset|South Gloucestershire|South Tyneside|Southampton|Southend-on-Sea|Southwark|St. Helens|Staffordshire|Stockport|Stockton-on-Tees|Stoke-on-Trent|Suffolk|Sunderland|Surrey|Sutton|Swindon|Tameside|Telford and Wrekin|Thurrock|Torbay|Tower Hamlets|Trafford|Wakefield|Walsall|Waltham Forest|Wandsworth|Warrington|Warwickshire|West Berkshire|West Sussex|Westminster|Wigan|Wiltshire|Windsor and Maidenhead|Wirral|Wokingham|Wolverhampton|Worcestershire|York"
sStateArray[239]="-Select-|Artigas|Canelones|Cerro Largo|Colonia|Durazno|Flores|Florida|Lavalleja|Maldonado|Montevideo|Paysandu|Rio Negro|Rivera|Rocha|Salto|San Jose|Soriano|Tacuarembo|Treinta y Tres"
sStateArray[240]="-Select-|Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|District of Columbia|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West Virginia|Wisconsin|Wyoming"
sStateArray[241]="-Select-|Andijon Wiloyati|Bukhoro Wiloyati|Farghona Wiloyati|Jizzakh Wiloyati|Khorazm Wiloyati (Urganch)|Namangan Wiloyati|Nawoiy Wiloyati|Qashqadaryo Wiloyati (Qarshi)|Qoraqalpoghiston (Nukus)|Samarqand Wiloyati|Sirdaryo Wiloyati (Guliston)|Surkhondaryo Wiloyati (Termiz)|Toshkent Shahri|Toshkent Wiloyati"
sStateArray[242]="-Select-|Malampa|Penama|Sanma|Shefa|Tafea|Torba"
sStateArray[243]="-Select-|Amazonas|Anzoategui|Apure|Aragua|Barinas|Bolivar|Carabobo|Cojedes|Delta Amacuro|Dependencias Federales|Distrito Federal|Falcon|Guarico|Lara|Merida|Miranda|Monagas|Nueva Esparta|Portuguesa|Sucre|Tachira|Trujillo|Vargas|Yaracuy|Zulia"
sStateArray[244]="-Select-|An Giang|Ba Ria-Vung Tau|Bac Giang|Bac Kan|Bac Lieu|Bac Ninh|Ben Tre|Binh Dinh|Binh Duong|Binh Phuoc|Binh Thuan|Ca Mau|Can Tho|Cao Bang|Da Nang|Dac Lak|Dong Nai|Dong Thap|Gia Lai|Ha Giang|Ha Nam|Ha Noi|Ha Tay|Ha Tinh|Hai Duong|Hai Phong|Ho Chi Minh|Hoa Binh|Hung Yen|Khanh Hoa|Kien Giang|Kon Tum|Lai Chau|Lam Dong|Lang Son|Lao Cai|Long An|Nam Dinh|Nghe An|Ninh Binh|Ninh Thuan|Phu Tho|Phu Yen|Quang Binh|Quang Nam|Quang Ngai|Quang Ninh|Quang Tri|Soc Trang|Son La|Tay Ninh|Thai Binh|Thai Nguyen|Thanh Hoa|Thua Thien-Hue|Tien Giang|Tra Vinh|Tuyen Quang|Vinh Long|Vinh Phuc|Yen Bai"
sStateArray[245]="-Select-|Saint Croix|Saint John|Saint Thomas"
sStateArray[246]="-Select-|Blaenau Gwent|Bridgend|Caerphilly|Cardiff|Carmarthenshire|Ceredigion|Conwy|Denbighshire|Flintshire|Gwynedd|Isle of Anglesey|Merthyr Tydfil|Monmouthshire|Neath Port Talbot|Newport|Pembrokeshire|Powys|Rhondda Cynon Taff|Swansea|The Vale of Glamorgan|Torfaen|Wrexham"
sStateArray[247]="-Select-|Alo|Sigave|Wallis"
sStateArray[248]="-Select-|West Bank"
sStateArray[249]="-Select-|Western Sahara"
sStateArray[250]="-Select-|'Adan|'Ataq|Abyan|Al Bayda'|Al Hudaydah|Al Jawf|Al Mahrah|Al Mahwit|Dhamar|Hadhramawt|Hajjah|Ibb|Lahij|Ma'rib|Sa'dah|San'a'|Ta'izz"
sStateArray[251]="-Select-|Central|Copperbelt|Eastern|Luapula|Lusaka|North-Western|Northern|Southern|Western"
sStateArray[252]="-Select-|Bulawayo|Harare|ManicalandMashonaland Central|Mashonaland East|Mashonaland West|Masvingo|Matabeleland North|Matabeleland South|Midlands"

var menu3=new Array()

menu3[0]='<a href="showthread1.php" class=\"menu\">1.The Benefits of a Good Shower </a>';
menu3[1]='<a href="showthread2.php" class=\"menu\">2.About Showerheads & Which one is Right for You</a>';
menu3[2]='<a href="showthread3.php" class=\"menu\">3.Handheld or Wall-mounted Showerhead</a>';
menu3[3]='<a href="showthread4.php" class=\"menu\">4.Showerhead Spray Types and their Unique Uses</a>';
menu3[4]='<a href="showthread5.php" class=\"menu\">5.Materials of Construction of Showerheads</a>';
menu3[5]='<a href="showthread6.php" class=\"menu\">6.How to install a showerhead</a>';
menu3[6]='<a href="showthread7.php" class=\"menu\">7.Poor water pressure and your showerhead</a>';
menu3[7]='<a href="showthread8.php" class=\"menu\">8.How to Clean Your Clogged Shower Head</a>';
menu3[8]='<a href="showthread9.php" class=\"menu\">9.How to Fix a Leaky Showerhead</a>';
menu3[9]='<a href="showthread10.php" class=\"menu\">10.Varying Water Temperatures</a>';
menu3[10]='<a href="bestsellers.php" class=\"menu\">11.Best Sellers</a>';
/*var menu4=new Array()

menu4[0]='<a href=\"javascript:void(0)\" onclick=\"javascript:addNavigation(\'ShowThread9\');\" class=\"menu\">Rate your favorite Bath/Body products or post your tips</a>';*/

var menuwidth='140px' //default menu width
var menubgcolor='#A62900'//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" style="visibility:hidden;" 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="-500px"
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 topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
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){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
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+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}
var a=null;
var b=null;
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

function GetXmlHttpObject() 
{
	var objXMLHttp=null;
	//		if (window.XMLHttpRequest)
	//		{
	//		objXMLHttp=new XMLHttpRequest();
	//		}
	//		else if (window.ActiveXObject)
	//		{
	//		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	//		}
	//		return objXMLHttp;
	try 
	{ 
		return new ActiveXObject("Msxml2.XMLHTTP"); 
	} 
	catch (e) 
	{
	}
	try 
	{ 
		return new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	catch (e) 
	{
	}
	try 
	{ 
		return new XMLHttpRequest(); 
	} 
	catch(e) 
	{
	}
	//objXMLHttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
	
	return objXMLHttp;
}



var r={'special':/[\W]/g}
function valid(o,w) {
o.value = o.value.replace(r[w],'');
}