function General(){};General.trimAll=function(sString){if(sString.length==0)return'';while(sString.substring(0,1)==' ')sString=sString.substring(1,sString.length);while(sString.substring(sString.length-1,sString.length)==' ')sString=sString.substring(0,sString.length-1);return sString;};General.isEmail=function(login){if(!login.match(/^[a-zA-Z\._\-0-9]{1,}@[a-zA-Z0-9\-_\.]{1,}\.[a-zA-Z]{2,}$/))return false;return true;};General.isKey=function(serial_str){if(!serial_str.match(/^[a-fA-F0-9\- ]{20,}$/))return false;return true;};General.isNumeric=function(sText){if(sText.length==0)return false;var ValidChars="0123456789";var Char;var i;for(i=0;i<sText.length;i++){Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1)return false;};return true;};General.isReal=function(sText){if(sText.length==0)return false;var ValidChars="0123456789.";var Char;var i;for(i=0;i<sText.length;i++){Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1)return false;};return true;};General.DaysArray=function(n){for(var i=1;i<=n;i++){this[i]=31;if(i==4||i==6||i==9||i==11){this[i]=30;};if(i==2){this[i]=29;};};return this;};General.daysInFebruary=function(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);};General.checkDate=function(day,month,year){nrDays=General.DaysArray(12);if(month==2&&day>General.daysInFebruary(year))return false;if(day>nrDays[month])return false;return true;};General.OpenScanWindow=function(url,name){var day=new Date();var parameters='';var pageName=name?name:day.getTime();if(screen.height<525)parameters='scrollbars=yes,status=no,width=746,height=525,menubar=no,left=50,top=50,location=no,resizable=no,directories=no';else parameters='scrollbars=no,status=no,width=746,height=525,menubar=no,left=50,top=50,location=no,resizable=no,directories=no';eval("bitdefender"+pageName+" = window.open('"+url+"','"+pageName+"','"+parameters+"')");if(eval("bitdefender"+pageName)&&window.focus)eval("bitdefender"+pageName).focus();};General.CheckSearchForm=function(form){var query=form.elements["query"].value;if(query.length<3){alert("Search Query is too short.");return false;};if(query=="enter query here ..."){alert("Please enter your search query.");return false;};return true;};General.GetCookie=function(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length)))return null;if(start==-1)return null;var end=document.cookie.indexOf(";",len);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(len,end));};General.SetCookie=function(name,value,expires2,path,domain){var expires=new Date();expires.setTime(expires.getTime()+24*60*60*90*1000);document.cookie=name+"="+escape(value)+"; expires=0"+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"");};General.DeleteCookie=function(name,path,domain){if(General.GetCookie(name))document.cookie=name+"="+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-70 00:00:01 GMT";};General.str_replace=function(search,replace,subject){var temp=subject.split(search);return temp.join(replace);};General.setReferenceID=function(buttonID){var referenceID=General.GetCookie("referenceID");var buyOnlineLink=document.getElementById(buttonID);if(!buyOnlineLink.href.match('digitalriver'))return false;if(buyOnlineLink.href.match('referenceID'))return false;if(referenceID==null||referenceID.length!=32)return false;var lastChar=buyOnlineLink.href.substring(buyOnlineLink.href.length-1,buyOnlineLink.href.length);if(lastChar!="/")buyOnlineLink.href=buyOnlineLink.href+"/";buyOnlineLink.href=buyOnlineLink.href+"referenceID."+referenceID;return true;};function popUpPage(url,parameters,name){var day=new Date();var pageName=name?name:day.getTime();eval("bitdefender"+pageName+" = window.open('"+url+"','"+pageName+"','"+parameters+"')");if(eval("bitdefender"+pageName)&&window.focus)eval("bitdefender"+pageName).focus();};function formCheckAdminModifyAccount(form){var status=form.elements["nfo[user_status]"].value;var status_actual=form.elements["nfo[user_status_actual]"].value;var message=form.elements["nfo[user_message]"].value;if(status!=status_actual&&message==""){alert("Please write a message to user.");return false;};return true;};function SwitchMenu(obj){if(document.getElementById){var el=document.getElementById(obj);var ar=document.getElementById("cont").getElementsByTagName("DIV");if(el.style.display=="none"){for(var i=0;i<ar.length;i++){ar[i].style.display="none";};el.style.display="block";}else {el.style.display="none";};};};function ShowDate(){this_month=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var today=new Date();var day=today.getDate();var month=today.getMonth();var year=today.getYear();if(year<1900){year+=1900;};return(this_month[month]+" "+day+", "+year);};function ShowDateRo(){this_month=new Array("Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie");var today=new Date();var day=today.getDate();var month=today.getMonth();var year=today.getYear();if(year<1900){year+=1900;};return(day+" "+this_month[month]+" "+year);};var countrySelect_URLs=new Array();countrySelect_URLs[0]="http://www1.bitdefender.com/site/";countrySelect_URLs[1]="http://www1.bitdefender.fr/site/";countrySelect_URLs[2]="http://www1.bitdefender.de/site/";countrySelect_URLs[3]="http://www1.bitdefender.ro/site/";countrySelect_URLs[4]="http://www1.bitdefender.es/site/";countrySelect_URLs[5]="http://www1.bitdefender.com/en/";function jumpToURL(formName,menuName){var obj=document.getElementById("countrySelect");var index=obj.selectedIndex;var url=eval(menuName+"_URLs["+index+"]")+formName;document.title=url;location.href=url;};function setCookie(name,value,expires2,path,domain){var expires=new Date();expires.setTime(expires.getTime()+24*60*60*90*1000);document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"");};General.getSEOInfo=function(form,BASE_URI,title_id,description_id){var fromTitle=document.getElementById(title_id);var fromDescription=document.getElementById(description_id);var fromContent=document.getElementById('content');var fromKeywords=General.getKeywords(fromContent.value+fromTitle.value+fromDescription.value);var title=document.getElementById("seo_title");var description=document.getElementById("seo_description");var keywords=document.getElementById("seo_keywords");title.value=fromTitle.value;description.value=fromDescription.value;keywords.value=fromKeywords;return true;};General.getKeywords=function(text){text=text.replace(/;/g,' ');text=text.replace(/:/g,' ');text=text.replace(/\./g,' ');text=text.replace(/-/g,' ');text=text.replace(/\,/g,' ');text=text.replace(/\?/g,' ');var keyword_array=text.split(" ");var new_arr=new Array();var keywords_string="";var i=0;var counter=1;var element="";var next_element="";var common_words_string=common_words.join("--");for(n=0;n<keyword_array.length;n++){element=keyword_array[n];if(element.match(/^[a-zA-Z_\-0-9]{3,}$/)&&(common_words_string.lastIndexOf(element.toLowerCase())==-1)){if(n!=keyword_array.length)next_element=keyword_array[n+1];else next_element="zzzzzzzzzzzzzz";if(next_element!=element){new_arr[i]=new Array();new_arr[i][1]=element;new_arr[i][2]=counter;element=keyword_array[n+1];i++;counter=1;}else {if(counter<50)counter++;};}else element=keyword_array[n+1];};for(i=0;i<new_arr.length;i++){var temp=new_arr[i];if(temp[2]>=3||1==1){keywords_string=keywords_string+temp[1]+",";};};if(keywords_string.length>3){keywords_string=keywords_string.slice(0,keywords_string.length-1);};return keywords_string;};function EnableStates(value){if(value==2){document.getElementById('state_sel').style.display='block';document.getElementById('state_sel1').style.display='block';document.getElementById('city').style.display='block';document.getElementById('city_mall').style.display='block';}else{document.getElementById('state_sel').style.display='none';document.getElementById('state_sel1').style.display='none';document.getElementById('city').style.display='none';document.getElementById('city_mall').style.display='none';};};General.getXMLHttpRequestObject=function(){var xmlobj;if(xmlobj!=null&&xmlobj.readyState!=0&&xmlobj.readyState!=4){xmlobj.abort();};try{xmlobj=new XMLHttpRequest();}catch(e){try{xmlobj=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){xmlobj=null;return false;};};return xmlobj;};General.getUrlVars=function(){var vars=[],hash;var hashes=window.location.href.slice(window.location.href.indexOf('?')+1).split('&');for(var i=0;i<hashes.length;i++){hash=hashes[i].split('=');vars.push(hash[0]);vars[hash[0]]=hash[1];};return vars;};function FixedLayerManager(id){this.id=id;this.timeout=null;this.layers=new Array();};FixedLayerManager.prototype.showLayers=function(){for(i=0;i<this.layers.length;i++)this.layers[i].domLayer.style.visibility='visible';};FixedLayerManager.prototype.hideLayers=function(){if(this.timeout!=null){clearTimeout(this.timeout);this.timeout=null;};for(i=0;i<this.layers.length;i++)this.layers[i].domLayer.style.visibility='hidden';};FixedLayerManager.prototype.repositionLayers=function(){for(i=0;i<this.layers.length;i++){this.layers[i].domLayer.style.top=this.layers[i].originalTop +document.body.scrollTop;this.layers[i].domLayer.style.left=this.layers[i].originalLeft +document.body.scrollLeft;};};FixedLayerManager.prototype.addLayers=function(){if(arguments.length==0)return;var args=(arguments[0]instanceof Array)?arguments[0]:arguments;for(var i=0;i<args.length;i++){var domLayer=(typeof(args[i])=='object')?args[i]:document.getElementById(args[i]);if(domLayer==null){throw('ERROR: Argument #'+i+' ('+args[i]+') in call to '+this.id+'.addLayers('+args.join(', ')+') is not an object or valid element ID.');};var layer=new Array();layer['domLayer']=domLayer;layer['originalTop']=domLayer.offsetTop;layer['originalLeft']=domLayer.offsetLeft;this.layers.push(layer);};};FixedLayerManager.prototype.init=function(){if(navigator.userAgent.match(/msie/i)==null)return false;window.onscroll=new Function(this.id+'.onScrollHandler();');this.addLayers.apply(this,arguments);return true;};FixedLayerManager.prototype.onScrollHandler=function(){if(this.timeout==null)this.hideLayers();else {clearTimeout(this.timeout);this.timeout=null;};this.repositionLayers();this.timeout=setTimeout(this.id+'.showLayers();'+this.id +'.timeout = null;',this.ONSCROLL_HANDLER_DELAY);};FixedLayerManager.prototype.ONSCROLL_HANDLER_DELAY=200;function ShowHideSubMenu(target,action){if(document.getElementById(target)==undefined)return false;if(action=='off'&&document.getElementById(target).style.display=='block'){document.getElementById(target).style.display='none'};if(action=='on'&&document.getElementById(target).style.display=='none'){document.getElementById(target).style.display='block'};};function FlashDetect(){if(typeof sIFR=="function"){return true;}else{return false;};};function DoDetect(){if(FlashDetect()==true){var count=0;var location=window.location.toString();temp=location.split("/");var filename=temp[temp.length-1];var fnlen=filename.length;highloc=filename.substring(0,fnlen-4);var splitthat=highloc.split("-");if(splitthat[1]!=undefined){highloca="?menuItemDisable0="+splitthat[0]+"&menuItemDisable1="+splitthat[1];}else{highloca="?menuItemDisable0="+splitthat[0];};var flasharea=document.getElementById("flashnavarea");flasharea.innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='800' height='70' id='menu' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='media/flash/xml_nav.swf"+highloca+"' /><param name='quality' value='high' /><param name='bgcolor' value='#FFFFFF' /><embed src='media/flash/xml_nav.swf"+highloca+"' quality='high' bgcolor='#FFFFFF' width='800' height='70' name='menu' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";if(document.getElementById("interaction")){var interaction=document.getElementById("interaction");interaction.innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='570' height='247' id='menu' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='media/flash/mantle.swf' /><param name='quality' value='high' /><param name='bgcolor' value='#FFFFFF' /><embed src='media/flash/mantle.swf' quality='high' bgcolor='#FFFFFF' width='570' height='247' name='menu' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";};};};image1=new Image();image1.src="/images/new_design/bd-global-nav-left-on.gif";image2=new Image();image2.src="/images/new_design/bd-global-nav-right-on.gif";function SwitchCap(side,state){var switchto=document.getElementById(side+"capima");if(state=="on"){if(side=="left"){switchto.src="/images/new_design/bd-global-nav-left-on.gif";};if(side=="right"){switchto.src="/images/new_design/bd-global-nav-right-on.gif";};}else{if(side=="left"){switchto.src="/images/new_design/bd-global-nav-left.gif";};if(side=="right"){switchto.src="/images/new_design/bd-global-nav-right.gif";};};};if(document.images){pic1=new Image();pic1.src="/images/new_design/bd-global-nav-mid-hover.gif";pic2=new Image();pic2.src="/images/new_design/bd-global-nav-left-on.gif";pic3=new Image();pic3.src="/images/new_design/bd-global-nav-right-on.gif";};var css_browser_selector=function(){var ua=navigator.userAgent.toLowerCase();var is=function(t){return ua.indexOf(t)!=-1;};var h=document.getElementsByTagName('html')[0];var b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'';var os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js';if(longwords==1){var c=b+os+' js'+' longwords';};h.className+=h.className?' '+c:c;}();var languages=new Array();var languagesURLs=new Array();languages['latin']="Am&#233;rica Latina - Espa&#241;ol";languages['au']="Australia - English";languages['br']="Brasil - Portugu&#234;s";languages['de']="Deutschland - Deutsch";languages['es']="Espa&#241;a- Espa&#241;ol";languages['fr']="France - Fran&#231;ais";languages['it']="Italy - Italian";languages['nl']="Nederland - Nederlands";languages['ro']="Rom&acirc;nia - Rom&acirc;n&atilde;";languages['se']="Sweden - Svensk";languages['en']="United States - English";languages['uk']="United Kingdom - English";languages['world']="WorldWide - English";languagesURLs['latin']="http://www.bitdefender.com/latin/";languagesURLs['au']="http://www.bitdefender.com.au/";languagesURLs['br']="http://www.bitdefender.com/br/";languagesURLs['de']="http://www.bitdefender.de/";languagesURLs['es']="http://www.bitdefender.es/";languagesURLs['fr']="http://www.bitdefender.fr/";languagesURLs['it']="http://www.bitdefender.it/";languagesURLs['ro']="http://www.bitdefender.ro/";languagesURLs['nl']="http://www.bitdefender.com/nl/";languagesURLs['en']="http://www.bitdefender.com/";languagesURLs['uk']="http://www.bitdefender.co.uk";languagesURLs['se']="http://www.bitdefender.se/";var planguages=new Array();var planguagesURLs=new Array();planguages['cn']="China - &#20013;&#25991;";planguages['hr']="Croatia - Hrvatski";planguages['jp']="Japan - &#26085;&#26412;&#35486;";planguages['nz']="New Zealand - English";planguages['sg']="Singapore - English";planguages['si']="Slovenija - Sloven&#353;&#269;ina";planguages['za']="South Africa - English";planguages['tw']="Taiwan - Traditional Chinese";planguagesURLs['hr']="http://www.bitdefender.hr/";planguagesURLs['nz']="http://www.bitdefender.co.nz/";planguagesURLs['sg']="http://www.bitdefender-asia.com/";planguagesURLs['si']="http://www.bitdefender.si/";planguagesURLs['za']="http://www.bitdefender.co.za/";planguagesURLs['tw']="http://www.bitdefender.com.tw/";planguagesURLs['cn']="http://bit361.com/";planguagesURLs['jp']="http://www.bitdefender.jp/";function jumpCountryToURL(form,document){var country_id=document.getElementById('country_id').value;if(languagesURLs[country_id]==undefined){if(planguagesURLs[country_id]==undefined)window.location.href="http://www.bitdefender.com/world/";else window.location.href=planguagesURLs[country_id];}else window.location.href=languagesURLs[country_id];};function showCountries(){document.write('<img src="/images/flags/'+multilang_js['DEFAULT_LANGUAGE']+'.gif" width="18" height="12" valign="absmiddle">&nbsp;');document.write('<select id="country_id" class="input_edit" style="display:inline" name="country_id" onChange="jumpCountryToURL(this,document);">');for(var i in languages){document.write('<option value="'+i+'"');if(i==multilang_js['DEFAULT_LANGUAGE']){document.write(' SELECTED ');};document.write('>'+languages[i]+'</option>');};document.write('<option value="us"> ------------------------------------ </option>');document.write('<option value="us"> - Partners Websites - </option>');document.write('<option value="us"> ------------------------------------ </option>');for(var j in planguages){document.write('<option value="'+j+'">'+planguages[j]+'</option>');};document.write('</select>');};function Partnership(){};Partnership.checkAddPartnerForm=function(form){var partnerName=form.elements['nfo[partner_name]'];var tel=form.elements['nfo[phone]'];var fax=form.elements['nfo[fax]'];var email=form.elements['nfo[email]'];var webaddress=form.elements['nfo[webaddress]'];var address=form.elements['nfo[address]'];var countryId=form.elements['nfo[country_id]'];var countryName=form.elements['nfo[country_name]'];if(countryId.value==4){var zipcode=form.elements['nfo[zipcode]'];if(zipcode.value==''){alert('Please fill in the zipcode');zipcode.focus();return false;};};if(partnerName.value==''){alert('Please fill in a partner name');partnerName.focus();return false;};if(tel.value==''){alert('Please fill in a telephone number');tel.focus();return false;};if(!General.isEmail(email.value)){alert('Please fill in a valid email');email.focus();return false;};if(address.value==''){alert('Please fill in a web address');address.focus();return false;};if(countryId.value==0){alert("Please choose a country");countryId.focus();return false;};return true;};Partnership.checkModifyPartnerForm=function(form){var partnerName=form.elements['nfo[partner_name]'];var tel=form.elements['nfo[tel]'];var fax=form.elements['nfo[fax]'];var email=form.elements['nfo[email]'];var webaddress=form.elements['nfo[webaddresses]'];var address=form.elements['nfo[address]'];var countryId=form.elements['nfo[country_id]'];var countryName=form.elements['nfo[country_name]'];if(partnerName.value==''){alert('Please fill in a partner name');partnerName.focus();return false;};if(tel.value==''){alert('Please fill in a telephone number');tel.focus();return false;};if(!General.isEmail(email.value)){alert('Please fill in a valid email');email.focus();return false;};if(address.value==''){alert('Please fill in a web address');address.focus();return false;};if(countryId.value==0&&countryName.value==''){alert("Please choose a country or fill in one");countryId.focus();return false;};return true;};Partnership.checkApplyForm=function(form){var companyName=form.elements['nfo[company_name]'];if(companyName.value==''){alert('Please fill in a company name');companyName.focus();return false;};var address=form.elements['nfo[address]'];if(address.value==''){alert('Please fill in an address');address.focus();return false;};var email=form.elements['nfo[email]'];if(!General.isEmail(email.value)){alert('Please please fill in a valid email');email.focus();return false;};var phone1=form.elements['nfo[phone1]'];if(phone1.value==''){alert('Please fill in a telephone number');phone1.focus();return false;};var town=form.elements['nfo[town]'];if(town.value==''){alert('Please fill in your town');town.focus();return false;};var countryId=form.elements['nfo[country_id]'];if(countryId.value==0){alert('Please choose your contry');countryId.focus();return false;};var countryName=form.elements['nfo[country_name]'];if(countryId.value==1000&&countryName.value==''){alert('Please fill in country name');countryName.focus();return false;};var fName=form.elements['nfo[first_name]'];if(fName.value==''){alert('Please fill in your first name');fName.focus();return false;};var lName=form.elements['nfo[last_name]'];if(lName.value==''){alert('Please fill in your last name');lName.focus();return false;};var primaryFunction=form.elements['nfo[primary_function]'];if(primaryFunction.value==''){alert('Please fill in your primary function');primaryFunction.focus();return false;};var yearFounded=form.elements['nfo[founded_year]'];if(yearFounded.value==0){alert('Please choose the founded year');yearFounded.focus();return false;};var empNo=form.elements['nfo[nr_emp]'];if(empNo.value==0){alert('Please fill choose the number of employees');empNo.focus();return false;};var coRev=form.elements['nfo[co_rev_last_year]'];if(coRev.value==0){alert('Please fill choose your last year revenue');coRev.focus();return false;};var sTer=form.elements['nfo[sales_ter]'];if(sTer.value==''){alert('Please fill choose your sales territory');sTer.focus();return false;};var dist=form.elements['nfo[distribute]'];if(dist.value==0){alert('Please state if  your company currently distributes security software');dist.focus();return false;};var exp=form.elements['nfo[experience]'];if(exp.value==0){alert('Please state if  your company has experience providing Tehnical Support');exp.focus();return false;};products=form.elements['nfo[products][]'];var checked=false;for(i=0;i<products.length;i++){if(products[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a product you want to distribute');products[0].focus();return false;};cert=form.elements['nfo[certification][]'];var checked=false;for(i=0;i<cert.length;i++){if(cert[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a certification');cert[0].focus();return false;};sm=form.elements['nfo[sales_model][]'];var checked=false;for(i=0;i<sm.length;i++){if(sm[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a sales model');sm[0].focus();return false;};ms=form.elements['nfo[market_segment][]'];var checked=false;for(i=0;i<ms.length;i++){if(ms[i].checked==true)checked=true;};if(!checked){alert('Please choose at least one market segment');ms[0].focus();return false;};pl=form.elements['nfo[platform][]'];var checked=false;for(i=0;i<pl.length;i++){if(pl[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a platform');pl[0].focus();return false;};pb=form.elements['nfo[promote_mode][]'];var checked=false;for(i=0;i<pb.length;i++){if(pb[i].checked==true)checked=true;};if(!checked){alert('Please choose at least one way your promote your business');pb[0].focus();return false;};var wants=form.elements['nfo[wants]'];if(wants.value==''){alert('Please state why do you want to distribute BitDefender products');wants.focus();return false;};};Partnership.showCountriesSelect=function(form,document,countries){var area_id=document.getElementById('area').value;var i=0;var countriesDiv=document.getElementById('country_div');var selectCountries="";if(area_id==0)countriesDiv.innerHTML="<div id=\"country_div\"><select name=\"country\" id=\"country\" disabled><option>- Choose country -</option></select></div>";else {selectCountries="<div id=\"country_div\"><select name=\"country\" id=\"country\"><option value=\"0\">- Choose Country -</option> ";for(i in countries[area_id]){selectCountries=selectCountries+"<option value=\""+i+"\">"+countries[area_id][i]+"</option> ";};selectCountries=selectCountries+"</select></div>";countriesDiv.innerHTML=selectCountries;};};Partnership.checkApplyNowForm=function(form){var companyName=form.elements['nfo[company_name]'];if(companyName.value==''){alert('Please fill in a company name');companyName.focus();return false;};var email=form.elements['nfo[email]'];if(!General.isEmail(email.value)){alert('Please please fill in a valid email');email.focus();return false;};var phone=form.elements['nfo[contact_phone]'];if(phone.value==''){alert('Please fill in your phone number');phone.focus();return false;};var countryId=form.elements['nfo[country_id]'];if(countryId.value==0){alert('Please choose your contry');countryId.focus();return false;};var fName=form.elements['nfo[first_name]'];if(fName.value==''){alert('Please fill in your first name');fName.focus();return false;};var lName=form.elements['nfo[last_name]'];if(lName.value==''){alert('Please fill in your last name');lName.focus();return false;};var sTer=form.elements['nfo[sales_ter]'];if(sTer.value==''){alert('Please fill choose your sales territory');sTer.focus();return false;};var dist=form.elements['nfo[distribute]'];if(dist.value==0){alert('Please state if  your company currently distributes security software');dist.focus();return false;};var exp=form.elements['nfo[experience]'];if(exp.value==0){alert('Please state if  your company has experience providing Tehnical Support');exp.focus();return false;};products=form.elements['nfo[products][]'];var checked=false;for(i=0;i<products.length;i++){if(products[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a product you want to distribute');products[0].focus();return false;};cert=form.elements['nfo[certification][]'];var checked=false;for(i=0;i<cert.length;i++){if(cert[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a certification');cert[0].focus();return false;};sm=form.elements['nfo[sales_model][]'];var checked=false;for(i=0;i<sm.length;i++){if(sm[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a sales model');sm[0].focus();return false;};ms=form.elements['nfo[market_segment][]'];var checked=false;for(i=0;i<ms.length;i++){if(ms[i].checked==true)checked=true;};if(!checked){alert('Please choose at least one market segment');ms[0].focus();return false;};pl=form.elements['nfo[platform][]'];var checked=false;for(i=0;i<pl.length;i++){if(pl[i].checked==true)checked=true;};if(!checked){alert('Please choose at least a platform');pl[0].focus();return false;};pb=form.elements['nfo[promote_mode][]'];var checked=false;for(i=0;i<pb.length;i++){if(pb[i].checked==true)checked=true;};if(!checked){alert('Please choose at least one way your promote your business');pb[0].focus();return false;};var wants=form.elements['nfo[wants]'];if(wants.value==''){alert('Please state why do you want to distribute BitDefender products');wants.focus();return false;};var agree=form.elements['accept_agreement'];if(!agree.checked){alert('You must agree with our NONDISCLOSURE AGREEMENT');agree.focus();return false;};};Partnership.setArea=function(areaID){var id=0;id=Math.round(areaID)+Math.round(1);document.getElementById('judet').selectedIndex=id;};Partnership.setAllAreas=function(checkbox){document.getElementById('judet').disabled=checkbox.checked;};Partnership.setAllTypes=function(checkbox){document.getElementById('tipuri').disabled=checkbox.checked;};Partnership.setAllSkills=function(checkbox){document.getElementById('competente').disabled=checkbox.checked;};Partnership.getResellerBuyLink=function(){var quantities=document.getElementsByName("quantities");var link="https://secure.avangate.com/order/checkout.php?CART=1&CURR=USD&LANG=EN";var nothingSelected=true;var prodsPart="&PRODS=";var qtyPart="&QTY=";var couponPart="&COUPON=";var srcPart="&SRC=";var selected=new Array;for(var i=0;i<quantities.length;i++){if(quantities[i].value>0){nothingSelected=false;selected[quantities[i].id]=quantities[i].value;};};if(nothingSelected){alert("You haven't selected to buy anything");return false;};len=1;for(i in selected){prodsPart=prodsPart+i+",";qtyPart=qtyPart+selected[i]+",";};try {prodsPart=prodsPart.substring(0,prodsPart.length-1);qtyPart=qtyPart.substring(0,qtyPart.length-1);}catch(ex){};couponPart=couponPart+coupon;srcPart=srcPart+src;link=link+prodsPart+qtyPart+couponPart+srcPart;window.location=link;};Partnership.getTotal=function(){var quantities=document.getElementsByName("quantities");var id_total=document.getElementById("d_total");var io_total=document.getElementById("o_total");var is_total=document.getElementById("s_total");var roundLength=2;var pow=Math.pow(10,roundLength);var d_total=0;var o_total=0;var s_total=0;for(var i=0;i<quantities.length;i++){if(quantities[i].value>0){o_total+=o_prices[quantities[i].id]*parseInt(quantities[i].value);part_discount=d_prices[quantities[i].id];round_discount=Math.round(part_discount*pow)/pow;all_discount=round_discount*parseInt(quantities[i].value);round_all_discount=Math.round(all_discount*pow)/pow;s_total+=all_discount;};};d_total=o_total-s_total;d_total=Math.round(d_total*pow)/pow;o_total=Math.round(o_total*pow)/pow;s_total=Math.round(s_total*pow)/pow;id_total.innerHTML="$ "+d_total;io_total.innerHTML="$ "+o_total;is_total.innerHTML="You save: $ "+s_total;};function EnableStates(value){if(value=='2'){document.getElementById('state_row').style.display='block';}else {document.getElementById('state_row').style.display='none';};};