function GetXmlHttp(){var b=false;if(window.XMLHttpRequest){b=new XMLHttpRequest();}else{if(window.ActiveXObject){try{b=new ActiveXObject("Msxml2.XMLHTTP");}catch(d){try{b=new ActiveXObject("Microsoft.XMLHTTP");}catch(c){b=false;}}}}return b;}function AJAXGet(b,f,e,d){var c=new GetXmlHttp();if(c){c.onreadystatechange=function(){if(c&&c.readyState==4){if(c.status==200){if(f!=null){f(c.responseText);}}}};if(String(e).toLowerCase()=="post"){c.open("POST",b,true);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.setRequestHeader("Content-length",d.length);c.setRequestHeader("Connection","close");c.send(d);}else{c.open("GET",b,true);c.send(null);}}}function AJAXGetJS(b,g,f,d){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(g);}};}function testosama33(b){if(strResult14!="undefined"){b(strResult14);}}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(Config_GoogleMapError);}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,k,n,l,g,d,o,j,h,c,m){photoStoryCount=o;if($$(b)!=null){$$(b).innerHTML=n;}if($$(k)!=null){$$(k).innerHTML=l;}if($$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img")!=null){$$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img").src=d.replace("[ID]",g);$$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img").title=m;$$("ctl00_CPH1_PhotoStory1_Friendly_Images1_img").alt=m;}var f="javascript:openpopup('"+h+"Pages/Media/GalleryPopUp.aspx?GalleryID="+c+"&ImageID="+g+"', '980', '700','"+c+"');";var e=j+"1";if($$(e)!=null){$$(e).href=f;$$(e).title=m;}e=j+"2";if($$(e)!=null){$$(e).href=f;$$(e).title=n;}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,h,l,j,f,c,m,g,e,k){vidoeStoryCount=m;if($$(b)!=null){$$(b).innerHTML=l;}if($$(h)!=null){$$(h).innerHTML=j;}if($$("ctl00_CPH1_VideoStory1_Friendly_Images1_img")!=null){$$("ctl00_CPH1_VideoStory1_Friendly_Images1_img").src=c.replace("[ID]",f);$$("ctl00_CPH1_VideoStory1_Friendly_Images1_img").title=k;$$("ctl00_CPH1_VideoStory1_Friendly_Images1_img").alt=k;}var d=g+"1";if($$(d)!=null){$$(d).href=e;$$(d).title=k;}d=g+"2";if($$(d)!=null){$$(d).href=e;$$(d).title=l;}return false;}function ChangeTabs(e,b,d,f,c){for(i=1;i<=f;i++){$$(b+i).className="";$$(b+i).style.display="none";$$(c+i).src="Style/images/sepnav.gif";$$(c+i).className="";if(f==i){$$(e+i).className="";}else{$$(e+i).className="brdleft";}}$$(b+d).style.display="block";$$(b+d).className="pad8";if(f==i){$$(e+d).className="selct";}else{$$(e+d).className="selct brdleft";}$$(c+d).src="Style/images/sepnav2.gif";$$(c+d).className="padt2 padr2";return;}function ChangeNewsInNumbersTabs(e,b,d,f,c){for(i=1;i<=f;i++){$$(c+i).src="Style/images/sepnav.gif";$$(c+i).className="";if(f==i){$$(e+i).className="";}else{$$(e+i).className="brdleft";}}if(f==(i-1)){$$(e+d).className="selct";}else{$$(e+d).className="selct brdleft";}$$(c+d).src="Style/images/sepnav2.gif";$$(c+d).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(h,c,d,f){if($$("hdnCrumbID")==null||$$("hdnCrumbID").value==""){setTimeout("SetVote("+h+","+c+","+d+","+f+")",5000);}else{var g=Math.random()*11;var b="";for(var e=0;e<document.getElementsByName("voteRadios").length;e++){if(document.getElementsByName("voteRadios")[e].checked){b=document.getElementsByName("voteRadios")[e].value;}}if(b==""){$$("divError").style.display="block";return;}else{$$("divError").style.display="none";}PublicDivPoll=c;PublicDivResult=d;divPercentageView=f;AJAXGet(strLogicalPathJs+"Pages/General/AjaxHandler.aspx?crumbID="+$$("hdnCrumbID").value+"&Flag=2&answerID="+b+"&QuestionId="+$$(h).value,callBackFromAjaxSetVote,"get");}}function callBackFromAjaxSetVote(b){var h=b.substring(b.indexOf('<div id="parent">'),b.length);var f=h.substring(17,h.indexOf("</div>"));if(f!=""){$$(PublicDivPoll).style.display="none";$$("btnVote").style.display="none";$$(PublicDivResult).style.display="block";var l=f.split("~|~");var n;var c=0;var d=0;for(var j=0;j<l.length-1;j++){n=l[j].split("~!~");c=c+parseInt(n[1]);if(parseInt(n[1])>d){d=parseInt(n[1]);}}var m;$$(divPercentageView).innerHTML="";for(var o=0;o<l.length-1;o++){m=l[o].split("~!~");var e;if(parseInt(m[1])==0){e=0;}else{e=(parseInt(m[1])*100)/c;}var k="reblue result1";var g="result3 fnts18 rebluetxt";if(d==parseInt(m[1])){k="rered result1";g="result3 fnts18 reredtxt";}e=Math.ceil(e);if(o==l.length-2){$$(divPercentageView).innerHTML+='<table width="100%" border="0" cellpadding="0" cellspacing="5"><tr><td><div class="padb5"><div class="fnt11 fntv padtb05">'+m[0]+'</div><div><div class="result2 "><div style="width:'+e+'%;" class="'+k+'"></div></div><div class="'+g+'"><strong>'+e+'%</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">'+m[0]+'</div><div><div class="result2 "><div style="width:'+e+'%;" class="'+k+'"></div></div><div class="'+g+'"><strong>'+e+'%</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(e){var d=e.substring(e.indexOf('<div id="parent">'),e.length);var c=d.substring(17,d.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'>"+Config_CommentAddThankyou+"</b><br />";if($$("btnClearAll")!=null){$$("btnClearAll").click();}}else{if(c=="1"){$$("divCommentAddResult").innerHTML="<br /><b class='red'>"+Config_CommentAddFailed+"</b><br />";}else{$$("divCommentAddResult").innerHTML="<br /><b  class='red'>"+Config_CommentAddWrongCode+"</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,d){var c=$$(b).value;var f="^[\\w-_.+]*[\\w-_.]@([\\w-_]+\\.)+[\\w]+[\\w]$";var e=new RegExp(f);if(!e.test(c)){$$(b).focus();alert(d);return false;}return true;}function ValidateEmailString(f,c){var b=f;var e="^[\\w-_.+]*[\\w-_.]@([\\w-_]+\\.)+[\\w]+[\\w]$";var d=new RegExp(e);if(!d.test(b)){alert(c);return false;}return true;}function ValidateMultiEmail(b,e){if($$(b).value.trim()==""){alert(e);return false;}else{var c=$$(b).value.split(",");for(var d=0;d<c.length;d++){if(!ValidateEmailString(c[d],e)){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",Config_EnterToEmail);if(c==false){return false;}var b=validateInput("txtYourName,txtYourEmail,txtMsg,txtCode",Config_EnterYourName+","+Config_EnterYourEmailCorrect+","+Config_EnterMessage+","+Config_EnterCode,Config_EnterYourName+","+Config_EnterYourEmail+",,"+Config_EnterCode+",","true");return(c&&b);}function validateInput(d,c,b,j){var k=new String(d);var e=new String(c);var m=null;if(b!=null){m=new String(b);}for(var g=0;g<k.split(",").length;g++){var f=k.split(",")[g];var l=e.split(",")[g];var h="";if(m!=null){h=m.split(",")[g].trim();}var n=true;switch($$(f).tagName.toLowerCase()){case"select":if($$(f).value==-1){n=false;}break;case"input":case"textarea":if(f.toLowerCase().indexOf("email")>-1){if(!ValidateEmail(f,l)){return false;}}else{if(j==null||!(j)){cleanInjection(f);}}if($$(f).value.trim()==""||$$(f).value.trim().toLowerCase()==h.toLowerCase()){n=false;}break;}if(!n){alert(l);$$(f).focus();return false;}}return true;}function ColorSelected(e,d,f,g,b){for(var c=0;c<=e;c++){if($$(g+"tdRating"+c)!=null){$$(g+"tdRating"+c).className="";}}for(var c=0;c<=d;c++){if($$(g+"tdRating"+c)!=null){$$(g+"tdRating"+c).className=f;}}if(f==""){for(var c=0;c<=b;c++){if($$(g+"tdRating"+c)!=null){$$(g+"tdRating"+c).className="on1";}}}}function FillRatingResult(e,b,d){if($$("hdnCrumbID")==null||$$("hdnCrumbID").value==""){setTimeout("FillRatingResult("+e+","+b+","+d+")",5000);}else{var f=FillTopRatingResult;var c=strLogicalPathJs+"Pages/General/AjaxHandler.aspx?crumbID="+$$("hdnCrumbID").value+"&SPID=1_2&ObjectID="+ObjectID+"&Rate="+b+"&RatesCount="+RateCount+"&RateResult="+RateSum;if(d){AJAXGet(c+"&Flag=5",FillBoth,"get",null);}else{AJAXGet(c+"&ArtType=1&objID="+ObjectID+"&Flag=4",f,"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(d,b){var c=self.location.href;if(c.indexOf("#")>-1){c=c.split("#")[0];}self.location.href=c+"#"+d;if($$(b)!=null){$$(b).focus();}return false;}function openpopup(g,j,d,e){var f;var c=j;var l=d;var b=(screen.width/2)-(c/2);var k=(screen.height/2)-(l/2);f="height="+l+",width="+c+",left="+b+",top="+k+",toolbar=no,menubar=no,scrollbars=yes";window.open(g,"mywindow",f);if(e!=null){IncreaseUserReadCound(e,"4");}}function hide(d,b,e,c){if($$(d).style.display=="block"||$$(d).style.display==""){$$(d).style.display="none";if(b==2){$$(e).className="menusub";$$(c).src="Style/images/plus.gif";}if(b==1){$$(c).src="Style/images/close.gif";}}else{$$(d).style.display="block";if(b==2){$$(e).className="menusubon";$$(c).src="Style/images/neg.gif";}if(b==1){$$(c).src="Style/images/add.gif";}}}function openDivsChannel(d,c,b,e){$$("div"+e+d).style.display="block";$$("img"+e+d).src="Style/images/add.gif";if(c!=null&&c!=""&&c!="0"){$$("divsec"+e+c).className="menusubon";$$("div"+e+d+c).style.display="block";$$("img"+e+d+c).src="Style/images/neg.gif";if(b!=null&&b!=""&&b!="0"){$$("divsub"+e+d+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(d,c){var b=new Date(d);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,f,e,b){if($$("hdnCrumbID")==null||$$("hdnCrumbID").value==""){setTimeout("CommentRate("+c+","+f+","+e+","+b+")",5000);}else{CommentRateResultDivID=f;ThumbContainerDivIDUserID=b;RatingCommentID=c;setCookie("CommentThumbRating_"+c,c,1);descDrawRatingThumbs("",RatingCommentID,ThumbContainerDivIDUserID);var d=strLogicalPathJs+"Pages/General/AjaxHandler.aspx?crumbID="+$$("hdnCrumbID").value+"&flag=6&CommentID="+c+"&CommentType="+e;AJAXGet(d,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,d){var b=$$(d);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(f){if(sArrMarketsNames.length>f&&sArrMarketsClose.length>f&&sArrArrowImages.length>f&&sArrMarketsCahnge.length>f){var b=sInnerDraw.replace("[MRNAME]",sArrMarketsNames[f]);b=b.replace("[MRCLOSE]",sArrMarketsClose[f]);var d="";var e="";if(sArrArrowImages[f].toLowerCase()=="uparrow"){e="Up";d="Style/images/rowup.gif";}else{if(sArrArrowImages[f].toLowerCase()=="downarrow"){e="Down";d="Style/images/rowd.gif";}else{if(sArrArrowImages[f].toLowerCase()=="equalarrow"){e="Stable";d="Style/images/row1.gif";}}}b=b.replace("[IMGSRC]",d);b=b.replace("[IMGTITLE]",e);b=b.replace("[IMGTITLE]",e);var c="";if(sArrMarketsCahnge[f].indexOf("-")==-1){c="&#43;"+sArrMarketsCahnge[f];}else{c=sArrMarketsCahnge[f];}b=b.replace("[MRCHANGPRST]",c);return b;}return"";}function GoToSearchClick(c,e,b,d){if(b.trim()!=""){if(c.trim()!=""&&$$(c)!=null&&d=="KW"){if($$(c).value.trim().toLowerCase()==Config_keywords||$$(c).value.trim().toLowerCase()==Config_enterkeyword||$$(c).value.trim()==""||$$(c).value.trim().toLowerCase()==Config_enterkeywords||$$(c).value.trim().toLowerCase()==Config_enterCompanyName){alert(Config_PlzEnterKeyword);return false;}else{d=false;b=b.toLowerCase().replace("[kw]",encodeURI($$(c).value.trim()));b=b.toLowerCase().replace("[kw]",encodeURI($$(c).value.trim()));}}if(e.trim()!=""&&$$(e)!=null&&d=="TN"){if($$(e).value.trim().toLowerCase()==Config_enterkeywords||$$(e).value.trim().toLowerCase()==Config_Comp_People_team_tags||$$(e).value.trim().toLowerCase()==Config_enterkeyword||$$(e).value.trim()==""){alert(Config_PlzEnterKeyword);return false;}b=b.toLowerCase().replace("[tn]",escape($$(e).value.trim()));}self.location.href=b;}}function LoadTagNameAndKeyWord(b){b=b.replace(/[+]/g," ");b=decodeURI(b.trim());if(b.trim().toLowerCase()!="[kw]"){$$("tbKeyWord").value=b.trim();}}function GotToNewsLetterPage(d,b){if($$(d).value.trim()==""||$$(d).value.trim()==Config_EnterUremailAddress){alert(Config_plzEnterUrEmail);return false;}if(!ValidateEmail(d,Config_PlzEnterCorrectEmail)){return false;}var c=$$(d).value.trim().replace("@","_at_").replace(".","_dot_");window.parent.location.href=b.replace("email",c);}function PostNewsletterIDs(h,c,e){$$("NewsletterPostResult").innerHTML="<b>"+Config_PlzWait+" ...</b>";var b="";var j=false;for(var d=0;d<h;d++){if($$("cbSubscribe"+d)!=null&&$$("cbSubscribe"+d).checked){b=b+","+$$("cbSubscribe"+d).name;j=true;}}if(!j){$$("NewsletterPostResult").innerHTML="";alert(Config_SelectNewsLetter);return false;}if($$("SubName").value.trim()==""||$$("SubName").value.trim().toLowerCase()==Config_EnterYourName.toLowerCase()){$$("NewsletterPostResult").innerHTML="";alert(Config_plzEnterUrEmail);return false;}if($$("SubEmail").value.trim()==""||$$("SubEmail").value.trim().toLowerCase()==Config_EnterYourEmail.toLowerCase()){$$("NewsletterPostResult").innerHTML="";alert(Config_plzEnterUrEmail);return false;}if(!ValidateEmail("SubEmail",Config_PlzEnterCorrectEmail)){$$("NewsletterPostResult").innerHTML="";return false;}var g="";g="NewsLetterIDs="+b;var f=e+"Pages/Newletter/ThankYouNL.aspx?"+g+"&Name="+$$("SubName").value.trim()+"&Email="+$$("SubEmail").value.trim();window.parent.location.href=f;return false;}function PostNewsletterIDsFromLanding(c,b){if($$("SubName").value.trim()==""||$$("SubName").value.trim().toLowerCase()==Config_EnterYourName.toLowerCase()){alert(Config_plzEnterUrName);return false;}if($$("SubEmail").value.trim()==""||$$("SubEmail").value.trim().toLowerCase()==Config_EnterYourEmail.toLowerCase()){alert(Config_plzEnterUrEmail);return false;}if(!ValidateEmail("SubEmail",Config_PlzEnterCorrectEmail)){return false;}var e="";e="NewsLetterIDs="+c;var d=b+"Pages/Newletter/ThankYouNL.aspx?"+e+"&Name="+$$("SubName").value.trim()+"&Email="+$$("SubEmail").value.trim();window.parent.location.href=d;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,d,b){var e=new Date();e.setDate(e.getDate()+b);document.cookie=c+"="+escape(d)+";"+((b==null)?"":";expires="+e.toGMTString())+";path=/";}function setCookieMin(c,d,b){var e=new Date();e.setMinutes(e.getMinutes()+b,0,0);document.cookie=c+"="+escape(d)+";"+((b==null)?"":";expires="+e.toGMTString())+";path=/";}function setCookieDomain(c,e,b,d){var f=new Date();f.setMinutes(f.getMinutes()+b,0,0);document.cookie=c+"="+escape(e)+";"+((b==null)?"":";expires="+f.toGMTString())+";path=/"+((d)?";domain="+d:"");}function GetUserCookieValue(e){var c=document.cookie;var f=c.split(";");var b=f.length;if(b>0){for(var d=b-1;d>=0;d--){if(f[d]!=null&&f[d]!=""){if(f[d].split("=").length>0){if(f[d].split("=")[0].trim()==e.trim()){return f[d].split("=")[f[d].split("=").length-1];}}}}}return"";}function GetUserCountry(){AJAXGet(strLogicalPathJs+"Pages/General/AjaxHandler.aspx?Flag=8",FillMainCountryInfo,"get");}function FillMainCountryInfo(d,c,e){d=d.replace('<div id="parent">',"");d=d.replace("</div>","");var f=d.toLowerCase();if(f!=""){var b='<span class="fltlft">'+d+'</span><img src="Images/flags/'+f+'.gif" width="16" height="11" alt="'+d+'" title="'+d+'" />';if($$("divMainCountryDIV")!=null){$$("divMainCountryDIV").innerHTML=b;}}hideCountryMenu("divCountryDiv");GetWeather(d,e);if(c!=null&&c==true){setCookie("UserSelectedCountry",d,"360");}}function LoadCountryCookie(){var d=GetUserCookieValue("BusWeather");var j="";if(d.trim()!=""){var g=unescape(d).trim();var f=g.substring(g.indexOf('<div id="parent">'),g.length);var e=f.substring(17,f.indexOf("</div>"));if(e!=""){var h=e.split("~!~");if(h.length>6){j=h[6].trim().toLowerCase();}}}if(d.trim()!=""&&j==GetUserCookieValue("c").trim().toLowerCase()){var g=unescape(d);callBackFromAjaxGetWeather(g);}else{var b=GetUserCookieValue("UserSelectedCountry");var c=GetUserCookieValue("c");if(b.trim()!=""||c.trim()!=""){FillMainCountryInfo(b,false,c);}else{GetUserCountry();}}}function descDrawRatingThumbs(j,b,g){var h="";var d="";var c="";if(GetUserCookieValue("CommentThumbRating_"+b)==""){h="return CommentRate('"+b+"','"+j+"','1','"+g+"')";c="return CommentRate('"+b+"','"+j+"','0','"+g+"')";d="cursor: pointer;";}var k='<img src="Style/images/vup.jpg" alt="" border="0" style="'+d+'" onclick="'+h+'" />';var f=' <img src="Style/images/sepvot.jpg" alt="" /> ';var e='<img src="Style/images/vd.jpg" alt="" border="0" style="'+d+'" onclick="'+c+'" />';if($$(g)!=null){$$(g).innerHTML=k+f+e;}}function ValidateContentLength(e,f,b){var g=null;var d=null;if($$(e)!=null){g=$$(e);}if($$(f)!=null){d=$$(f);}if(g!=null&&d!=null){if(g.value.length>b){alert(Config_reachedMaxComment);g.value=g.value.substring(0,b);}}var h="";if(g.value.length<b){h="<b style='color:green'>"+g.value.length+"</b>";}else{h="<b style='color:red'>"+g.value.length+"</b>";}d.innerHTML=h+" <b>of "+b+"</b>";}function readCookie(d){var f=d+"=";var b=document.cookie.split(";");for(var e=0;e<b.length;e++){var g=b[e];while(g.charAt(0)==" "){g=g.substring(1,g.length);}if(g.indexOf(f)==0){return g.substring(f.length,g.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(f){var c=f.substring(f.indexOf('<div id="parent">'),f.length);var e=c.substring(17,c.indexOf("</div>"));if(e!=""){var h=e.split("[CrumbID]")[1];$$("hdnCrumbID").value=h;var d=e.split("[CrumbID]")[0].split("~!~");var b=d[0];var g=d[1];if(b!=""){if($$(UserHDNID)!=null){$$(UserHDNID).value=b;}}if(g.toLowerCase().indexOf("/login/")>-1){$$("divUserName").style.display="none";$$("lnkSignIn").style.display="inline";$$("lnkRegister").style.display="inline";$$("lnkSignOut").style.display="none";$$("lnkSignIn").href=g;}else{if(b.length>20){$$("divUserName").title=b;b=b.substring(0,17)+"...";}$$("divUserName").innerHTML=b;$$("lnkRegister").style.display="none";$$("lnkSignIn").style.display="none";$$("lnkSignOut").style.display="inline";$$("divUserName").style.display="inline";$$("lnkSignOut").href=g;}}}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(h,e){var c=false;var b="";if($$("divCompanySubResult")!=null){$$("divCompanySubResult").innerHTML="";}for(var d=0;d<h;d++){if($$("cbRelatedCompany_"+d)!=null&&$$("cbRelatedCompany_"+d).checked){c=true;b=b+","+$$("cbRelatedCompany_"+d).name;}}if(c){if($$("SubNameCom").value.trim()==""||$$("SubNameCom").value.trim().toLowerCase()==Config_EnterYourName.toLowerCase()){alert(Config_plzEnterUrName);return false;}if($$("SubEmailCom").value.trim()==""||$$("SubEmailCom").value.trim().toLowerCase()==Config_EnterYourEmail.toLowerCase()){alert(Config_plzEnterUrEmail);return false;}if(!ValidateEmail("SubEmailCom",Config_PlzEnterCorrectEmail)){return false;}var g="";g="CompIDs="+b;var f=e+"Pages/Newletter/ThankYouNL.aspx?"+g+"&Name="+$$("SubNameCom").value.trim()+"&Email="+$$("SubEmailCom").value.trim();window.parent.location.href=f;return false;}else{alert(Config_atLeastOnecompany);return false;}}function CompanySubCallBack(c){var d=c.substring(c.indexOf('<div id="parent">'),c.length);var b=d.substring(17,d.indexOf("</div>"));var e=$$("divCompanySubResult");if(b=="1"&&e!=null){e.innerHTML="Success";}else{if(e!=null){e.innerHTML="failed";e.innerHTML=b;}}}function GetFriendlyURL(b){var c=new RegExp("[,,',/,\\,|,:, ,__,?,.,),),\n\",-,-,&,%]","g");b=b.replace(c,"_");return b;}function IncreaseUserReadCound(c,b){if($$("hdnCrumbID")==null||$$("hdnCrumbID").value==""){setTimeout("CommentRate("+CommentID+","+GroupID+","+CommentType+","+ThumbContainerDivID+")",5000);}else{AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?crumbID="+$$("hdnCrumbID").value+"&Flag=11&objID="+c+"&ArtType="+b,null,"get");}}var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function encode64(d){var b="";var l,j,g;var k,h,f,e;var c=0;do{l=d.charCodeAt(c++);j=d.charCodeAt(c++);g=d.charCodeAt(c++);k=l>>2;h=((l&3)<<4)|(j>>4);f=((j&15)<<2)|(g>>6);e=g&63;if(isNaN(j)){f=e=64;}else{if(isNaN(g)){e=64;}}b=b+keyStr.charAt(k)+keyStr.charAt(h)+keyStr.charAt(f)+keyStr.charAt(e);}while(c<d.length);return b;}function decode64(d){var b="";var l,j,g;var k,h,f,e;var c=0;d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{k=keyStr.indexOf(d.charAt(c++));h=keyStr.indexOf(d.charAt(c++));f=keyStr.indexOf(d.charAt(c++));e=keyStr.indexOf(d.charAt(c++));l=(k<<2)|(h>>4);j=((h&15)<<4)|(f>>2);g=((f&3)<<6)|e;b=b+String.fromCharCode(l);if(f!=64){b=b+String.fromCharCode(j);}if(e!=64){b=b+String.fromCharCode(g);}}while(c<d.length);return b;}function runRefreshPage(){setTimeout("RefreshPage()",1000*60*7);}function RefreshPage(){window.parent.location.href=window.parent.location.href;}function PropertyFinderSearch(o,m,k){var j="";var b=$$(k+"ddlConsultant").value;var g=o;var l=$$(k+"ddlArea").value;var q=$$(k+"ddlCity").value;var f=$$(k+"ddlBy").value;var c=$$(k+"ddlOrder").value;var h=$$(k+"ddlPriceMax").value;var r=$$(k+"ddlPriceMin").value;var d=$$(k+"ddlMaxRooms").value;var n=$$(k+"ddlMinRooms").value;var p=$$(k+"ddlProperty").value;var e=$$(k+"ddlApartment").value;j=m.toString().replace("[pno]",g).replace("[area]",l).replace("[city]",q).replace("[consultant]",b);j=j.replace("[orderby]",f).replace("[ordertype]",c).replace("[pricemax]",h);j=j.replace("[pricemin]",r).replace("[roommax]",d).replace("[roommin]",n);j=j.replace("[specification]",p).replace("[typeofapartment]",e);window.parent.location.href=j;return false;}function PropertyFinderSimpleSearch(c,d,e,f){var j="";var h=$$(d).value;var b=$$(e).value;var g=$$(f).value;j=c.toString().replace("[area]",h).replace("[city]",b).replace("[specification]",g);window.parent.location.href=j;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(d){var b=d.substring(d.indexOf('<div id="parent">'),d.length);var c=b.substring(17,b.indexOf("</div>"));if(c!=""){$$("SpanDDLArea").innerHTML=strDDListHeader+c+"</select>	";}$$("imgLoadingPF").style.display="none";}function GetIfComeFromGoogle(){var d=document.referrer;var b=document.URL;if(b.trim().toLowerCase().indexOf("newslettersubscription")==-1){if(d.trim()!=""&&!(d.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().toLowerCase()==Config_EnterYourName.toLowerCase()){alert(Config_plzEnterUrName);return false;}if($$("SubEmailTb").value.trim()==""||$$("SubEmailTb").value.trim().toLowerCase()==Config_EnterYourEmail.toLowerCase()){alert(Config_plzEnterUrEmail);return false;}if(!ValidateEmail("SubEmailTb",Config_PlzEnterCorrectEmail)){return false;}var e="";e="NewsLetterIDs="+c;var d=b+"Pages/Newletter/ThankYouNL.aspx?"+e+"&Name="+$$("SubNameTb").value.trim()+"&Email="+$$("SubEmailTb").value.trim();pageTracker._trackEvent("newsletterSub","Click");window.parent.location.href=d;return false;}function GetWeather(c,d){var b="";if(c!=null){b=c;}var e=Math.random()*11;AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?&random="+e+"&Flag=14&CountryName="+b+"&CountryCode="+d,callBackFromAjaxGetWeather,"get");}function callBackFromAjaxGetWeather(d){setCookieMin("BusWeather",d,60);var k=d.substring(d.indexOf('<div id="parent">'),d.length);var g=k.substring(17,k.indexOf("</div>"));if(g!=""){var n=g.split("~!~");if(n.length>6){setCookieDomain("c",n[6].trim().toLowerCase(),60,".maktoob.com");}var o=n[7].trim().toLowerCase();var f='<span class="fltlft">'+n[7].trim()+'</span><img src="Images/flags/'+o+'.gif" width="16" height="11" alt="'+n[7].trim()+'" title="'+n[7].trim()+'" />';if($$("divMainCountryDIV")!=null){$$("divMainCountryDIV").innerHTML=f;}var l;for(l=1;l<n.length;l++){var c=n[l].split(",");FillWeatherDay(l,c[0],c[1],c[2],c[3],c[4],c[5],c[6]);}var j=n[0];if(j.trim().toLowerCase()=="saudiarabia"){j="KSA";}if(j.trim().toLowerCase()=="dubai"){j="UAE";}var c=n[1].split(",");var b=c[3];var h=c[1];var e=c[4];if($$("weatherImageHi0")!=null){var m="Images/weather_images/20x20/"+b+".gif";$$("weatherImageHi0").src=m;$$("weatherImageHi0").title=e;}if($$("lblTempHi0")!=null){$$("lblTempHi0").innerHTML=h;}if($$("lblCountry")!=null){$$("lblCountry").innerHTML=j;}if($$("tdWeather")!=null){$$("tdWeather").style.display="block";$$("tdWeatherImg").style.display="block";}}}function FillWeatherDay(h,k,e,j,c,g,b,d){if($$("weatherImageHi"+h)!=null){var f="Images/weather_images/20x20/"+c+".gif";$$("weatherImageHi"+h).src=f;$$("weatherImageHi"+h).title=g;}if($$("weatherImageLow"+h)!=null){var f="Images/weather_images/20x20/"+b+".gif";$$("weatherImageLow"+h).src=f;$$("weatherImageLow"+h).title=d;}if($$("lblTempHi"+h)!=null){$$("lblTempHi"+h).innerHTML=e;}if($$("lblTempLow"+h)!=null){$$("lblTempLow"+h).innerHTML=j;}if($$("lblDay"+h)!=null){$$("lblDay"+h).innerHTML=k;}}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(e){if(e.length>25){var b=e.split("~!~")[1];b=b.substring(0,b.length-6);var d=e.replace('<div id="parent">',"");var c=d.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 d=c.length;if(d==undefined){if(c.checked){return c.value;}else{return"";}}for(var b=0;b<d;b++){if(c[b].checked){return c[b].value;}}return"";}function OpenGlobalPupUp(f,e,b,d){var c;var h=(screen.width/2)-(e/2);var g=(screen.height/2)-(b/2);c="height="+b+",width="+e+",left="+h+",top="+g+",toolbar=no,menubar=no,scrollbars=yes";window.open(f,d,c);}function testOsama(b,c){$$("NEWSMAKERSLnk").style.backgroundPosition=b+" "+c;}function ChangeClassNav(b){$$("NEWSMAKERSLnk").className=b;}function CreateIframeEmbed(b){document.write("<div style='height:270px;'><iframe  scrolling='no' frameborder='0' src='"+b+"' style='padding:0px;text-align:left;position:absolute;left:-10px;' width='404' height='272'></iframe></div>");}function DoLogin_new(){var b=Math.random()*11;AJAXGet(strLogicalPathJs+"pages/General/AjaxHandler.aspx?random="+guid()+"&Flag=15",callBackFromAjaxDoLogin_new,"get");}function callBackFromAjaxDoLogin_new(d){var b=d.substring(d.indexOf('<div id="parent">'),d.length);var c=b.substring(17,b.indexOf("</div>"));if(c!=""){var e=c.split("[CrumbID]")[1];$$("hdnCrumbID").value=e;}}function correctPNG(){var g=navigator.appVersion.split("MSIE");var h=parseFloat(g[1]);if((h>=5.5)&&(document.body.filters)){for(var d=0;d<document.images.length;d++){var e=document.images[d];var k=e.src.toUpperCase();if(k.substring(k.length-3,k.length)=="PNG"){var f=(e.id)?"id='"+e.id+"' ":"";var l=(e.className)?"class='"+e.className+"' ":"";var c=(e.title)?"title='"+e.title+"' ":"title='"+e.alt+"' ";var j="display:inline-block;"+e.style.cssText;if(e.align=="left"){j="float:left;"+j;}if(e.align=="right"){j="float:right;"+j;}if(e.parentElement.href){j="cursor:hand;"+j;}var b="<span "+f+l+c+' style="width:'+e.width+"px; height:"+e.height+"px;"+j+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"', sizingMethod='image');\"></span>";e.outerHTML=b;d=d-1;}}}}window.attachEvent("onload",correctPNG);