var strLogicalPathJs="http://business.maktoob.com/";function GetXmlHttp(){var b=false;if(window.XMLHttpRequest){b=new XMLHttpRequest();}else{if(window.ActiveXObject){try{b=new ActiveXObject("Msxml2.XMLHTTP");}catch(f){try{b=new ActiveXObject("Microsoft.XMLHTTP");}catch(c){b=false;}}}}return b;}function AJAXGet(b,g,f,e){var c=new GetXmlHttp();if(c){c.onreadystatechange=function(){if(c&&c.readyState==4){if(c.status==200){if(g!=null){g(c.responseText);}}}};if(String(f).toLowerCase()=="post"){c.open("POST",b,true);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.setRequestHeader("Content-length",e.length);c.setRequestHeader("Connection","close");c.send(e);}else{c.open("GET",b,true);c.send(null);}}}function AJAXGetJS(b,h,g,f){var c=document.createElement("script");c.src=b;c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c);c.onreadystatechange=function(){if(this.readyState=="loaded"){testosama33(h);}};}function testosama33(b){if(strResult14!="undefined"){b(strResult14);}}var channel_ID="987";var zflag_nid="1051";var zflag_cid="66";var zflag_sid="0";var zflag_width="1";var zflag_height="1";var zflag_sz="15";var documentURL=document.URL;if(documentURL){if(documentURL.indexOf("#")){documentURL=documentURL.replace("#","%23");}}OAS_url="http://oas.maktoob.com/RealMedia/ads/";OAS_query="?";var OAS_sitepage="";if(typeof(temp_OAS_sitepage)=="undefined"||temp_OAS_sitepage==""){OAS_sitepage="maktoob.com/business/english";}else{OAS_sitepage="maktoob.com/business/english/"+temp_OAS_sitepage;}var d=document;var OAS_rdl="";var OAS_CA="N";var OAS_taxonomy="";if(typeof(temp_OAS_sitepage)=="undefined"||temp_OAS_sitepage==""){OAS_taxonomy="&channel=business&sub_channel=business/english&if_nt_ua="+navigator.userAgent+"&if_nt_murl="+documentURL;}else{OAS_taxonomy="&channel=business&sub_channel=business/english/"+temp_OAS_sitepage+"&if_nt_ua="+navigator.userAgent+"&if_nt_murl="+documentURL;}if((d.referrer)&&(d.referrer!="[unknown origin]")){if(d.referrer.indexOf("?")==-1){OAS_rdl+="&tax23_RefDocLoc="+d.referrer.toString();}else{var rdl=d.referrer;var rdl1=rdl.indexOf("?");var rdl2=rdl.substring(0,rdl1);OAS_rdl+="&tax23_RefDocLoc="+rdl2;}}function cookie_check(c,b){var f=b.indexOf(c);if(f==-1){return"";}f+=c.length;var g=b.indexOf(";",f);if(g==-1){g=b.length;}return b.substring(f,g);}function write_cookie(){var e=new Date();var b=e.getTime();document.cookie="OAS_SC1="+b.toString()+";path=/;";var c=cookie_check("OAS_SC1=",document.cookie);if(c!=b.toString()){return false;}e.setTime(b+3600000);return true;}if(write_cookie()){OAS_CA="Y";}OAS_query+="XE"+OAS_taxonomy+OAS_rdl+"&if_nt_CookieAccept="+OAS_CA+"&XE";OAS_version=10;OAS_rn="001234567890";OAS_rns="1234567890";OAS_rn=new String(Math.random());OAS_rns=OAS_rn.substring(2,11);function OAS_NORMAL(b){document.write('<A HREF="'+OAS_url+"click_nx.ads/"+OAS_sitepage+"/1"+OAS_rns+"@"+OAS_listpos+"!"+b+OAS_query+'" TARGET=_top>');document.write('<IMG SRC="'+OAS_url+"adstream_nx.ads/"+OAS_sitepage+"/1"+OAS_rns+"@"+OAS_listpos+"!"+b+OAS_query+'" BORDER=0 ALT="Click!"></A>');}OAS_version=11;if(navigator.userAgent.indexOf("Mozilla/3")!=-1){OAS_version=10;}if(OAS_version>=11){document.write('<SCRIPT LANGUAGE=JavaScript1.1 SRC="'+OAS_url+"adstream_mjx.ads/"+OAS_sitepage+"/1"+OAS_rns+"@"+OAS_listpos+OAS_query+'"></SCRIPT>');}document.write("");function OAS_AD(b){if(OAS_version>=11&&typeof(OAS_RICH)!="undefined"){OAS_RICH(b);}else{OAS_NORMAL(b);}}String.prototype.trim=function(){a=this.replace(/^\s+/,"");return a.replace(/\s+$/,"");};function $$(b){return document.getElementById(b);}var map;var geocoder;function initialize(){map=new GMap2(document.getElementById("map_canvas"));geocoder=new GClientGeocoder();}function addAddressToMap(b){if(!b||b.Status.code!=200){alert("Sorry, we were unable to geocode that address");}else{place=b.Placemark[0];point=new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());map.setCenter(point,parseInt(_GZoom),G_NORMAL_MAP);map.getContainer().style.overflow="hidden";}}var _GZoom=5;function showLocation(b){if(geocoder==null){initialize();}geocoder.getLocations(b,addAddressToMap);}function findLocation(c,b){showLocation(c);_GZoom=b;}var tem_Count_Ticker=0;var theCurrentLength=0;var StoryURL="#";var lblStory="";function RunTicker(c,b){lblStory=c;if(b!=null){StoryURL=b;}PrintChar();}function PrintChar(){if(theSummaries[tem_Count_Ticker].length==theCurrentLength){theCurrentLength=0;tem_Count_Ticker+=1;if(tem_Count_Ticker==theSummaries.length){tem_Count_Ticker=0;}setTimeout("PrintChar()",10000);$$(lblStory).innerHTML=$$(lblStory).innerHTML.substring(0,$$(lblStory).innerHTML.length-2);}else{$$(lblStory).innerHTML="<a href='"+StoryURL.replace("[ID]",theSiteLinks[tem_Count_Ticker]).replace("[HeadLine]",GetFriendlyURL(theSummaries[tem_Count_Ticker]))+"'>"+theSummaries[tem_Count_Ticker].substring(0,theCurrentLength+1)+"</a>_";theCurrentLength+=1;setTimeout("PrintChar()",150);}}var photoStoryCount=1;function BackPhoto(){if(photoStoryCount==null){photoStoryCount=1;}if(photoStoryCount>1){if($$("PhotoStory"+(parseInt(photoStoryCount)-1))!=null){photoStoryCount--;$$("PhotoStory"+photoStoryCount).onclick();}}return false;}function NextPhoto(){if(photoStoryCount==null){photoStoryCount=1;}if(photoStoryCount<10){if($$("PhotoStory"+(parseInt(photoStoryCount)+1))!=null){photoStoryCount++;$$("PhotoStory"+photoStoryCount).onclick();}}return false;}function RunPhotoStory(){if(photoStoryCount==10){photoStoryCount=1;}NextPhoto();setTimeout("RunPhotoStory()",15000);}function FillPhotoStory(b,l,o,m,h,e,p,k,j,c,n){photoStoryCount=p;if($$(b)!=null){$$(b).innerHTML=o;}if($$(l)!=null){$$(l).innerHTML=m;}if($$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img")!=null){$$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img").src=e.replace("[ID]",h);$$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img").title=n;$$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img").alt=n;}var g="javascript:openpopup('"+j+"Pages/Media/GalleryPopUp.aspx?GalleryID="+c+"&ImageID="+h+"', '980', '700','"+c+"');";var f=k+"1";if($$(f)!=null){$$(f).href=g;$$(f).title=n;}f=k+"2";if($$(f)!=null){$$(f).href=g;$$(f).title=o;}return false;}var vidoeStoryCount=1;function BackVidoe(){if(vidoeStoryCount==null){vidoeStoryCount=1;}if(vidoeStoryCount>1){if($$("VideoStory"+(parseInt(vidoeStoryCount)-1))!=null){vidoeStoryCount--;$$("VideoStory"+vidoeStoryCount).onclick();}}return false;}function NextVidoe(){if(vidoeStoryCount==null){vidoeStoryCount=1;}if(vidoeStoryCount<13){if($$("VideoStory"+(parseInt(vidoeStoryCount)+1))!=null){vidoeStoryCount++;$$("VideoStory"+vidoeStoryCount).onclick();}}return false;}function RunVideoStory(){if(vidoeStoryCount==13){vidoeStoryCount=1;}NextVidoe();setTimeout("RunVideoStory()",15000);}function FillVideoStoryLink(b,j,m,k,g,c,n,h,f,l){vidoeStoryCount=n;if($$(b)!=null){$$(b).innerHTML=m;}if($$(j)!=null){$$(j).innerHTML=k;}if($$("ctl00_CPH1_VideoStory1_Friendly_Images1_img")!=null){$$("ctl00_CPH1_VideoStory1_Friendly_Images1_img").src=c.replace("[ID]",g);$$("ctl00_CPH1_VideoStory1_Friendly_Images1_img").title=l;$$("ctl00_CPH1_VideoStory1_Friendly_Images1_img").alt=l;}var e=h+"1";if($$(e)!=null){$$(e).href=f;$$(e).title=l;}e=h+"2";if($$(e)!=null){$$(e).href=f;$$(e).title=m;}return false;}function ChangeTabs(f,b,e,g,c){for(i=1;i<=g;i++){$$(b+i).className="";$$(b+i).style.display="none";$$(c+i).src="Style/images/sepnav.gif";$$(c+i).className="";if(g==i){$$(f+i).className="";}else{$$(f+i).className="brdleft";}}$$(b+e).style.display="block";$$(b+e).className="pad8";if(g==i){$$(f+e).className="selct";}else{$$(f+e).className="selct brdleft";}$$(c+e).src="Style/images/sepnav2.gif";$$(c+e).className="padt2 padr2";return;}function ChangeNewsInNumbersTabs(f,b,e,g,c){for(i=1;i<=g;i++){$$(c+i).src="Style/images/sepnav.gif";$$(c+i).className="";if(g==i){$$(f+i).className="";}else{$$(f+i).className="brdleft";}}if(g==(i-1)){$$(f+e).className="selct";}else{$$(f+e).className="selct brdleft";}$$(c+e).src="Style/images/sepnav2.gif";$$(c+e).className="padt2 padr2";$$("divPeople").style.display="none";$$("divPeople").className="";$$("divSectors").style.display="none";$$("divSectors").className="";$$("divCompanies").style.display="none";$$("divCompanies").className="";$$("divTags").style.display="none";$$("divTags").className="";$$("divCountries").style.display="none";$$("divCountries").className="";$$("divTeams").style.display="none";$$("divTeams").className="";switch(b){case"divPeople":$$(b).style.display="block";$$(b).className="pad8";break;case"divSectors":$$(b).style.display="block";$$(b).className="pad8";break;case"divSports":$$("divSectors").style.display="block";$$("divSectors").className="pad8";break;case"divCompanies":$$(b).style.display="block";$$(b).className="pad8";break;case"divTags":$$(b).style.display="block";$$(b).className="pad8";break;case"divCountries":$$(b).style.display="block";$$(b).className="pad8";break;case"divTeams":$$(b).style.display="block";$$(b).className="pad8";break;}return;}function JobSearch(b,c){window.open(c+"?q="+$$(b).value);}var PublicDivPoll,PublicDivResult,divPercentageView;function SetVote(j,c,e,g){var h=Math.random()*11;var b="";for(var f=0;f<document.getElementsByName("voteRadios").length;f++){if(document.getElementsByName("voteRadios")[f].checked){b=document.getElementsByName("voteRadios")[f].value;}}if(b==""){$$("divError").style.display="block";return;}else{$$("divError").style.display="none";}PublicDivPoll=c;PublicDivResult=e;divPercentageView=g;AJAXGet(strLogicalPathJs+"Pages/General/AjaxHandler.aspx?&random="+h+"&Flag=2&answerID="+b+"&QuestionId="+$$(j).value,callBackFromAjaxSetVote,"get");}function callBackFromAjaxSetVote(b){var j=b.substring(b.indexOf('<div id="parent">'),b.length);var g=j.substring(17,j.indexOf("</div>"));if(g!=""){$$(PublicDivPoll).style.display="none";$$("btnVote").style.display="none";$$(PublicDivResult).style.display="block";var m=g.split("~|~");var o;var c=0;var e=0;for(var k=0;k<m.length-1;k++){o=m[k].split("~!~");c=c+parseInt(o[1]);if(parseInt(o[1])>e){e=parseInt(o[1]);}}var n;$$(divPercentageView).innerHTML="";for(var p=0;p<m.length-1;p++){n=m[p].split("~!~");var f;if(parseInt(n[1])==0){f=0;}else{f=(parseInt(n[1])*100)/c;}var l="reblue result1";var h="result3 fnts18 rebluetxt";if(e==parseInt(n[1])){l="rered result1";h="result3 fnts18 reredtxt";}f=Math.ceil(f);if(p==m.length-2){$$(divPercentageView).innerHTML+='<table width="100%" border="0" cellpadding="0" cellspacing="5"><tr><td><div class="padb5"><div class="fnt11 fntv padtb05">'+n[0]+'</div><div><div class="result2 "><div style="width:'+f+'%;" class="'+l+'"></div></div><div class="'+h+'"><strong>'+f+'%</strong></div><div class="clboth"></div></div></div><div class="padt3"></div></td></tr></table>';}else{$$(divPercentageView).innerHTML+='<table width="100%" border="0" cellpadding="0" cellspacing="5"><tr><td><div class="padb5"><div class="fnt11 fntv padtb05">'+n[0]+'</div><div><div class="result2 "><div style="width:'+f+'%;" class="'+l+'"></div></div><div class="'+h+'"><strong>'+f+'%</strong></div><div class="clboth"></div></div></div><div class="padt3"><div class="brdbimgall"></div></div></td></tr></table>';}}}}function checkVoteCookie(c,b){if(GetUserCookieValue("Vote"+$$(c).value)!=null&&GetUserCookieValue("Vote"+$$(c).value)=="1"+$$(c).value){$$("divPoll").style.display="none";$$("divResult").style.display="block";$$("divBtnVote").style.display="none";}else{$$("hrefVote").href='javascript:SetVote("'+c+'","divPoll","divResult","'+b+'");';}$$("divHaveYourSay").style.display="block";}var params=null;function FillAddCommentForm(f){var e=f.substring(f.indexOf('<div id="parent">'),f.length);var c=e.substring(17,e.indexOf("</div>"));var b=c.split("$")[1];c=c.split("$")[0];$$("ctl00_CPH1_ctrMainStoryArticle_imgCode").src=b;if($$("divCommentAddResult")!=null){if(c=="1"){$$("divCommentAddResult").innerHTML="<br /><b class='green'>Thank you for submitting your comment. An editor will review it and publish it shortly.</b><br />";if($$("btnClearAll")!=null){$$("btnClearAll").click();}}else{if(c=="1"){$$("divCommentAddResult").innerHTML="<br /><b class='red'>Failed, Please try later.</b><br />";}else{$$("divCommentAddResult").innerHTML="<br /><b  class='red'>Wrong code, Please try again.</b><br />";}}}$$("imgLoader").style.display="none";}function GetUserAddCommentResults(b){AJAXGet(strLogicalPathJs+"Pages/General/AjaxHandler.aspx?Flag=3",FillAddCommentForm,b,params);}function CollectParams(b){params="StoryID="+b;if($$("tbUserName")!=null){params=params+"&UserName="+sReplaceHTMLSpecialCharacters($$("tbUserName").value);}if($$("tbUserEmail")!=null){params=params+"&UserEmail="+sReplaceHTMLSpecialCharacters($$("tbUserEmail").value);}if($$("tbCity")!=null){params=params+"&City="+sReplaceHTMLSpecialCharacters($$("tbCity").value);}if($$("tbContent")!=null){params=params+"&Content="+sReplaceHTMLAndsCharacter(sReplaceHTMLSpecialCharacters($$("tbContent").value));}if($$("tbCapcha")!=null){params=params+"&CodeValue="+sReplaceHTMLAndsCharacter(sReplaceHTMLSpecialCharacters($$("tbCapcha").value));}}function sReplaceHTMLAndsCharacter(c){var b=new RegExp("[&]","g");c=c.replace(b,"^#38;");return c;}function sReplaceHTMLSpecialCharacters(c){var b=new RegExp("(script)","gi");c=c.replace(b,"");return c;}function SubmitComment(b){$$("imgLoader").style.display="block";CollectParams(b);GetUserAddCommentResults("post");if($$("spCounter")!=null){$$("spCounter").innerHTML=ResetVal;$$("imgLoader").style.display="none";}}function cleanInjection(b){var c=new RegExp("[/!@#$%^&*_+}|(){:?<>'.\"]","g");$$(b).value=$$(b).value.replace(c,"");}function ValidateEmail(b,e){var c=$$(b).value;var g="^[\\w-_.+]*[\\w-_.]@([\\w-_]+\\.)+[\\w]+[\\w]$";var f=new RegExp(g);if(!f.test(c)){$$(b).focus();alert(e);return false;}return true;}function ValidateEmailString(g,c){var b=g;var f="^[\\w-_.+]*[\\w-_.]@([\\w-_]+\\.)+[\\w]+[\\w]$";var e=new RegExp(f);if(!e.test(b)){alert(c);return false;}return true;}function ValidateMultiEmail(b,f){if($$(b).value.trim()==""){alert(f);return false;}else{var c=$$(b).value.split(",");for(var e=0;e<c.length;e++){if(!ValidateEmailString(c[e],f)){return false;}}return true;}}function ValidateTellAfriend(){if($$("txtToEmail").value[$$("txtToEmail").value.length-1]==","){$$("txtToEmail").value=$$("txtToEmail").value.substring(0,$$("txtToEmail").value.length-1);}var c=ValidateMultiEmail("txtToEmail","Enter To email in the correct email format");if(c==false){return false;}var b=validateInput("txtYourName,txtYourEmail,txtMsg,txtCode","Enter your name,Enter your email in the correct email format,Enter the Message,Enter the Code","Enter your name,Enter your Email,,Enter the Code,","true");return(c&&b);}function validateInput(e,c,b,k){var l=new String(e);var f=new String(c);var n=null;if(b!=null){n=new String(b);}for(var h=0;h<l.split(",").length;h++){var g=l.split(",")[h];var m=f.split(",")[h];var j="";if(n!=null){j=n.split(",")[h].trim();}var o=true;switch($$(g).tagName.toLowerCase()){case"select":if($$(g).value==-1){o=false;}break;case"input":case"textarea":if(g.toLowerCase().indexOf("email")>-1){if(!ValidateEmail(g,m)){return false;}}else{if(k==null||!(k)){cleanInjection(g);}}if($$(g).value.trim()==""||$$(g).value.trim().toLowerCase()==j.toLowerCase()){o=false;}break;}if(!o){alert(m);$$(g).focus();return false;}}return true;}function ColorSelected(f,e,g,h,b){for(var c=0;c<=f;c++){if($$(h+"tdRating"+c)!=null){$$(h+"tdRating"+c).className="";}}for(var c=0;c<=e;c++){if($$(h+"tdRating"+c)!=null){$$(h+"tdRating"+c).className=g;}}if(g==""){for(var c=0;c<=b;c++){if($$(h+"tdRating"+c)!=null){$$(h+"tdRating"+c).className="on1";}}}}function FillRatingResult(f,b,e){var g=FillTopRatingResult;var c=strLogicalPathJs+"Pages/General/AjaxHandler2.aspx?random="+guid()+"&SPID=1_2&ObjectID="+ObjectID+"&Rate="+b+"&RatesCount="+RateCount+"&RateResult="+RateSum;if(e){AJAXGet(c+"&Flag=5",FillBoth,"get",null);}else{AJAXGet(c+"&ArtType=1&objID="+ObjectID+"&Flag=4",g,"get",null);}}function FillTopRatingResult(b){if($$("divTopRating")!=null){$$("divTopRating").innerHTML=b.toString().replace(new RegExp("1_2","g"),"1");}FillBottomRatingResult(b);}function FillBottomRatingResult(b){if($$("divBottomRating")!=null){$$("divBottomRating").innerHTML=b.toString().replace(new RegExp("1_2","g"),"2");}}function FillBoth(b){if($$("divTopRating")!=null){$$("divTopRating").innerHTML="";$$("divTopRating").innerHTML=b.toString().replace(new RegExp("1_2","g"),"1");}if($$("divBottomRating")!=null){$$("divBottomRating").innerHTML="";$$("divBottomRating").innerHTML=b.toString().replace(new RegExp("1_2","g"),"2");}}function GoToAnchor(e,b){var c=self.location.href;if(c.indexOf("#")>-1){c=c.split("#")[0];}self.location.href=c+"#"+e;if($$(b)!=null){$$(b).focus();}return false;}function openpopup(j,k,e,f){var g;var c=k;var m=e;var b=(screen.width/2)-(c/2);var l=(screen.height/2)-(m/2);g="height="+m+",width="+c+",left="+b+",top="+l+",toolbar=no,menubar=no,scrollbars=yes";window.open(j,"mywindow",g);if(f!=null){IncreaseUserReadCound(f,"4");}}function hide(e,b,f,c){if($$(e).style.display=="block"||$$(e).style.display==""){$$(e).style.display="none";if(b==2){$$(f).className="menusub";$$(c).src="Style/images/plus.gif";}if(b==1){$$(c).src="Style/images/close.gif";}}else{$$(e).style.display="block";if(b==2){$$(f).className="menusubon";$$(c).src="Style/images/neg.gif";}if(b==1){$$(c).src="Style/images/add.gif";}}}function openDivsChannel(e,c,b,f){$$("div"+f+e).style.display="block";$$("img"+f+e).src="Style/images/add.gif";if(c!=null&&c!=""&&c!="0"){$$("divsec"+f+c).className="menusubon";$$("div"+f+e+c).style.display="block";$$("img"+f+e+c).src="Style/images/neg.gif";if(b!=null&&b!=""&&b!="0"){$$("divsub"+f+e+c+b).className="menusubs2";}}}function openDivsSections(b){$$("divSections").style.display="block";$$("imgSections").src="Style/images/add.gif";if(b!=null&&b!=""&&b!="0"){$$("divMainsectins"+b).className="menusubsl";}}function CalenderLink(e,c){var b=new Date(e);c=c.replace("[Year]",b.getFullYear());c=c.replace("[Month]",b.getMonth()+1);c=c.replace("[Day]",b.getDate());window.parent.location=c;}var CommentRateResultDivID="";var ThumbContainerDivIDUserID="";var RatingCommentID="";function CommentRate(c,g,f,b){CommentRateResultDivID=g;ThumbContainerDivIDUserID=b;RatingCommentID=c;setCookie("CommentThumbRating_"+c,c,1);descDrawRatingThumbs("",RatingCommentID,ThumbContainerDivIDUserID);var e=strLogicalPathJs+"Pages/General/AjaxHandler.aspx?flag=6&CommentID="+c+"&CommentType="+f;AJAXGet(e,GetCommentRatingResult,"get",null);}function GetCommentRatingResult(b){if($$(CommentRateResultDivID)!=null){$$(CommentRateResultDivID).innerHTML=b;}}function NavigatToOldDis(){var b="[KW]";if($$("tbSearch")!=null&&$$("tbSearch").value.trim()!=""){cleanInjection("tbSearch");b=$$("tbSearch").value.trim();}b=escape(b);if($$("ddlFilter")!=null){self.location.href=$$("ddlFilter").value.trim().replace("[KW]",b.trim());}}function SelectSearchFilters(c,b){if(c.trim()!=""&&$$("ddlFilter")!=null){$$("ddlFilter").selectedIndex=c-1;}if(b.trim()!=""&&b.trim().toLowerCase()!="[kw]"&&$$("tbSearch")!=null){$$("tbSearch").value=unescape(b);}}function getkey(b){if(window.event){return window.event.keyCode;}else{if(b){return b.which;}else{return null;}}}function GoToSearch(c,f){var b=$$(f);key=getkey(c);if(key==13){b.onclick();return false;}}var CurrentsCount=0;function DrawMarketTiker(){if($$(divMarketPointsID)!=null){if(CurrentsCount<CountAll){$$(divMarketPointsID).innerHTML="";$$(divMarketPointsID).innerHTML=DrawOneMarketInfo(CurrentsCount);CurrentsCount++;if(CurrentsCount<CountAll){$$(divMarketPointsID).innerHTML=$$(divMarketPointsID).innerHTML+"&nbsp;&nbsp;|&nbsp;&nbsp;"+DrawOneMarketInfo(CurrentsCount);CurrentsCount++;}setTimeout("DrawMarketTiker()",5000);}else{CurrentsCount=0;DrawMarketTiker();}}}function DrawOneMarketInfo(g){if(sArrMarketsNames.length>g&&sArrMarketsClose.length>g&&sArrArrowImages.length>g&&sArrMarketsCahnge.length>g){var b=sInnerDraw.replace("[MRNAME]",sArrMarketsNames[g]);b=b.replace("[MRCLOSE]",sArrMarketsClose[g]);var e="";var f="";if(sArrArrowImages[g].toLowerCase()=="uparrow"){f="Up";e="Style/images/rowup.gif";}else{if(sArrArrowImages[g].toLowerCase()=="downarrow"){f="Down";e="Style/images/rowd.gif";}else{if(sArrArrowImages[g].toLowerCase()=="equalarrow"){f="Stable";e="Style/images/row1.gif";}}}b=b.replace("[IMGSRC]",e);b=b.replace("[IMGTITLE]",f);b=b.replace("[IMGTITLE]",f);var c="";if(sArrMarketsCahnge[g].indexOf("-")==-1){c="&#43;"+sArrMarketsCahnge[g];}else{c=sArrMarketsCahnge[g];}b=b.replace("[MRCHANGPRST]",c);return b;}return"";}function GoToSearchClick(c,f,b,e){if(b.trim()!=""){if(c.trim()!=""&&$$(c)!=null&&e=="KW"){if($$(c).value.trim().toLowerCase()=="keywords"||$$(c).value.trim().toLowerCase()=="enter keyword"||$$(c).value.trim()==""||$$(c).value.trim().toLowerCase()=="enter keywords"||$$(c).value.trim().toLowerCase()=="enter company name"){alert("Please enter a keyword");return false;}else{e=false;b=b.toLowerCase().replace("[kw]",escape($$(c).value.trim()));}}if(f.trim()!=""&&$$(f)!=null&&e=="TN"){if($$(f).value.trim().toLowerCase()=="enter keywords"||$$(f).value.trim().toLowerCase()=="companies, people, teams, tags"||$$(f).value.trim().toLowerCase()=="enter keyword"||$$(f).value.trim()==""){alert("Please enter a key word");return false;}b=b.toLowerCase().replace("[tn]",escape($$(f).value.trim()));}self.location.href=b;}}function LoadTagNameAndKeyWord(b){b=b.replace(/[+]/g," ");b=unescape(b.trim());if(b.trim().toLowerCase()!="[kw]"){$$("tbKeyWord").value=b.trim();}}function GotToNewsLetterPage(e,b){if($$(e).value.trim()==""||$$(e).value.trim()=="Enter your email address"){alert("Please Enter Your Email");return false;}if(!ValidateEmail(e,"Please Enter The Correct Email")){return false;}var c=$$(e).value.trim().replace("@","_at_").replace(".","_dot_");window.parent.location.href=b.replace("email",c);}function PostNewsletterIDs(j,c,f){$$("NewsletterPostResult").innerHTML="<b>Please wait ...</b>";var b="";var k=false;for(var e=0;e<j;e++){if($$("cbSubscribe"+e)!=null&&$$("cbSubscribe"+e).checked){b=b+","+$$("cbSubscribe"+e).name;k=true;}}if(!k){$$("NewsletterPostResult").innerHTML="";alert("You must select at least one newsletter before subscribe");return false;}if($$("SubName").value.trim()==""||$$("SubName").value.trim()=="Enter your Name"){$$("NewsletterPostResult").innerHTML="";alert("Please Enter Your Name");return false;}if($$("SubEmail").value.trim()==""||$$("SubEmail").value.trim()=="Enter your email"){$$("NewsletterPostResult").innerHTML="";alert("Please Enter Your Email");return false;}if(!ValidateEmail("SubEmail","Please Enter The Correct Email")){$$("NewsletterPostResult").innerHTML="";return false;}var h="";h="NewsLetterIDs="+b;var g=f+"Pages/Newletter/ThankYouNL.aspx?"+h+"&Name="+$$("SubName").value.trim()+"&Email="+$$("SubEmail").value.trim();window.parent.location.href=g;return false;}function PostNewsletterIDsFromLanding(c,b){if($$("SubName").value.trim()==""||$$("SubName").value.trim().toLowerCase()=="enter your name"){alert("Please Enter Your Name");return false;}if($$("SubEmail").value.trim()==""||$$("SubEmail").value.trim().toLowerCase()=="enter your email"){alert("Please Enter Your Email");return false;}if(!ValidateEmail("SubEmail","Please Enter The Correct Email")){return false;}var f="";f="NewsLetterIDs="+c;var e=b+"Pages/Newletter/ThankYouNL.aspx?"+f+"&Name="+$$("SubName").value.trim()+"&Email="+$$("SubEmail").value.trim();window.parent.location.href=e;return false;}function ShowHideMenuDiv(b){if($$(b)!=null){if($$(b).style.visibility=="hidden"){$$(b).style.visibility="visible";}else{$$(b).style.visibility="hidden";}}}function showCountryMenu(b){if($$(b)!=null){$$(b).style.visibility="visible";}}function hideCountryMenu(b){if($$(b)!=null){$$(b).style.visibility="hidden";}}function setCookie(c,e,b){var f=new Date();f.setDate(f.getDate()+b);document.cookie=c+"="+escape(e)+";"+((b==null)?"":";expires="+f.toGMTString())+";path=/";}function setCookieMin(c,e,b){var f=new Date();f.setMinutes(f.getMinutes()+b,0,0);document.cookie=c+"="+escape(e)+";"+((b==null)?"":";expires="+f.toGMTString())+";path=/";}function setCookieDomain(c,f,b,e){var g=new Date();g.setMinutes(g.getMinutes()+b,0,0);document.cookie=c+"="+escape(f)+";"+((b==null)?"":";expires="+g.toGMTString())+";path=/"+((e)?";domain="+e:"");}function GetUserCookieValue(f){var c=document.cookie;var g=c.split(";");var b=g.length;if(b>0){for(var e=b-1;e>=0;e--){if(g[e]!=null&&g[e]!=""){if(g[e].split("=").length>0){if(g[e].split("=")[0].trim()==f.trim()){return g[e].split("=")[g[e].split("=").length-1];}}}}}return"";}function GetUserCountry(){AJAXGet(strLogicalPathJs+"Pages/General/AjaxHandler.aspx?Flag=8",FillMainCountryInfo,"get");}function FillMainCountryInfo(e,c,f){e=e.replace('<div id="parent">',"");e=e.replace("</div>","");var g=e.toLowerCase();if(g!=""){var b='<span class="fltlft">'+e+'</span><img src="Images/flags/'+g+'.gif" width="16" height="11" alt="'+e+'" title="'+e+'" />';if($$("divMainCountryDIV")!=null){$$("divMainCountryDIV").innerHTML=b;}}hideCountryMenu("divCountryDiv");GetWeather(e,f);if(c!=null&&c==true){setCookie("UserSelectedCountry",e,"360");}}function LoadCountryCookie(){var e=GetUserCookieValue("BusWeather");var k="";if(e.trim()!=""){var h=unescape(e).trim();var g=h.substring(h.indexOf('<div id="parent">'),h.length);var f=g.substring(17,g.indexOf("</div>"));if(f!=""){var j=f.split("~!~");if(j.length>6){k=j[6].trim().toLowerCase();}}}if(e.trim()!=""&&k==GetUserCookieValue("c").trim().toLowerCase()){var h=unescape(e);callBackFromAjaxGetWeather(h);}else{var b=GetUserCookieValue("UserSelectedCountry");var c=GetUserCookieValue("c");if(b.trim()!=""||c.trim()!=""){FillMainCountryInfo(b,false,c);}else{GetUserCountry();}}}function descDrawRatingThumbs(k,b,h){var j="";var e="";var c="";if(GetUserCookieValue("CommentThumbRating_"+b)==""){j="return CommentRate('"+b+"','"+k+"','1','"+h+"')";c="return CommentRate('"+b+"','"+k+"','0','"+h+"')";e="cursor: pointer;";}var l='<img src="Style/images/vup.jpg" alt="" border="0" style="'+e+'" onclick="'+j+'" />';var g=' <img src="Style/images/sepvot.jpg" alt="" /> ';var f='<img src="Style/images/vd.jpg" alt="" border="0" style="'+e+'" onclick="'+c+'" />';if($$(h)!=null){$$(h).innerHTML=l+g+f;}}function ValidateContentLength(f,g,b){var h=null;var e=null;if($$(f)!=null){h=$$(f);}if($$(g)!=null){e=$$(g);}if(h!=null&&e!=null){if(h.value.length>b){alert("You have reached the maximum comment length.");h.value=h.value.substring(0,b);}}var j="";if(h.value.length<b){j="<b style='color:green'>"+h.value.length+"</b>";}else{j="<b style='color:red'>"+h.value.length+"</b>";}e.innerHTML=j+" <b>of "+b+"</b>";}function readCookie(e){var g=e+"=";var b=document.cookie.split(";");for(var f=0;f<b.length;f++){var h=b[f];while(h.charAt(0)==" "){h=h.substring(1,h.length);}if(h.indexOf(g)==0){return h.substring(g.length,h.length);}}return null;}function DoLogin(b){var c=Math.random()*11;AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?random="+guid()+"&Flag=9&url="+b,callBackFromAjaxDoLogin,"get");}function callBackFromAjaxDoLogin(g){var c=g.substring(g.indexOf('<div id="parent">'),g.length);var f=c.substring(17,c.indexOf("</div>"));if(f!=""){var e=f.split("~!~");var b=e[0];var h=e[1];if(b!=""){if($$(UserHDNID)!=null){$$(UserHDNID).value=b;}}if(h.toLowerCase().indexOf("/login/")>-1){$$("divUserName").style.display="none";$$("lnkSignIn").style.display="inline";$$("lnkRegister").style.display="inline";$$("lnkSignOut").style.display="none";$$("lnkSignIn").href=h;}else{if(b.length>24){$$("divUserName").title=b;b=b.substring(0,21)+"...";}$$("divUserName").innerHTML=b;$$("lnkRegister").style.display="none";$$("lnkSignIn").style.display="none";$$("lnkSignOut").style.display="inline";$$("divUserName").style.display="inline";$$("lnkSignOut").href=h;}}}function CheckLogin(b){if(readCookie("MKTID")==null&&readCookie("MKTID_copy")==null){_check_login();}else{$$(b).href="#";}}var lang="en";var channelname="business";var returnurl;function SetLoginReturnUrl(b){returnurl=b;}function CompaniesNewsletterCheck(j,f){var c=false;var b="";if($$("divCompanySubResult")!=null){$$("divCompanySubResult").innerHTML="";}for(var e=0;e<j;e++){if($$("cbRelatedCompany_"+e)!=null&&$$("cbRelatedCompany_"+e).checked){c=true;b=b+","+$$("cbRelatedCompany_"+e).name;}}if(c){if($$("SubNameCom").value.trim()==""||$$("SubNameCom").value.trim()=="Enter your Name"){alert("Please Enter Your Name");return false;}if($$("SubEmailCom").value.trim()==""||$$("SubEmailCom").value.trim()=="Enter your email"){alert("Please Enter Your Email");return false;}if(!ValidateEmail("SubEmailCom","Please Enter The Correct Email")){return false;}var h="";h="CompIDs="+b;var g=f+"Pages/Newletter/ThankYouNL.aspx?"+h+"&Name="+$$("SubNameCom").value.trim()+"&Email="+$$("SubEmailCom").value.trim();window.parent.location.href=g;return false;}else{alert("You must select at least one company before subscribe.");return false;}}function CompanySubCallBack(c){var e=c.substring(c.indexOf('<div id="parent">'),c.length);var b=e.substring(17,e.indexOf("</div>"));var f=$$("divCompanySubResult");if(b=="1"&&f!=null){f.innerHTML="Success";}else{if(f!=null){f.innerHTML="failed";f.innerHTML=b;}}}function GetFriendlyURL(b){var c=new RegExp("[,,',/,\\,|,:, ,__,?,.,),),\n\",-,-,&,%]","g");b=b.replace(c,"_");return b;}function IncreaseUserReadCound(c,b){AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?Flag=11&objID="+c+"&ArtType="+b,null,"get");}var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function encode64(e){var b="";var m,k,h;var l,j,g,f;var c=0;do{m=e.charCodeAt(c++);k=e.charCodeAt(c++);h=e.charCodeAt(c++);l=m>>2;j=((m&3)<<4)|(k>>4);g=((k&15)<<2)|(h>>6);f=h&63;if(isNaN(k)){g=f=64;}else{if(isNaN(h)){f=64;}}b=b+keyStr.charAt(l)+keyStr.charAt(j)+keyStr.charAt(g)+keyStr.charAt(f);}while(c<e.length);return b;}function decode64(e){var b="";var m,k,h;var l,j,g,f;var c=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{l=keyStr.indexOf(e.charAt(c++));j=keyStr.indexOf(e.charAt(c++));g=keyStr.indexOf(e.charAt(c++));f=keyStr.indexOf(e.charAt(c++));m=(l<<2)|(j>>4);k=((j&15)<<4)|(g>>2);h=((g&3)<<6)|f;b=b+String.fromCharCode(m);if(g!=64){b=b+String.fromCharCode(k);}if(f!=64){b=b+String.fromCharCode(h);}}while(c<e.length);return b;}function runRefreshPage(){setTimeout("RefreshPage()",1000*60*7);}function RefreshPage(){window.parent.location.href=window.parent.location.href;}function PropertyFinderSearch(p,n,l){var k="";var b=$$(l+"ddlConsultant").value;var h=p;var m=$$(l+"ddlArea").value;var r=$$(l+"ddlCity").value;var g=$$(l+"ddlBy").value;var c=$$(l+"ddlOrder").value;var j=$$(l+"ddlPriceMax").value;var s=$$(l+"ddlPriceMin").value;var e=$$(l+"ddlMaxRooms").value;var o=$$(l+"ddlMinRooms").value;var q=$$(l+"ddlProperty").value;var f=$$(l+"ddlApartment").value;k=n.toString().replace("[pno]",h).replace("[area]",m).replace("[city]",r).replace("[consultant]",b);k=k.replace("[orderby]",g).replace("[ordertype]",c).replace("[pricemax]",j);k=k.replace("[pricemin]",s).replace("[roommax]",e).replace("[roommin]",o);k=k.replace("[specification]",q).replace("[typeofapartment]",f);window.parent.location.href=k;return false;}function PropertyFinderSimpleSearch(c,e,f,g){var k="";var j=$$(e).value;var b=$$(f).value;var h=$$(g).value;k=c.toString().replace("[area]",j).replace("[city]",b).replace("[specification]",h);window.parent.location.href=k;return false;}var strDDListHeader="";function GetAreaPropertyFinder(b,c){$$("imgLoadingPF").style.display="block";strDDListHeader=c;AJAXGet(strLogicalPathJs+"Pages/General/AjaxHandler.aspx?Flag=13&CityID="+$$(b).value,FillAreaPropertyFinde,"get");}function FillAreaPropertyFinde(e){var b=e.substring(e.indexOf('<div id="parent">'),e.length);var c=b.substring(17,b.indexOf("</div>"));if(c!=""){$$("SpanDDLArea").innerHTML=strDDListHeader+c+"</select>	";}$$("imgLoadingPF").style.display="none";}function GetIfComeFromGoogle(){var e=document.referrer;var b=document.URL;if(b.trim().toLowerCase().indexOf("newslettersubscription")==-1){if(e.trim()!=""&&!(e.trim().toLowerCase().indexOf(strLogicalPathJs.toLowerCase())>=0)){var c=GetUserCookieValue("DontShowToolBarAgain");if(c==null||c!="true"){$$("mainbar").style.display="block";}}}}function DontShowToolBarAgain(){setCookie("DontShowToolBarAgain","true","360");$$("mainbar").style.display="none";}function PostNewsletterIDsFromLandingTraking(c,b){if($$("SubNameTb").value.trim()==""||$$("SubNameTb").value.trim()=="Enter your Name"){alert("Please Enter Your Name");return false;}if($$("SubEmailTb").value.trim()==""||$$("SubEmailTb").value.trim()=="Enter your email"){alert("Please Enter Your Email");return false;}if(!ValidateEmail("SubEmailTb","Please Enter The Correct Email")){return false;}var f="";f="NewsLetterIDs="+c;var e=b+"Pages/Newletter/ThankYouNL.aspx?"+f+"&Name="+$$("SubNameTb").value.trim()+"&Email="+$$("SubEmailTb").value.trim();pageTracker._trackEvent("newsletterSub","Click");window.parent.location.href=e;return false;}function GetWeather(c,e){var b="";if(c!=null){b=c;}var f=Math.random()*11;AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?&random="+f+"&Flag=14&CountryName="+b+"&CountryCode="+e,callBackFromAjaxGetWeather,"get");}function callBackFromAjaxGetWeather(e){setCookieMin("BusWeather",e,60);var l=e.substring(e.indexOf('<div id="parent">'),e.length);var h=l.substring(17,l.indexOf("</div>"));if(h!=""){var o=h.split("~!~");if(o.length>6){setCookieDomain("c",o[6].trim().toLowerCase(),60,".maktoob.com");}var p=o[7].trim().toLowerCase();var g='<span class="fltlft">'+o[7].trim()+'</span><img src="Images/flags/'+p+'.gif" width="16" height="11" alt="'+o[7].trim()+'" title="'+o[7].trim()+'" />';if($$("divMainCountryDIV")!=null){$$("divMainCountryDIV").innerHTML=g;}var m;for(m=1;m<o.length;m++){var c=o[m].split(",");FillWeatherDay(m,c[0],c[1],c[2],c[3],c[4],c[5],c[6]);}var k=o[0];if(k.trim().toLowerCase()=="saudiarabia"){k="KSA";}if(k.trim().toLowerCase()=="dubai"){k="UAE";}var c=o[1].split(",");var b=c[3];var j=c[1];var f=c[4];if($$("weatherImageHi0")!=null){var n="Images/weather_images/20x20/"+b+".gif";$$("weatherImageHi0").src=n;$$("weatherImageHi0").title=f;}if($$("lblTempHi0")!=null){$$("lblTempHi0").innerHTML=j;}if($$("lblCountry")!=null){$$("lblCountry").innerHTML=k;}if($$("tdWeather")!=null){$$("tdWeather").style.display="block";$$("tdWeatherImg").style.display="block";}}}function FillWeatherDay(j,l,f,k,c,h,b,e){if($$("weatherImageHi"+j)!=null){var g="Images/weather_images/20x20/"+c+".gif";$$("weatherImageHi"+j).src=g;$$("weatherImageHi"+j).title=h;}if($$("weatherImageLow"+j)!=null){var g="Images/weather_images/20x20/"+b+".gif";$$("weatherImageLow"+j).src=g;$$("weatherImageLow"+j).title=e;}if($$("lblTempHi"+j)!=null){$$("lblTempHi"+j).innerHTML=f;}if($$("lblTempLow"+j)!=null){$$("lblTempLow"+j).innerHTML=k;}if($$("lblDay"+j)!=null){$$("lblDay"+j).innerHTML=l;}}function ShowHideWeatherDiv(){if($$("DivWeather5Day")!=null){if($$("DivWeather5Day").style.visibility=="hidden"){$$("DivWeather5Day").style.visibility="visible";$$("tableWeather").className="wthrmnunon2";}else{$$("DivWeather5Day").style.visibility="hidden";$$("tableWeather").className="wthrmnunon";}}}function UpdateMarketInfoLocal(c){var b=Math.random()*11;AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?&random="+b+"&Flag=10&MarketId="+c,callBackFromAjaxUpdateMarketInfoLocal,"get");}function callBackFromAjaxUpdateMarketInfoLocal(f){if(f.length>25){var b=f.split("~!~")[1];b=b.substring(0,b.length-6);var e=f.replace('<div id="parent">',"");var c=e.split("~!~")[0];if(c!=""){$$("MainMarketLabel").innerHTML=c;$$("marketChart1").src=b+"?q="+guid();}}}function CurrencyConverterDiv(b){if($$("CurConverterDiv")!=null){$$("CurConverterDiv").innerHTML='<iframe src="'+b+'" frameborder="0"  scrolling="no" width="225px"  marginheight="0px" marginwidth="0px" style="height:176px;" ></iframe>';}}function CurrencyMarketDIVJS(b){if($$("CurrencyMarketDIV")!=null){$$("CurrencyMarketDIV").innerHTML='<iframe src="'+b+'" frameborder="0"  scrolling="no" width="220px"  marginheight="0px" marginwidth="0px" style="height:450px; *height:430px" ></iframe>';}}function EnergyAndMetalsMarketsDivJS(b){if($$("EnergyAndMetalsMarketsDiv")!=null){$$("EnergyAndMetalsMarketsDiv").innerHTML='<iframe src="'+b+' "frameborder="0" scrolling="no" width="220px" marginheight="0px" style="height:390px; *height:365px" marginwidth="0px"  ></iframe>';}}function S4(){return(((1+Math.random())*65536)|0).toString(16).substring(1);}function guid(){return(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());}function SetValueOnHdn(c,b){$$(b).value=getRbCheckedValue(document.getElementsByName(c));return true;}function getRbCheckedValue(c){if(!c){return"";}var e=c.length;if(e==undefined){if(c.checked){return c.value;}else{return"";}}for(var b=0;b<e;b++){if(c[b].checked){return c[b].value;}}return"";}function OpenGlobalPupUp(g,f,b,e){var c;var j=(screen.width/2)-(f/2);var h=(screen.height/2)-(b/2);c="height="+b+",width="+f+",left="+j+",top="+h+",toolbar=no,menubar=no,scrollbars=yes";window.open(g,e,c);}function testOsama(b,c){$$("NEWSMAKERSLnk").style.backgroundPosition=b+" "+c;}function ChangeClassNav(b){$$("NEWSMAKERSLnk").className=b;}