var arAE=new Array();function CElementVisibilityAnimation(q){this.Element=q;this.OnShow=null;this.OnShowParameter=null;this.OnHide=null;this.OnHideParameter=null;this.MinVisibility=0;this.MaxVisibility=100;this.Show=function(){q.style.display="";q.style.opacity=this.MinVisibility;q.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+this.MinVisibility+");";f1(q,this.MinVisibility,true,this.OnShow,this.OnShowParameter,this.MinVisibility,this.MaxVisibility);};this.Hide=function(){q.style.display="";q.style.opacity=this.MaxVisibility/100;q.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+this.MaxVisibility+");";f1(q,this.MaxVisibility,false,this.OnHide,this.OnHideParameter,this.MinVisibility,this.MaxVisibility);};}function AnimateElementVisibility(q,w,e,r,t,y,u){return f1(q,w,e,r,t,y,u);}function f1(q,w,e,r,t,y,u){var i=q.getAttribute("id");arAE[i]=new Array();arAE[i]["Element"]=q;arAE[i]["OnEndParameter"]=t;var o=(e)?(w+20):(w-20);if(o>=y&&o<=u){q.style.opacity=o/100;q.style.width=q.offsetWidth;q.style.height=q.offsetHeight;q.style.backgroundColor="white";q.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+o+");";setTimeout("f1(arAE['"+i+"']['Element'],"+o+","+((e)?"true":"false")+",'"+r+"',arAE['"+i+"']['OnEndParameter'],"+y+","+u+")",20);}else{arAE[i]=null;if(!e&&y==0)q.style.display="none";if(eval(r))eval(r+"(t);");}}function bfs(q,w){var e=new CBlockUpdater(f8(w,"b_"),q,"UpdateFavourite","bud");e.Send();}function bps(q,w){var e=new CBlockUpdater(f8(w,"b_"),q,"UpdatePrivacy","bud");e.Send();}function bud(q){f10(q.GetPropertyValue("Block"),q.GetResponseText());}function Bte(q){f2(q,"btec","btvc","emt");}function Btce(q){f2(q,"btvc","btec");}function Btcta(q){f2(q,"btc","btcuc");}function Btatc(q){f2(q,"btcuc","btc");}function Btatu(q){f2(q,"btuc","btc");}function Btuta(q){f2(q,"btc","btuc");}function Btctu(q){f2(q,"btuc","btcuc");}function _btt(q,w,e,r){return f2(q,w,e,r);}function f2(q,w,e,r){var t=f8(q,"b_");var y=f9(t,w+"_","table");var u=f9(t,e+"_","table");Btsa(u,y,r);}function Btsa(q,w,e){var r=new Object();r.Action=e;r.ShowContainer=w;var t=new CElementVisibilityAnimation(q);t.OnHide="Btoh";t.OnHideParameter=r;t.Hide();}function Btoh(q){var w=new CElementVisibilityAnimation(q.ShowContainer);w.OnShow="Btos";w.OnShowParameter=q;w.Show();}function Btos(q){if(q.Action=="emt"){var w=f9(q.ShowContainer,"btei_","input");w.focus();}}function Bts(q,w){var e=f8(q,"b_");var r=f9(e,"btei_","input");Btsr(w,r.value,e);}function Btsr(q,w,e){var r=new CBlockUpdater(e,q,"UpdateTags","Btosr");r.AddProperty("Tags",w);r.Send();}function Btosr(q){f10(q.GetPropertyValue("Block"),q.GetResponseText());}function Btkd(q,w){if(q==13){var e=f8(w,"b_");var r=f9(e,"bts_","img");r.click();}}function CBlockUpdater(q,w,e,r){this.Request=new CRequest();this.Request.GetHTML=true;this.Request.FilePath="Public/Controls/BlockUpdater/BlockUpdater.xml.php";this.Request.ObjectCode="BlockUpdater";this.Request.AddProperty("BlockObjectData",w);this.Request.AddProperty("Block",q);this.Request.AddProperty("Action",e);this.HandlerName=r;this.AddProperty=function(PropertyName,PropertyValue){this.Request.AddProperty(PropertyName,PropertyValue);};this.Send=function(){this.Request.Start(this.HandlerName);};}function InitializeHtmlArea(q){q+="_Html";var w=f7(q);var e=f3(q);if(typeof(w.nextSibling.innerText)!="undefined"){e.body.innerHTML=w.nextSibling.innerText;}else{e.body.innerHTML=w.nextSibling.textContent;}if(typeof(e.body.contentEditable)!="undefined"){e.body.contentEditable=true;}else{e.designMode="On";}}function GetHtmlAreaDocument(q){return f3(q);}function f3(q){if(document.getElementById(q).contentDocument){return document.getElementById(q).contentDocument;}else{return document.frames[q].document;}}function htac(q,w,e){q+="_Html";var r=f3(q);var t=(typeof(r.body.contentEditable)!="undefined");if(w=="hiliteColor"&&t)w="backColor";f3(q).execCommand(w,false,e);f7(q).contentWindow.focus();}function CRequest(){var q=window.location.hostname;if(q=="localhost"){this.ServerURL="http://ecastr.com/?";}else{this.ServerURL="http://"+q+"/?";}this.ObjectCode=null;this.FilePath=null;this.GetHTML=false;this.OnResponse=null;this.QueryString="AjaxRequest=1&";this.arProperties=new Array();this.Debug=false;this.AddProperty=function(PropertyName,PropertyValue,Send){if(typeof(Send)=="undefined")Send=true;var w=new Array();w["PropertyName"]=PropertyName;w["PropertyValue"]=PropertyValue;w["Send"]=PropertyValue;this.arProperties.push(w);};this.GetPropertyValue=function(PropertyName){for(var e=0;e<this.arProperties.length;e++){if(this.arProperties[e]["PropertyName"]==PropertyName){return this.arProperties[e]["PropertyValue"];}}return null;};this.Start=function(OnResponse){if(typeof(OnResponse)!="undefined")this.OnResponse=OnResponse;if(this.ObjectCode)this.AddProperty("_ObjectCode",this.ObjectCode);if(this.FilePath)this.AddProperty("_FilePath",this.FilePath);this.AddProperty("_GetHTML",(this.GetHTML)?"1":"0");var r=_CreateRequestObject();if(typeof(window._arRequests)=="undefined")window._arRequests=new Array();RequestIndex=window._arRequests.length;window._arRequests[RequestIndex]=new Object();window._arRequests[RequestIndex].XmlHttpRequestObject=r;window._arRequests[RequestIndex].RequestObject=this;for(var t=0;t<this.arProperties.length;t++){if(this.arProperties[t]["Send"])this.QueryString+=this.arProperties[t]["PropertyName"]+"="+encodeURIComponent(this.arProperties[t]["PropertyValue"])+"&";}r.onreadystatechange=new Function("if(window._arRequests["+RequestIndex+"].XmlHttpRequestObject.readyState==4){RequestResponse(window._arRequests["+RequestIndex+"]);}");r.open('POST',this.ServerURL,true);r.setRequestHeader('Content-Type','application/x-www-form-urlencoded;charset=UTF-8');r.send(this.QueryString);};this._XmlHttpRequestText=null;this._XmlHttpRequestXML=null;this.GetResponseText=function(){return this._XmlHttpRequestText;};this.GetResponseXml=function(){return this._XmlHttpRequestXML;};}function RequestResponse(q){if(q.XmlHttpRequestObject.responseText=="666"){window.open("http://ecastr.com/error/","_self");return false;}if(q.RequestObject.Debug){var w=window.open("about:blank","_blank");w.document.write(q.XmlHttpRequestObject.responseText);}if(q.RequestObject.OnResponse){q.RequestObject._XmlHttpRequestText=q.XmlHttpRequestObject.responseText;var e=q.XmlHttpRequestObject.responseXML;if(e.getElementsByTagName('Root').length){var r=e.getElementsByTagName('Root').item(0);q.RequestObject._XmlHttpRequestXML=f13(r);}eval(q.RequestObject.OnResponse+"(q.RequestObject);");}}function _CreateRequestObject(){var q=false;if(window.XMLHttpRequest){q=new XMLHttpRequest();if(q.overrideMimeType){q.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{q=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{q=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}return q;}function tcft(q,w,e){var r=q.parentNode.nextSibling.nextSibling;var t=r.nextSibling;var y=t.getElementsByTagName("DIV");var u=y.length;if(w){if(e.keyCode==40){var i=false;var o=null;for(var p=0;p<u;p++){var a=y[p];if(a.style.display!="none"){if(f6(a)){i=true;o=a;}else if(i){if(o){f5(o);}f4(a);return true;}}}}else if(e.keyCode==38){var s=null;for(var p=0;p<u;p++){var a=y[p];if(a.style.display!="none"){if(f6(a)&&s){f5(a);f4(s);return true;}s=a;}}}else if(e.keyCode==13){if(q.value.length>0){for(var p=0;p<u;p++){var a=y[p];if(f6(a)){var d=a.getElementsByTagName("A")[0];if(typeof(d.click)!="undefined"){d.click();}else{var g=d.href;var h=(d.target=="")?"_self":d.target;window.open(g,h);}return true;}}}}}else{var j=q.value.toLowerCase();if(typeof(q.PreviousValue)=="undefined")q.PreviousValue="";if(q.PreviousValue!=j){r.style.display="none";t.style.display="";var k=false;for(var p=0;p<u;p++){var a=y[p];var l=a.firstChild.title.toLowerCase();a.style.display=(l.indexOf(j)>=0)?"":"none";if(j.length>0&&!k&&a.style.display!="none"){f4(a);k=true;}else{f5(a);}}if(!k&&j.length>0){r.style.display="";t.style.display="none";}q.PreviousValue=j;}}return true;}function tcmi(q){return f4(q);}function f4(q){q.style.backgroundColor="#eaeaea";q.style.borderBottom="1px solid #999";}function tcui(q){return f5(q);}function f5(q){q.style.backgroundColor="";q.style.borderBottom="1px solid #f4f4f4";}function tcim(q){return f6(q);}function f6(q){return q.style.backgroundColor!="";}function OnTagKey(q){var w=f7("d"+q.id);var e=f7("r"+q.id);if(q.value.length==0){w.style.display="";e.style.display="none";}else if("Tag["+q.value+"]"==q.name){w.style.display="none";e.style.display="none";}else{w.style.display="none";e.style.display="";}}function GetElement(q){return f7(q);}function f7(q){return document.getElementById(q);}function GetSelectedText(q){var w='';if(window.getSelection){w=window.getSelection();}else if(document.getSelection){w=document.getSelection();}else if(document.selection){w=document.selection.createRange().text;}return w.toString();}function SaveObjectComment(q,w){var e=f7("CommentContent");var r=e.value;if(r.length==0){e.focus();return false;}f7("CommentSendButton").style.display="none";f7("CommentSendStatus").style.display="";var t=new CRequest();t.FilePath="Public/Controls/CommentBlock/CommentBlockSave.xml.php";t.GetHTML=true;t.ObjectCode="CommentBlockSave";t.AddProperty("ObjectCode",q);t.AddProperty("RecordID",w);t.AddProperty("Text",r);t.Start("OnSaveComment");}function OnSaveComment(q){f7("CommentsBlock").innerHTML=q.GetResponseText();}function GetParentElement(q,w){return f8(q,w);}function f8(q,w){var e=(w.substring(w.length-1)=="_");var r=q;while(r.tagName!="BODY"){if(r.id.length>0){if(e){if(r.id.substring(0,w.length)==w)return r;}else{if(r.id==w)return r;}}r=r.parentNode;}return r;}function GetElements(q,w){var e=(q.substring(q.length-1)=="_");if(!e){var r=document.all(q);return r;}else{var r=null;if(w){r=document.getElementsByTagName(w);}else{r=document.all;}var t=new Array();for(var y=0;y<r.length;y++){if(r[y].id.length==0)continue;if(r[y].id.substring(0,q.length)==q)t.push(r[y]);}return t;}}function GetChildElement(q,w,e){return f9(q,w,e);}function f9(q,w,e){if(e){var r=(w.substring(w.length-1)=="_");var t=q.getElementsByTagName(e);for(var y=0;y<t.length;y++){if(t[y].id.length>0){if(r){if(t[y].id.substring(0,w.length)==w)return t[y];}else{if(t[y].id==w)return t[y];}}}}else{}}function SetOuterHTML(q,w){return f10(q,w);}function f10(q,w){var e=document.createElement("div");e.style.display="none";e.innerHTML=w;e=q.parentNode.insertBefore(e,q);q.parentNode.insertBefore(e.firstChild,q);e.parentNode.removeChild(e);q.parentNode.removeChild(q);}function CheckArray(q){if(typeof(q)=="object"){if(typeof(q.length)!="undefined"&&q.length>0){return q;}else{return new Array(q);}}else{return new Array();}}function MergeArrays(q,w){for(var e in w)q.push(w[e]);return q;}function ReplaceText(q,w,e){return f11(q,w,e);}function f11(q,w,e){while(q.match(w))q=q.replace(w,e);return q;}function SetWindowHeight(){var q=0;var w=document.body.childNodes;for(var e=0;e<w.length;e++)q+=w[e].offsetHeight;window.resizeBy(0,q-document.body.clientHeight+2);}function InstallXPI(q,w,e,r){if(!window.InstallTrigger){q.innerHTML="seems like you're not using Firefox";return false;}var t=new Array();t[e]={URL:w,r:r,toString:function(){return this.ExtensionURL;}};InstallTrigger.install(t);}function fmoe(q,w){if(!q)return false;window.fmoee=q;if(window.fmet){f12(q,w);window.clearTimeout(window.fmet);}else{window.fmet=window.setTimeout('f12(f7("'+q.id+'"),"'+w+'");',700);}}function fmoel(q,w){return f12(q,w);}function f12(q,w){if(!window.fmoee)return false;if(typeof(window.fmep)=="undefined"||window.fmep==null){var e=document.createElement("DIV");e.style.position="absolute";e.style.border="1px solid #696969";e.style.backgroundColor="white";e.style.marginTop="15px";e.style.zIndex="100";e.style.width="10px";e.style.height="10px";e.style.fontSize="9px";e.style.padding="1px";window.fmep=q.parentNode.insertBefore(e,q.parentNode.firstChild);}window.fmep.innerHTML='<img style="display:none;" onload="this.style.display=\'\';this.parentNode.style.width=this.clientWidth+\'px\';this.parentNode.style.height=this.clientHeight+\'px\';" src="'+w+'">';}function fmoue(q){if(!q)return false;window.fmoee=null;if(window.fmet){window.clearTimeout(window.fmet);window.fmet=null;}window.fmet=window.setTimeout('fmouel(f7("'+q.id+'"));',300);}function fmouel(q){if(typeof(window.fmep)!="undefined"&&window.fmep!=null){try{window.fmep.parentNode.removeChild(window.fmep);}catch(e){}window.fmep=null;}if(window.fmet){window.clearTimeout(window.fmet);window.fmet=null;}}function fmce(q){window.open(q,"_blank");}function mms(q){if(typeof(window.omm)=="undefined")window.omm=null;if(window.omm!=null)window.omm.style.display="none";window.omm=f7(q);window.omm.style.display="";}function mmh(){if(window.omm!=null)window.omm.style.display="none";}function StopBubble(q){if(typeof(q.cancelBubble)!="undefined")q.cancelBubble=true;if(typeof(q.stopPropagation)!="undefined")q.stopPropagation();return false;}function XmlToObject(q){return f13(q);}function f13(q){if(typeof(q)=="undefined"||q==null)return null;var w=new Object();if(typeof(q.childNodes)!="undefined"){for(var e=0;e<q.childNodes.length;e++){var r=q.childNodes[e];if(typeof(r.childNodes)!="undefined"){if(r.childNodes.length==1&&(r.childNodes[0].nodeType==3||r.childNodes[0].nodeType==4)){var t=GetNodeValue(r);}else{var t=f13(r);}if(typeof(w[r.nodeName])!="undefined"){if(typeof(w[r.nodeName].length)=="undefined"||typeof(w[r.nodeName])=="string")w[r.nodeName]=new Array(w[r.nodeName]);w[r.nodeName].push(t);}else{w[r.nodeName]=t;}}}}return w;}function GetNodeValue(q){if(typeof(q.textContent)!="undefined")return q.textContent;if(typeof(q.text)!="undefined")return q.text;if(typeof(q.innerHTML)!="undefined")return q.innerHTML;return null;}