
var sFormID=null;var sTextBoxID=null;var sButtID=null;function Copy_Link(D){var A=document.getElementById(D).value;document.getElementById(D).select();if(window.clipboardData){window.clipboardData.setData("Text",A)}else{var C="flashcopier";if(!document.getElementById(C)){var E=document.createElement("div");E.id=C;document.body.appendChild(E)}document.getElementById(C).innerHTML="";var B='<embed src="/flash/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(A)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';document.getElementById(C).innerHTML=B;alert("Copied to Clipboard")}}function getEl(A){return document.getElementById(A)}function InitVars(B,C,A){sFormID=B;sTextBoxID=C;sButtID=A}function FiredByInitializePage(){}function isFireFox(){var A=false;if(navigator.appName.toLowerCase()=="netscape"){A=true}return A}function IsNullField(formObj,fieldObj){var isNull=false;var initFieldObj=eval("document."+formObj+"."+fieldObj);if(initFieldObj.value.length==0){isNull=true}else{var reg=new RegExp(/\S/);if(reg.test(initFieldObj.value)==false){isNull=true}}return isNull}function IsPositiveNum(formObj,fieldObj){var boolNum=true;initFieldObj=eval("document."+formObj+"."+fieldObj);var validChars="0123456789.";var Char;for(i=0;i<initFieldObj.value.length;i++){Char=initFieldObj.value.charAt(i);if(validChars.indexOf(Char)==-1){boolNum=false;break}}return true}function GetNumCharPresence(F,D,B){var C=0;var A=F;if(B==true||B!=undefined){A=F.toLowerCase()}for(var E=0;E<A.length;E++){if(A.charAt(E)==D){C++}}return C}function IsFormObject(formName,FiledName){formObject=eval("document."+formName+"."+FiledName);if(!formObject){formObject=null}return formObject}function IsNumeric(formObj,fieldObj){var numericValue=false;initFieldObj=eval("document."+formObj+"."+fieldObj);reg=new RegExp(/^-{0,1}\d*\.{0,1}\d+$/);if(reg.test(initFieldObj.value)==true){numericValue=true}return numericValue}function fn_keySearch(E,F,B,A){keycode=(window.event)?event.keyCode:E.keyCode;var D=0;var C=document.getElementById("syndicationParam");if(C&&A){if(C.checked){D=1}}if(keycode==13){LinkToPage("","link_id=117");fn_Search(F,B,D);return false}}function DisplayWritingPagesLoadingLine(A){document.getElementById("LoadingLine").style.display="block";document.getElementById("LoadingLine").style.width=document.getElementById(A).clientWidth+"px"}function DisplayWritingPagesLoadingLineGenric(A,B){document.getElementById(B).style.display="block";document.getElementById(B).style.width=document.getElementById(A).clientWidth+"px"}function HideWritingPagesLoadingLine(A){document.getElementById("LoadingLine").style.display="none"}function normalizeSearchTitle(A){var B=A;B=B.toLowerCase();B=B.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ");B=B.replace(/-/g,"--");B=B.replace(/ /g,"-");return B}var clickedSearch=0;function fn_Search(C,F,B){var D=document.getElementById(C).value;var E;var G;var I="tags";if(B==1){I="syndication/tags"}if(clickedSearch==0){clickedSearch=clickedSearch+1;if(window.RegExp&&window.encodeURIComponent){if(F=="writers"||F=="authors"){I=F;if(B==1&&F=="authors"){I="syndication/"+F}E=sDomain}if(F==1){E=sDomain}if(F==2){var A=document.getElementById(sDDlLAng);E="http://"+A.value+"."+HostName+"/"}if(F==3){E=sDomain_Category;if(B==1){E=sDomain_Category.replace("/category-","/syndication/category-");I=I.replace("syndication/","")}}var H=D;H=normalizeSearchTitle(H);H=encodeURIComponent(H);if(H.length>0){location.href=E+I+"/"+H+"/";return true}else{return }return false}}}function MultiSearch(A){var C=sDomain;if(clickedSearch==0){clickedSearch=clickedSearch+1;if(window.RegExp&&window.encodeURIComponent&&A.length>0){var B=A;B=normalizeSearchTitle(B);B=encodeURIComponent(B);if(B.length>0){location.href=C+"tags/"+B.toLowerCase()+"/"}else{return }return false}}}function GetRadioButtonValue(D){var E=1;var A=document.getElementsByName(D);if(A){var B;for(var C=0;C<A.length;C++){B=A[C];if(B&&B.checked){E=B.value;break}}}return E}function TrimString(A){A=A.replace(/^\s+/g,"");return A.replace(/\s+$/g,"")}function leftTrim(B){var A=/\s*((\S+\s*)*)/;return B.replace(A,"$1")}function rightTrim(B){var A=/((\s*\S+)*)\s*/;return B.replace(A,"$1")}function trim(A){return leftTrim(rightTrim(A))}function calcHeightTable(){if(document.getElementById("writerPanel")){var A=document.getElementById("writeAbstractControl");var B=document.getElementById("writerPanel").clientHeight;A.style.height=B+"px"}}function redirectPage(A,D,E){tagsValue=document.getElementById(A).value;var C="";if(tagsValue!=""){C="v="+tagsValue+"&ai="+D+"&li="+E}var B="/portfolio/frmLogin.aspx?"+C;window.location.href=B}var linkObj=null;function GoogleLinkHoverStyle(A){var B=1;for(B=1;B<=4;B++){linkObj=document.getElementById(A.toString()+B.toString());linkObj.style.color="#2010FF";linkObj.style.textDecoration="underline"}}function GoogleLinkOutStyle(A){var B=1;for(B=1;B<=4;B++){linkObj=document.getElementById(A.toString()+B.toString());linkObj.style.color="#36312E";linkObj.style.textDecoration="none"}}function AddUnderline(A){A.style.textDecoration="underline"}function RemoveUnderline(A){A.style.textDecoration="none"}function encodeUrl(A){var D,C,E;E="";for(var B=0;B<=A.length-1;B++){var C=A.substring(B,B+1);D=C.toUpperCase();if(D!=encodeURIComponent(C).toUpperCase()){E+=encodeURIComponent(C).toUpperCase()}else{E+=encodeURIComponent(C)}}return E}function CDCook(C,E,F,D){var A="";var B="";if(F){B=new Date();B.setTime(B.getTime()+(F*24*60*60*1000));A="; expires="+B.toGMTString()}else{A=""}document.cookie=C+"="+E+A+((D)?"; domain="+D:"")+"; path=/"}function FindPos(A,C){try{var D=curtop=0;if(A.offsetParent){D=A.offsetLeft;curtop=A.offsetTop}while(A=A.offsetParent){D+=A.offsetLeft;curtop+=A.offsetTop}return[D,curtop]}catch(B){}}function moveSlot(G,A,L,H,K){try{var C=document.getElementById(A);var E=document.getElementById(G);var J=FindPos(C,K);var F=J[0];var D=J[1];E.style.left=0+"px";E.style.top=0+"px";E.style.visibility="";var M=false;for(i=0;i<E.childNodes.length;i++){if(E.childNodes[i].id){M=true;break}}if(M){C.style.height=L+"px"}else{C.style.height="0px"}if(!isFireFox()){C.appendChild(E)}else{var B=new RegExp(/<iframe/);if(B.test(E.innerHTML)==false){C.appendChild(E)}else{document.body.setAttribute("onresize","bodyResizeAdsSlots();");E.style.position="absolute";E.style.left=F+"px";E.style.top=D+"px"}}}catch(I){}}function AddCommentClicked(A){if(A=="True"){document.location.href="#commentAdd";return false}else{return true}}function setSyndication(){var A=document.getElementsByName("searchParam");if(A[2].checked==true){if(document.getElementById("syndicationParam")){document.getElementById("syndicationParam").checked=false;document.getElementById("syndicationParam").disabled=true}}else{if(document.getElementById("syndicationParam")){document.getElementById("syndicationParam").disabled=false}}}function dispayMoreTags(A){var B=document.getElementById("MoreTagsBox");if(B){document.getElementById("MoreTagsBox").style.display="block";A.style.display="none"}}function LP(A,D,F,C){var E=window.event;var B;if(window.event){if(E.srcElement){B=E.srcElement}if(B.tagName.toLowerCase()=="a"||B.tagName.toLowerCase()=="img"){if(F.length>0&&B.className==F){LinkToPage(C,"link_id="+D)}else{if(F.length==0){LinkToPage(C,"link_id="+D)}}}return }else{if(A.target){B=A.target;if(B.tagName.toLowerCase()=="a"||B.tagName.toLowerCase()=="img"){if(F.length>0&&B.className==F){LinkToPage(C,"link_id="+D)}else{if(F.length==0){LinkToPage(C,"link_id="+D)}}}return }}if(B.nodeType==3){B=B.parentNode;if(B.tagName.toLowerCase()=="a"||B.tagName.toLowerCase()=="img"){if(F.length>0&&B.className==F){LinkToPage(C,"link_id="+D)}else{if(F.length==0){LinkToPage(C,"link_id="+D)}}}return }}function LinkToPage(B,D){var C="";var A="";if(document.getElementById(countLinkID)){if(abstractID.length>0){C="&abstractID="+abstractID}if(pageName.length>0){A="&pageName="+pageName}document.getElementById(countLinkID).src="/CountLink.aspx?"+D+C+A}if(B!=""){location.href=B}}function counttag(B,A,C){LTP("110");
if(B!=""&&A!=""){if(document.getElementById(countLinkID)){document.getElementById(countLinkID).src="/CountLink.aspx?tag="+encodeURIComponent(B)+"&type="+A+"&id="+C}}}function LTP(A){LinkToPage("","link_id="+A)}function LoginByPressEnter(C,A){var B=(window.event)?event.keyCode:C.keyCode;if(IsNullField("Form1",txtUserName)==false&&IsNullField("Form1",txtPassword)==false){if(B==13){document.forms[0].action=A;document.forms[0].submit()}}}function ifIE6(){var A=(navigator.userAgent.indexOf("MSIE 6")>=0)?true:false;return A}function isFireFox(){var C=false;var B=navigator.userAgent.toLowerCase();if(B.indexOf("firefox")!=-1){C=true}return C}function getInternetExplorerVersion(){var C=-1;if(navigator.appName=="Microsoft Internet Explorer"){var A=navigator.userAgent;var B=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(B.exec(A)!=null){C=parseFloat(RegExp.$1)}}return C}function setCommentLoader(){stripHTML(document.getElementById(txtComment));Page_ClientValidate("CommentGroup");if(Page_ClientValidate("CommentGroup")){document.getElementById("LoadingLineAddComment").style.display="inline";document.getElementById("closeIfram").style.display="none";document.getElementById(pnlAddComments).style.display="none";document.getElementById(lnkSendComment).style.display="none";DisplayWritingPagesLoadingLineGenric(lnkSendComment,"LoadingLineAddComment")}}function stripHTML(){var A=/<\S[^><]*>/g;for(i=0;i<arguments.length;i++){arguments[i].value=arguments[i].value.replace(A,"")}}function makeRejectedDirtyWordDIV(C){var A=document.createElement("DIV");A.name="generated_input"+C;A.id="generated_input_DirtyWordDIV";A.innerHTML=alertMessageDirtyWord;A.className="DirtyWordDIV";var B=document.getElementById(C);B.appendChild(A)};
var clickCount=0;var clickCountLoginP=0;sfHover=function(){var B=document.getElementById("mainNav").getElementsByTagName("LI");for(var A=0;A<B.length;A++){B[A].onmouseover=function(){this.className+=" sfhover"};B[A].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}};documentOnClick=function(){if(document.getElementById){if(document.getElementById("lang")){if(document.getElementById("lang").style.display=="block"&&clickCount>1){document.getElementById("lang").style.display="none";clickCount=0}if(document.getElementById("lang").style.display=="block"){++clickCount}}var A=document.getElementById("LoginPane");if(A){if(A.className=="loginFormHdr"&&clickCountLoginP>1){ShowHideLoginPane();clickCountLoginP=0}if(A.className=="loginFormHdr"){++clickCountLoginP}}}};function NeutralClick(){clickCountLoginP=1}function CheckNumberPages(C,A){var E;var D;var B;if(window.event){E=C.keyCode}else{if(C.which){E=C.which}}D=String.fromCharCode(E);B=/\d/;return B.test(D)&&A<100000}function CheckSummaryYear(C,A){var E;var D;var B;if(window.event){E=C.keyCode}else{if(C.which){E=C.which}}D=String.fromCharCode(E);B=/\d/;var F=A+D;if(C.keyCode!=8&&C.keyCode!=46){return B.test(D)&&(parseInt(F,10)<=new Date().getFullYear())}else{return true}}function HideDropDown(){if(document.getElementById){if(document.getElementById("lang")){document.getElementById("lang").style.display="none"}}}function SwitchClasses(C,B,A){if(document.getElementById(C).className==B){PlaceClass(C,A)}else{PlaceClass(C,B)}}function ShowHideLoginPane(){SwitchClasses("LoginPane","loginFormHdr","loginFormHdrHidden");if(document.getElementById("LoginPane").className=="loginFormHdr"){++clickCountLoginP}else{clickCountLoginP=0}}var MainCategoriesIDsHides=new Array();MainCategoriesIDsHides[0]="3894";MainCategoriesIDsHides[1]="3";MainCategoriesIDsHides[2]="3895";function movePanel(C,D,A){var B=document.getElementById(D);if(C){B.style.left="0px"}else{B.style.left="-"+A+"px"}}function SlideMainHide_Categories(C,D,E){var A;var B=false;for(A=0;A<MainCategoriesIDsHides.length;A++){if(C==MainCategoriesIDsHides[A]){B=true;break}}if(B){move_Panel(E,D);return false}else{move_Panel(D,E);return false}}function move_Panel(C,A){var E=document.getElementById(C);var B=document.getElementById(A);try{E.style.display="block";B.style.display="none"}catch(D){}}function ShowHideDropDown(B){if(document.getElementById){if(document.getElementById(B).style.display=="block"){document.getElementById(B).style.display="none";clickCount=0}else{document.getElementById(B).style.display="block";++clickCount}}var A=document.getElementById("exitTrafficBoxTop");if(A){closeBoxTop("exitTrafficBoxTop",-500,true)}}function CDCook(C,E,F,D){var A="";var B="";if(F){B=new Date();B.setTime(B.getTime()+(F*24*60*60*1000));A="; expires="+B.toGMTString()}else{A=""}document.cookie=C+"="+E+A+((D)?"; domain="+D:"")+"; path=/"}function PlaceClass(B,A){if(document.getElementById){document.getElementById(B).className=A}}function ClearDefaultTextOnFocus(A,B,C){if(C==1){if(document.getElementById(A)){if(document.getElementById(A).value==B){document.getElementById(A).value=""}}}}function SetDefaultTextOnBlur(A,B,C){if(C==1){if(document.getElementById(A)){if(document.getElementById(A).value==""){document.getElementById(A).value=B}}}}function SetDefaultTextOnLoad(A,B,C){if(C==1){if(document.getElementById(A)){if(document.getElementById(A).value==""){document.getElementById(A).value=B}}}}function fn_ForgetPassword(){var A=window.open("/portfolio/frmResetPassword.aspx","pop_help","height=360,width=550,top=20,left=20,resizable=no,scrollbars=1");A.focus()}sfHoverBtm=function(){sfHover();var B=document.getElementById("mainNavBottom").getElementsByTagName("LI");for(var A=0;A<B.length;A++){B[A].onmouseover=function(){this.className+=" sfhover"};B[A].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}};sfHoverTower=function(){var B=document.getElementById("divNavigTower").getElementsByTagName("LI");for(var A=0;A<B.length;A++){B[A].onmouseover=function(){this.className+=" sfhover"};B[A].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}};sfHoverMenu=function(){var B=document.getElementById("divNavigHover").getElementsByTagName("LI");for(var A=0;A<B.length;A++){B[A].onmouseover=function(){this.className+=" sfhover"};B[A].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}};