function addToBookmarks(url,title){window.external.AddFavorite(url,title);}
function clearContent(element,defaultValue){if(element.value==defaultValue)
element.value='';}
function cover(bottom,top,ignoreSize){var location=Sys.UI.DomElement.getLocation(bottom);top.style.top=location.y-2+'px';top.style.left=location.x+'px';if(!ignoreSize){top.style.height=bottom.offsetHeight+'px';top.style.width=bottom.offsetWidth+'px';}}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires='; expires='+date.toGMTString();}else{var expires='';}
document.cookie=name+'='+value+expires+'; path=/';}
function readCookie(name){var nameEQ=name+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,'',-1);}
function findPosX(element){var curLeft=0;if(element.offsetParent){while(1){curLeft+=element.offsetLeft;if(!element.offsetParent)break;element=element.offsetParent;}}else if(element.x)
curLeft+=element.x;return curLeft;}
function findPosY(element){var curTop=0;if(element.offsetParent){while(1){curTop+=element.offsetTop;if(!element.offsetParent)break;element=element.offsetParent;}}else if(element.y)
curTop+=element.y;return curTop;}
function focus(element){window.scrollTo(findPosX(element),findPosY(element));}
function widthToggle(){var fixedWidth=readCookie('FixedWidth');if(fixedWidth=='false'||fixedWidth==null){fixedWidth='true';}else{fixedWidth='false';}
createCookie('FixedWidth',fixedWidth,365);document.location.reload();}
function setEditorValue(id,value){var editor=FCKeditorAPI.GetInstance(id);editor.SetHTML(value);}
function validateEditorLength(sender,args){var editor=FCKeditorAPI.GetInstance(sender.controltovalidate);var maxLength=sender.maxLength!=null?sender.maxLength:10;args.IsValid=editor.GetXHTML(true).length<=maxLength;}
function validateEditorRequired(sender,args){var editor=FCKeditorAPI.GetInstance(sender.controltovalidate);args.IsValid=editor.GetXHTML(true).replace(/(\s|&nbsp;)+/,'').replace('<br />','')!='';}