function checkStatus(){var c=document.sellerStatus;var b=false;var a=0;if(c.seller_status.length!=undefined){for(a=0;a<c.seller_status.length;a++){if(c.seller_status[a].checked==true){b=true;break}}}else{if(c.seller_status.checked==true){b=true}}if(b==false){alert("Please select status to be changed !");return false}return true}function checkSuspend(){if(CheckEmpty(document.getElementById("seller_status_suspend_reason"))){alert("Please enter the reason of suspend");document.getElementById("seller_status_suspend_reason").focus();return false}return true}function CheckSuspendForm(){if(CheckEmpty(document.getElementById("deactiveReason"))){alert("Please enter the reason");document.getElementById("deactiveReason").focus();return false}var a=confirm("Are you sure you want to deactivate ?");if(a==true){for(i=0;i<document.newsletterListing.elements.length;i++){try{document.newsletterListing.elements[i].disabled=true}catch(b){}}for(i=0;i<document.form2.elements.length;i++){try{document.form2.elements[i].disabled=true}catch(b){}}return true}else{return false}}function blockcompany(){if(CheckEmpty(document.getElementById("deactiveReason"))){alert("Please enter the reason");document.getElementById("deactiveReason").focus();return false}}function CheckCompanyBlockForm(){if(CheckEmpty(document.getElementById("deactiveReason"))){alert("Please enter the reason");document.getElementById("deactiveReason").focus();return false}var a=confirm("Are you sure you want to block this company ?");if(a==true){alert(document.newsletterListing.elements[i].disabled);for(i=0;i<document.newsletterListing.elements.length;i++){try{document.newsletterListing.elements[i].disabled=true}catch(b){alert(b)}}for(i=0;i<document.form2.elements.length;i++){try{document.form2.elements[i].disabled=true}catch(b){alert(b)}}return true}else{return false}}function CheckActiveForm(b,a){j=0;checked=false;s=0;mode="Update credit";confirm_text="Please select advertisement(s) ";if(a=="u"){confirm_text="Please select user(s) "}if(a=="a"){confirm_text="Please select advertisement(s) "}if(b=="mf"){mode="Mark As Featured";confirm_text="Please select advertisement(s) "}if(b=="umf"){mode="Delete from Featured List";confirm_text="Please select advertisement(s) "}if(b=="delete"){mode="delete user(s)"}if(b=="approved"){mode="approved signup request";confirm_text="Please select user(s) "}if(b=="a"){mode="activate"}else{if(b=="d"){mode="deactivate"}}for(i=0;i<document.newsletterListing.elements.length;i++){if((document.newsletterListing.elements[i].type=="checkbox")&&(document.newsletterListing.elements[i].name.indexOf("box_")==0)){if(document.newsletterListing.elements[i].checked==true){checked=true;break}}}if(checked==false){alert(confirm_text)}else{var c=confirm("Are you sure you want to "+mode+"  ?");if(c==true){return true}else{return false}}}function hideDiv(){for(i=0;i<document.newsletterListing.elements.length;i++){try{document.newsletterListing.elements[i].disabled=false}catch(a){alert(a)}}document.getElementById("LoadingDiv").style.display="none"}function hideDiv1(){window.close()}function showDiv(){for(i=0;i<document.newsletterListing.elements.length;i++){try{document.newsletterListing.elements[i].disabled=true}catch(a){alert(a)}}document.getElementById("LoadingDiv").style.display="block"}function CheckSearchFrm(){if(document.getElementById("fromdate").value==""){alert("Please select from date !!");return false}if(document.getElementById("todate").value==""){alert("Please select to date !!");return false}if(document.getElementById("fromdate").value!=""&&document.getElementById("todate").value!=""){from_date=document.getElementById("fromdate").value;arr_from_date=from_date.split("-");ExYear=arr_from_date[0];ExMonth=arr_from_date[1];ExDay=arr_from_date[2];fromdate=new Date(ExYear,ExMonth,ExDay);to_date=document.getElementById("todate").value;arr_to_date=to_date.split("-");ExYear=arr_to_date[0];ExMonth=arr_to_date[1];ExDay=arr_to_date[2];todate=new Date(ExYear,ExMonth,ExDay);if(fromdate.getTime()>todate.getTime()){alert("From Date can't be greater than to date");return false}}return true}function checkKey(a){if(a.keyCode){unicode=a.keyCode}else{if(a.which){unicode=a.which}else{if(a.charCode){unicode=a.charCode}else{}}}if(unicode==13){document.getElementById("signupbutton").focus()}}function CheckDisapproveForm(){var a=tinyMCE.getContent();repMess=a.replace(/&nbsp;/g,"");a="";a=repMess.replace(new RegExp("<p>","g"),"");a=a.replace(new RegExp("</p>","g"),"");finalMess=Trim(a);if(finalMess==""){alert("Please enter dis-approve reason.");return false}else{return true}}function chechReport(){if(document.getElementById("type_2").checked==true){fromdate=document.getElementById("senddate").value;todate=document.getElementById("todate").value;if(Trim(fromdate)==""){alert("Enter From date !");document.getElementById("senddate").value="";document.getElementById("senddate").focus();return false}else{if(isDate(fromdate)==false){document.getElementById("senddate").value="";document.getElementById("senddate").focus();return false}}if(Trim(todate)==""){alert("Enter To date !");document.getElementById("todate").value="";document.getElementById("todate").focus();return false}else{if(isDate(todate)==false){document.getElementById("todate").value="";document.getElementById("todate").focus();return false}}arr_date=fromdate.split("-");ExYear=arr_date[0];ExMonth=arr_date[1];ExDay=arr_date[2];fullfromdate=new Date(ExYear,ExMonth,ExDay);arr_date1=todate.split("-");ExYear1=arr_date1[0];ExMonth1=arr_date1[1];ExDay1=arr_date1[2];fulltodate=new Date(ExYear1,ExMonth1,ExDay1);if(fullfromdate.getTime()>fulltodate.getTime()){alert("From date can't be greater than To date!");return false}}return true}function showhideMenuRadio(a){alert(a);if(a==1){document.getElementById("exactperiod").style.display="block";document.getElementById("daterange").style.display="none";document.getElementById("exactrange").style.display="none"}if(a==2){document.getElementById("daterange").style.display="block";document.getElementById("exactperiod").style.display="none";document.getElementById("exactrange").style.display="none"}if(a==3){document.getElementById("daterange").style.display="block";document.getElementById("exactperiod").style.display="none";document.getElementById("exactrange").style.display="none"}}function showhideMenu(a,b,c){document.getElementById(a).style.display="block";document.getElementById(b).style.display="none";document.getElementById(c).style.display="none"}function hideMenu(a,b,c){document.getElementById(a).style.display="none";document.getElementById(b).style.display="none";document.getElementById(c).style.display="none"}function hideMenunew(a,b,c){document.getElementById(a).style.display="block";document.getElementById(b).style.display="none";document.getElementById(c).style.display="none"}function checkFrm(){if(document.getElementById("type_2").checked==true){fromdate=document.getElementById("senddate").value;todate=document.getElementById("todate").value;if(Trim(fromdate)==""){alert("Enter FROM date !");document.getElementById("senddate").value="";document.getElementById("senddate").focus();return false}else{if(isDate(fromdate)==false){document.getElementById("senddate").value="";document.getElementById("senddate").focus();return false}}if(Trim(todate)==""){alert("Enter TO date !");document.getElementById("todate").value="";document.getElementById("todate").focus();return false}else{if(isDate(todate)==false){document.getElementById("todate").value="";document.getElementById("todate").focus();return false}}arr_date=fromdate.split("-");ExYear=arr_date[0];ExMonth=arr_date[1];ExDay=arr_date[2];fullfromdate=new Date(ExYear,ExMonth,ExDay);arr_date1=todate.split("-");ExYear1=arr_date1[0];ExMonth1=arr_date1[1];ExDay1=arr_date1[2];fulltodate=new Date(ExYear1,ExMonth1,ExDay1);if(fullfromdate.getTime()>fulltodate.getTime()){alert("FROM date can't be greater than TO date!");return false}}return true}function chechReportFrm(){if(document.getElementById("type_2").checked==true){fromdate=document.getElementById("senddate").value;todate=document.getElementById("todate").value;between=document.getElementById("between").value;if(between=="between"){if(Trim(fromdate)==""){alert("Enter FROM date !");document.getElementById("senddate").value="";document.getElementById("senddate").focus();return false}else{if(isDate(fromdate)==false){document.getElementById("senddate").value="";document.getElementById("senddate").focus();return false}}if(Trim(todate)==""){alert("Enter TO date !");document.getElementById("todate").value="";document.getElementById("todate").focus();return false}else{if(isDate(todate)==false){document.getElementById("todate").value="";document.getElementById("todate").focus();return false}}arr_date=fromdate.split("-");ExYear=arr_date[0];ExMonth=arr_date[1];ExDay=arr_date[2];fullfromdate=new Date(ExYear,ExMonth,ExDay);arr_date1=todate.split("-");ExYear1=arr_date1[0];ExMonth1=arr_date1[1];ExDay1=arr_date1[2];fulltodate=new Date(ExYear1,ExMonth1,ExDay1);if(fullfromdate.getTime()>fulltodate.getTime()){alert("FROM date can't be greater than TO date!");return false}}}return true}function checkPrompts(){if(CheckEmpty(document.getElementById("prompttext"))){alert("Please enter prompt & text.");document.getElementById("prompttext").focus();return false}};