function downloadSMSSubmitForSoftware(){var f=/^([0]{2}|\+){0,1}([0-9]){4,15}$/;var d=$("mobile").value;var a=$("hid").value;var c=new Date();var b=$("sendtime").value;var e=c.getHours()*60+c.getMinutes()*60+c.getSeconds();if(!f.test(d)){window.alert("Please enter a valid mobile number.")}else{$("sendtime").value=e;$("smsresult").innerHTML="Processing ...";document.getElementById("tryAgain").style.display="none";ajaxFunction("downloadSMSForSoftware")}}function mobiDownloadForSoftware(){document.mobiDownload.action="/en/mobile-voip-sms-download/downloadmobi/index.php";document.mobiDownload.submit()}function pcDownloadForSoftwareSubmit(a){document.getElementById("operatorAlertPC").innerHTML="";document.frm.action="/en/mobile-voip-sms-download/downloadpc/index.php?network="+a;document.frm.submit()}function pcDownloadForSoftware(c){var a=document.getElementById("operator_pc");var d=document.getElementById("operatorAlertPC");if(a){if(a.value==0){d.innerHTML="Please select your Mobile Network from the drop down list."}else{var b=document.getElementById("dualMode_pc");if(b){if(a.value==1||a.value==2){if(b.value==0){d.innerHTML="Please select your phone type from the drop down list."}else{pcDownloadForSoftwareSubmit(c)}}else{pcDownloadForSoftwareSubmit(c)}}else{pcDownloadForSoftwareSubmit(c)}}}else{document.frm.action="/en/mobile-voip-sms-download/downloadpc/index.php";document.frm.submit()}}function showAnswer(a){if(a=="noReceive"){if(document.getElementById("noReceiveAnswer").style.display=="none"){document.getElementById("noReceiveAnswer").style.display="block";document.getElementById("noInternet").style.display="none";document.getElementById("noFind").style.display="none"}else{document.getElementById("noReceiveAnswer").style.display="none";document.getElementById("noInternet").style.display="block";document.getElementById("noFind").style.display="block"}}else{if(a=="noInternet"){if(document.getElementById("noInternetAnswer").style.display=="none"){document.getElementById("noInternetAnswer").style.display="block";document.getElementById("noReceive").style.display="none";document.getElementById("noFind").style.display="none"}else{document.getElementById("noInternetAnswer").style.display="none";document.getElementById("noReceive").style.display="block";document.getElementById("noFind").style.display="block"}}else{if(a=="noFind"){if(document.getElementById("noFindAnswer").style.display=="none"){document.getElementById("noFindAnswer").style.display="block";document.getElementById("noInternet").style.display="none";document.getElementById("noReceive").style.display="none"}else{document.getElementById("noFindAnswer").style.display="none";document.getElementById("noInternet").style.display="block";document.getElementById("noReceive").style.display="block"}}}}}function ajaxFunction(f){var a;try{a=new XMLHttpRequest()}catch(g){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(g){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(g){alert("Your browser does not support AJAX!");return false}}}a.onreadystatechange=function(){if(a.readyState==4){if(f=="downloadSMS"){var m=a.responseText;$("smsresult").innerHTML=m;if(m=="MO-Call Sent"){var j=new Date();var l=j.getHours()*60+j.getMinutes()*60+j.getSeconds();$("sendtime").value=l;var k=setTimeout("$('sendtime').value=''",40000)}else{$("sendtime").value="";document.getElementById("tryAgain").style.display="none"}}else{if(f=="downloadSMSForSoftware"){var m=a.responseText;$("smsresult").innerHTML=m;if(m!="MO-Call Sent"){if(document.getElementById("operator_sms")){var e=$("operator_sms").value}else{if(document.getElementById("operator")){var e=$("operator").value}else{var e=""}}$("sendtime").value="";document.getElementById("tryAgain").style.display="none";document.location="/en/mobile-voip-sms-download/downloadsms/index.php?hid="+$("hid").value+"&mobile="+$("mobile").value+"&voip="+$("voip").value+"&operator="+e}}else{document.getElementById("txtHint").innerHTML=a.responseText}}}};if(f=="downloadSMS"){var i=($("language")!=null)?$("language").value:"";var c=encodeURIComponent($("mt").value);var h=$("voiop").value;var d="softwaredownload_do.php?mobile="+$("mobile").value+"&hid="+$("hid").value+"&language="+i+"&downType=phone&mt="+c+"&voiop="+h;a.open("GET",d,true)}else{if(f=="downloadSMSForSoftware"){var i=($("language")!=null)?$("language").value:"";var c=encodeURIComponent($("mt").value);if(document.getElementById("operator_sms")){var b=$("operator_sms").value}else{if(document.getElementById("operator")){var b=$("operator").value}else{var b=""}}var d="/en/mobile-voip-sms-download/choosedownload/softwaredownload_do.php?mobile="+$("mobile").value+"&hid="+$("hid").value+"&voip="+$("voip").value+"&language="+i+"&downType=phone&mt="+c+"&operator="+b;a.open("GET",d,true)}}a.send(null)}function showManufacturer(a){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}function changeOperator(c){document.getElementById("operatorAlertPC").innerHTML="";var a=document.getElementById("operator_"+c).value;var b=document.getElementById("operator_"+c).options[document.getElementById("operator_"+c).selectedIndex].text;if(a=="1"||a=="2"){document.getElementById("CDMAoperators_"+c).style.display="block"}else{document.getElementById("CDMAoperators_"+c).style.display="none";document.getElementById("pcDownloadLink").style.display="none";document.getElementById("pcDownloadButton").style.display="block"}}function changeNetwork(a){document.getElementById("operatorAlertPC").innerHTML=""}function pcDownloadNetwork(a){document.frm.action="../choosedownload/softwaredownload_do.php?network="+a;document.frm.submit()}function MformWindowTemplate(g){try{var b,c;if(self.innerHeight){b=self.innerWidth;c=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;c=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;c=document.body.clientHeight}}}sh=document.body.scrollTop;sh=sh?sh:document.documentElement.scrollTop;mh=document.body.scrollHeight;mh=mh>c?mh:c;document.getElementById("MformWindow_"+g).style.display="";var f=document.getElementById("div_templage_"+g).style.width;f=f.replace("px","");var a=document.getElementById("div_templage_"+g).style.height;a=a.replace("px","");if(a==""){a=400}document.getElementById("MformWindow_"+g).style.left=(b-f)/2+"px";document.getElementById("MformWindow_"+g).style.top=((c-a)/2+sh)+"px";document.getElementById("bgwindow_"+g).style.display="";document.getElementById("bgwindow_"+g).style.height=mh+"px";if(isIe){document.getElementById("bgwindow_"+g).style.width=b+"px"}}catch(d){return true}return false}function MformWindowClose(a){document.getElementById("MformWindow_"+a).style.display="none";document.getElementById("bgwindow_"+a).style.display="none"}function showExtraCountryMessage(){$("flashContent").style.display="none";MformWindowTemplate("extra")}function closeExtraCountryMessage(){MformWindowClose("extra");$("flashContent").style.display="";return false}function redirectUrlSupport(c){var a=c.options[c.selectedIndex].text.toLowerCase();var b=$("mid");var d=b.options[b.selectedIndex].text.toLowerCase();d=d.replace(/\s/g,"-");a=a.replace(/^\s/,"");a=a.replace(/\s/g,"-");a=a.replace(d,"");a=a.replace(/^-/,"");window.location.href=HOST_DIR+"/mobile-voip-sms-download/"+d+"/"+a}function redirectcrl(a){var b=a.options[a.selectedIndex].text.toLowerCase();b=b.replace(/\s/g,"-");window.location.href=HOST_DIR+"/mobile-voip-sms-download/"+b}function redirectvoip(a){var b=a.options[a.selectedIndex].text.toLowerCase();b=b.replace(/\s/g,"-");window.location.href="/en/mobile-voip-sms-download/voip?m="+b};