

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		{curleft += obj.x;}
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		{curtop += obj.y;}
	return curtop;
}




//this function only hides the drop down, this is for when the user clicks somewhere else on the page, not the link.
function HideDropDown()
{
 if (document.getElementById)
	{
	    document.getElementById('lang').style.display="none";
	}
}

function get_pos(linx, obj)
{
	
	var topx,leftx ;
    if (document.getElementById)
	{
		var W = document.body.clientWidth;
		if(obj =="lang")
		{
			if(browserDetect('firefox')) {topx = (findPosY(linx))+17;}
			else if(browserDetect('msie')) {topx = (findPosY(linx))+18;}
		
			if(W>950) {leftx = (findPosX(linx))-65;}
			else {leftx = (findPosX(linx))-65;}
		}
		else if(obj =="imagesId")
		{
			if(browserDetect('firefox')) {topx = (findPosY(linx))-223;}
			else if(browserDetect('msie')) {topx = (findPosY(linx))-205;}
		
			if(W>950) {leftx = (findPosX(linx))-180;}
			else  {leftx = (findPosX(linx))-180;}
		}


        document.getElementById(obj).style.left = leftx+'px';
        document.getElementById(obj).style.top = topx+'px';
	}
}


function gon()
{
	var W = document.body.clientWidth;
	
	

	if (W>994) 
	{
		if(document.getElementById("mainTable")){ document.getElementById("mainTable").style.width = "950px"; }
		if(document.getElementById("topId")) {document.getElementById("topId").style.width = "886px";}
		if(document.getElementById("bottomId")) {document.getElementById("bottomId").style.width = "892px";			}	
		if(document.getElementById("bottomUlId")) {document.getElementById("bottomUlId").className = "ul1024";}
		if(document.getElementById("left_side")) {document.getElementById("left_side").style.padding = "0px 10px 0px 32px;";}
		if(document.getElementById("left_sideTranslate")) {document.getElementById("left_sideTranslate").style.padding = "0px 10px 0px 32px;";		}
	}
	else  
	{
		if(document.getElementById("mainTable")) {document.getElementById("mainTable").style.width = "100%";}
		if(document.getElementById("topId")){ document.getElementById("topId").style.width = "750px";		}
		if(document.getElementById("bottomId")) {document.getElementById("bottomId").style.width = "750px";		}
		if(document.getElementById("bottomUlId")) {document.getElementById("bottomUlId").className = "ul800";		}
		if(document.getElementById("left_side")) {document.getElementById("left_side").style.padding = "0px 0px 0px 10px;";}
	}
	
	if(document.getElementById("mainPath"))
	{
		if (W>994) {document.getElementById("mainPath").style.width = "886px";}
		else {document.getElementById("mainPath").style.width = "750px";}
	}
	
	get_pos(document.getElementById('langHref'), 'lang');
	if(document.getElementById('imgHref')) {get_pos(document.getElementById('imgHref'), 'imagesId');	}
}

var winClix = true;	
var bix = false;

function show(linkx,obj) 
{
    get_pos(linkx, obj);
    if (document.getElementById)
	{
		if(!bix)
		{
			document.getElementById(obj).style.visibility = 'visible';
			bix = true;
			winClix = false;
		}
		else 
		{
			document.getElementById(obj).style.visibility = 'hidden';
			bix = false;
		}
	}
}

function hide()
{
    if( (document.getElementById) && (winClix) )
	{
	    document.getElementById('lang').style.visibility = 'hidden';
	    if(document.getElementById('imagesId'))
	        {
	            document.getElementById('imagesId').style.visibility = 'hidden';
	        }
	    bix = false;	
	}
	else 
    {
        winClix = true;
    }
}
	

function browserDetect(text) {
   var str = (navigator.userAgent.toLowerCase()).indexOf(text) + 1;
   var data = text;
   return str;
}

function popupOpener(fileName, widtha, heighta)
{
	widtha = parseInt(widtha);
	heighta = parseInt(heighta)-45;
	mapWindow = window.open(fileName,'','width='+widtha+',height='+heighta+',left=50,top=50, resizable=yes, toolbar=no, location=no, menubar=no, directories=no, status=no, scrollbars=yes');
	mapWindow.focus();
}



function resultsDiv()
{
	document.getElementById("resultsDiv").style.display = "block";
	document.getElementById("nerrowResults").style.display = "block";
}

//For PaymentOptions - used in frmRgister.aspx


function AddOption(objID, textOption, valueOption){
	var objectField = document.getElementById(objID);
	var item = new Option(textOption, valueOption);
	if(document.all){
	    objectField.add(item);	
	}
	else{
	    objectField.add(item, null);	
	}
}


function RemoveOption(objID){
	var fieldObj = document.getElementById(objID);
	
	if(fieldObj.length > -1){
		for(var i=fieldObj.length; i > -1; i--){
			fieldObj.remove(i);
		}
	}
}

function showPaymentOptions(ObjCountry, ObjddlCountry, ObjtrPaymentOptions, ObjtblPersonalDetails, ObjddlPayment)
{	
	var CountryFlag = document.getElementById(ObjCountry).value.split(',');
	if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])== 9)
	{
	   
		document.getElementById(ObjtrPaymentOptions).style.display = "none";
		document.getElementById(ObjtblPersonalDetails).style.display = "none";
	}
	else
	{
		document.getElementById(ObjtrPaymentOptions).style.display = "";
		
		
		if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])!= 0)
				{				
					document.getElementById(ObjtblPersonalDetails).style.display = "none";
					
					    RemoveOption(ObjddlPayment);
					    
					    AddOption(ObjddlPayment, itm0, 0);
					    AddOption(ObjddlPayment, itm1, 1);
					    AddOption(ObjddlPayment, itm2, 2);
					
                   
				}
			else if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])== 0)
			{    
				document.getElementById(ObjtblPersonalDetails).style.display = "none";
					
				
					RemoveOption(ObjddlPayment);    
	                AddOption(ObjddlPayment, itm0, 0);
					AddOption(ObjddlPayment, itm1, 1);
					AddOption(ObjddlPayment, itm2, 2);
					AddOption(ObjddlPayment, itm3, 3); 
				
			}					
	}
}

function showPaymentOptionsOnEditProfile(ObjCountry, ObjddlCountry, ObjtrPaymentOptions, ObjtblPersonalDetails, ObjddlPayment)
{
	var CountryFlag = document.getElementById(ObjCountry).value.split(',');
	if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])== 9)
	{
		document.getElementById(ObjtrPaymentOptions).style.display = "none";
		document.getElementById(ObjtblPersonalDetails).style.display = "none";
	}
	if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])!= 9)
	{
		document.getElementById(ObjtrPaymentOptions).style.display = "";
		
		if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])!= 0)
				{
					document.getElementById(ObjtblPersonalDetails).style.display = "none";
                    try
					{
					    RemoveOption(ObjddlPayment);
					    AddOption(ObjddlPayment, itm0, 0);
					    AddOption(ObjddlPayment, itm2, 1);
					}
					catch(e)
					{
					}

				}
			else if(parseInt(CountryFlag[document.getElementById(ObjddlCountry).selectedIndex])== 0)
				{
					document.getElementById(ObjtblPersonalDetails).style.display = "none";
                    try
					{
					    RemoveOption(ObjddlPayment);
					    AddOption(ObjddlPayment, itm0, 0);
					    AddOption(ObjddlPayment, itm1, 2);
					    AddOption(ObjddlPayment, itm2, 1);
					}
					catch(e)
					{
					}
				}
	}
}

function showPaymentOptionsMyProfile(objID, ObjCountry, ObjPersonalDetails, ObjPayment, ObjSelectedPayment)
{
	var CountryFlag = document.getElementById(objID).value.split(',');
	if(parseInt(CountryFlag[document.getElementById(ObjCountry).selectedIndex])== 9)
	{
		//document.getElementById(ObjPaymentOptions).style.display = "none";
		document.getElementById(ObjPersonalDetails).style.display = "none";
	}
	if(parseInt(CountryFlag[document.getElementById(ObjCountry).selectedIndex])!= 9)
	{	
		if(parseInt(CountryFlag[document.getElementById(ObjCountry).selectedIndex])!= 0)
				{
					document.getElementById(ObjPersonalDetails).style.display = "none";
                    try
					{
					    RemoveOption(ObjPayment);
					    AddOption(ObjPayment, itm0, -1);
					    AddOption(ObjPayment, itm1, 0);
					    AddOption(ObjPayment, itm2, 1);
					}
					catch(e)
					{
					}
				}
			else if(parseInt(CountryFlag[document.getElementById(ObjCountry).selectedIndex])== 0)
				{
					document.getElementById(ObjPersonalDetails).style.display = "none";
                    try
					{
					    RemoveOption(ObjPayment);
					    AddOption(ObjPayment, itm0, -1);
					    AddOption(ObjPayment, itm1, 0);
					    AddOption(ObjPayment, itm2, 1);
					    AddOption(ObjPayment, itm3, 2);
					}
					catch(e)
					{
					}
				}
	}
	document.getElementById(ObjSelectedPayment).value = -1;
	
	
}


function EditMyProfilePersonalDetails(ObjPaymaent, ObjPersonalDetails, ObjSelectedPayment)
{
    if(!(document.getElementById(ObjSelectedPayment).value != -1 && changeCountry != true))
    {	    	
	    changeCountry = true;	    
	}
	if(document.getElementById(ObjPaymaent).value == "2") 
    {
	    document.getElementById(ObjPersonalDetails).style.display = "block";
    }
    else 
    {
	    document.getElementById(ObjPersonalDetails).style.display = "none";
	    if (document.getElementById(ObjPaymaent).value == "0") 
	    {
	        showModalPopup("NoPaymentConfirmBehavior");
	    }
    } 
	document.getElementById(ObjSelectedPayment).value = document.getElementById(ObjPaymaent).value;
	
}
//For modal pop-ups
function showModalPopupOnEvent(ev, modalPopupName) 
{
    ev.preventDefault();
    var modalPopupBehavior = $find(modalPopupName);
    modalPopupBehavior.show();
}
//For modal pop-ups
function showModalPopup(modalPopupName) 
{
    var modalPopupBehavior = $find(modalPopupName);
    modalPopupBehavior.show();
}
//For modal pop-ups
function hideModalPopupOnEvent(ev, modalPopupName) 
{
    ev.preventDefault();
    var modalPopupBehavior = $find(modalPopupName);
    modalPopupBehavior.hide();
}


//For modal pop-ups
function hideModalPopup(modalPopupName) 
{
    var modalPopupBehavior = $find(modalPopupName);
    modalPopupBehavior.hide();
}
function onNoPaymentConfirm() 
{
    hideModalPopup("NoPaymentConfirmBehavior");
}
function onNoPaymentCancel(ObjPayment, objSelectedpaymentMethod, objPaymentDetails)
{
    document.getElementById(ObjPayment).selectedIndex = objSelectedpaymentMethod;
    if(document.getElementById(ObjPayment).value == "2") 
	{
		document.getElementById(objPaymentDetails).style.display = "block";
	}
    hideModalPopup("NoPaymentConfirmBehavior");
}
//For Personal Details - used in frmRgister.aspx
function showPersonalDetails(objDdlPayment,objTblPersonalDetails)
{
	if(document.getElementById(objDdlPayment).value == "3") 
	{
		document.getElementById(objTblPersonalDetails).style.display = "block";
	}
	else 
	{
		document.getElementById(objTblPersonalDetails).style.display = "none";
		if (document.getElementById(objDdlPayment).value == "1") 
		{
		    showModalPopup("NoPaymentConfirmBehavior");
		}
	}
}

//For Edit Personal Details - used in frmRgister.aspx
function EditPersonalDetails(objDdlPayment,objTblPersonalDetails)
{
	if(document.getElementById(objDdlPayment).value == "2") 
	{
		document.getElementById(objTblPersonalDetails).style.display = "block";
	}
	else 
	{
		document.getElementById(objTblPersonalDetails).style.display = "none";
		if (document.getElementById(objDdlPayment).value == "0") 
		{
		    showModalPopup("NoPaymentConfirmBehavior");
		}
	}
}
		

//For Agreement validation - used in frmRgister.aspx

function ValidateAgreeToTerms(source, arguments)
	{
		if (document.getElementById('chkAgree').checked)
		{
			arguments.IsValid = true;
		}
		else
		{
			arguments.IsValid = false;
		}
	}
	

function addbookmark()
{
bookmarkurl=document.location.href;
bookmarktitle=document.title;
if (document.all)
{window.external.AddFavorite(bookmarkurl,bookmarktitle);}
}

function fn_Invitefriend()
{
	document.location.href='/portfolio/frmInviteFriend.aspx';
	///var opn = window.open('/portfolio/frmInviteFriend.aspx','_BLANK','height=550 width=580 left=0 top=0 scrollbars=1');
	//opn.focus();
}

function fn_PaymentOption()
{
	var opn = window.open('/frmPaymentOptions.aspx','_BLANK','height=300 width=504 left=0 top=0 scrollbars=1');
	opn.focus();
}
function fn_Blogger()
{
	var opn = window.open('/frmBlogger.aspx','_BLANK','height=300 width=500 left=0 top=0 scrollbars=1');
	opn.focus();
}
function fn_whatareshvoongmessg()
{
	var opn = window.open('/frmShvoongMesg.aspx','_BLANK','height=300 width=504 left=0 top=0 scrollbars=1');
	opn.focus();
}

function fn_ExampleGoodAbstract()
{
 
	var opn = window.open('/frmHowToWritePopup.aspx','_BLANK','height=638 width=504 left=0 top=0 scrollbars=1');
	opn.focus();
}
function fn_WantEnjoyHigherProfits()
{
	var opn = window.open('/frmMarketingPopup.aspx','_BLANK','height=550 width=504 left=0 top=0 scrollbars=1');
	opn.focus();
}
function LinkToEarnMoney()
{
	var url= '/frmEarnMoney.aspx';
	var owin = window.open(url,'Title','width=555 height=520 left=0 top=0 scrollbars=1' );
	owin.focus(); 
}
function pageScroll()
 {
window.scroll(0,150); // horizontal and vertical scroll increments    	
}


function fRewardClick()
{
   document.location.href='/promotion/';

}
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"),"")}}};