function disableField(form1)
{alert(form1)
var formElements;for(var n=0;n<form1.elements.length;n++)
{if(form1.elements[n].type=="text")
{form1.elements[n].disabled=false;var tid=form1.elements[n].id;$("#"+tid).addClass("DisebleTextArea");}}}
function disableField(form1)
{var formElements;for(var n=0;n<form1.elements.length;n++)
{if(form1.elements[n].type=="text")
{form1.elements[n].disabled=true;}}}
function ec_logo_ajax(qid,title,pk,act)
{querystring="query="+qid+"&title="+title+"&package="+pk;$("#tmpred").load("wp-content/plugins/wp-customize-e-commerce/cart.php",{query:qid,package:pk,action:act},function(){document.getElementById('progressbr').style.display="none";if(window.open("checkout?"+querystring,'registration')){}else{alert("We have detected that you are using popup blocking software.\n To access the Pop-up Blocker settings: \n \n  1.  At the top of the Firefox windowOn the menu bar, click on the ToolsFirefoxEdit menu, and select Options...Preferences.... \n 2. Select the Content panel.")}});}
function deletecartitem(qid,pk,red,act)
{$("#tmpred").load("wp-content/plugins/wp-customize-e-commerce/cart.php",{query:qid,package:pk,action:act},function(){document.getElementById('progressbr').style.display="none";document.location="checkout?"+red});}
function ChkCouponNo(cno)
{$.get("wp-content/plugins/wp-customize-e-commerce/coupons.php",{cno:cno,action:"chkcoupon"},function(data){if(data=="false")
{alert("Soory this coupon no is wrong !!");}
else if(data=="exprier")
{alert("Soory this coupon was exprier !!");}
else if(parseFloat(data)>0)
{location.reload(true);}
else
{alert("Soory this coupon no is wrong !!");}});}
function GetQueryString()
{hu=window.location.search.substring(1);gy=hu.split("&");if(gy.length>0)
{document.step1.action=document.step1.action+"?1=1";for(i=0;i<gy.length;i++)
{ft=gy[i].split("=");if(ft[0]=="query")
document.step1.action=document.step1.action+"&pid="+ft[1];else
document.step1.action=document.step1.action+"&"+ft[0]+"="+ft[1];}}}
function GetPackageName(name)
{hu=window.location.search.substring(1);gy=hu.split("&");if(gy.length>0)
{for(i=0;i<gy.length;i++)
{ft=gy[i].split("=");if(ft[0]==name)
{f=ft[1].replace(/%20/g," ");return document.write(f);}}}}
function checkform(form){var message='';var aa='';var count=0;if(form.logoname.value==""){message+="*** Please input your Logo Name.\n";}
if(form.logodescription.value==""){message+="*** Please input your description.\n";}
if(message!=""){alert(message);return false;}
return true;}
function SetCountryValue(settCb)
{var listbox=document.getElementById(settCb);for(var count=0;count<listbox.options.length;count++)
{listbox.options[count].value=listbox.options[count].text;}}
function selectCoutrny(selvalue,cbname)
{var listbox=document.getElementById(cbname);for(var count=0;count<listbox.options.length;count++)
{if(listbox.options[count].value==selvalue)
listbox.options[count].selected=true;}}
function setStateDD(selValue,cb_name)
{var st_cb=document.getElementById('state_cb');var st_txt=document.getElementById('state_text');st_cb.style.display="none";st_txt.style.display="none";st_cb.name="state_cb";st_txt.name="state_txt";if(1==selValue)
{st_cb.name=cb_name;st_cb.style.display="block";}
else
{st_txt.name=cb_name;st_txt.style.display="block";}}
function ChkCheckoutForm(frmname)
{var strmsg="";if(frmname.email.value=="")
strmsg=" Enter email address !";if(frmname.firstname.value=="")
strmsg=strmsg+"\n"+" Enter First Name !";if(frmname.license.checked==false)
strmsg=strmsg+"\n"+" Accept Terms and Conditions !";if(strmsg=="")
return true;else
{alert(strmsg);return false;}}
function ChkRegisterForm(frmname)
{var strmsg="";if(frmname.firstname.value=="")
strmsg=strmsg+"\n"+" Enter First Name !";if(frmname.user_email.value=="")
strmsg=strmsg+"\n"+" Enter email address !";if(frmname.pass1.value=="")
strmsg=strmsg+"\n"+" Enter password !";if(frmname.pass1.value!=frmname.pass2.value)
strmsg=strmsg+"\n"+" Password and confirm password does not match !";if(frmname.code.value=="")
strmsg=strmsg+"\n"+" Enter word verification code !";if(frmname.license.checked==false)
strmsg=strmsg+"\n"+" Accept Terms and Conditions !";if(strmsg=="")
return true;else
{alert(strmsg);return false;}}
