/**
 *	Copyright (c) HenuSoft, All Rights Reserved.
 *	http://www.HenuSoft.se
 */

{HsBrowser=function(){try{this.isDOM=((typeof document.getElementById)!='undefined');this.isIE=((typeof document.all)!='undefined');this.isIE4=(!this.isDOM&&this.isIE);this.isNN4=((typeof document.layers)!='undefined');this.isSafari=(navigator.userAgent.indexOf('Safari')!=-1);this.isMozilla=(this.isDOM&&!this.isIE&&!this.isNN4&&!this.isSafari);this.isMac=(navigator.userAgent.indexOf('Mac')!=-1);this.isWin=(navigator.userAgent.indexOf('Win')!=-1);this.screenWidth=((typeof screen.width)=='undefined'?'na':screen.width);this.screenHeight=((typeof screen.height)=='undefined'?'na':screen.height);this.colors=((typeof screen.pixelDepth)=='undefined'?((typeof screen.colorDepth)=='undefined'?'na':screen.colorDepth):screen.pixelDepth);this.isJava=navigator.javaEnabled();this.referrer=(''+escape(document.referrer));}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsBrowser',ex));}
}
HsBrowser.newInstance=function(){try{window.hsBrowser=((typeof top.hsBrowser)=='object'?top.hsBrowser:new HsBrowser());if(window.hsBrowser==null){throw new Error('top.hsBrowser is null!');}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsBrowser.newInstance',ex));}
}
HsBrowser.newInstance();HsDebug=function(){try{this.debugElement=null;this.messageStack=new Array();this.isInitialized=false;this.isInitializing=false;this.isDebugging=false;}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug',ex));}
}
HsDebug.newInstance=function(){try{window.top.hsDebug.isDebugging=true;window.top.hsDebug.isInitializing=true;if((window.top.frames.length==0&&window.top.document.body!=null)||((typeof window.top.MainFrame)!='undefined'&&window.top.MainFrame.document.body!=null)){window.top.hsDebug.create();}else{setTimeout(HsDebug.newInstance,200);}
window.top.hsDebug.isDebugging=false;}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug.newInstance',ex));}
}
HsDebug.prototype.create=function(){try{this.isDebugging=true;var spanElement=newElement('span',(window.top.frames.length==0?window.top:window.top.MainFrame).document.body,null,'id=HsDebugElement','zIndex=999999998','style-position=absolute','style-width=100%','style-height=100px','left=0px','bottom=2px');this.debugElement=newElement('textarea',spanElement,null,'id=HsDebugTextArea','zIndex=999999999','style-width=100%','style-height=100%');this.debugElement.value='### HsDebug ###\n';show.call(spanElement);HsDebug.onMoveEvent();attachEvent.call((window.top.frames.length==0?window.top:window.top.MainFrame).document,'scroll',HsDebug.onMoveEvent);attachEvent.call(window,'resize',HsDebug.onMoveEvent);this.isInitializing=false;this.isInitialized=true;this.isDebugging=false;}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug.prototype.create',ex));}
}
HsDebug.isInitialized=function(){try{window.top.hsDebug.isDebugging=true;var rIsInitialized=false;if(window.top.hsDebug.isInitialized&&!window.top.hsDebug.isInitializing){if((window.top.frames.length==0&&window.top.document.body!=null)||((typeof window.top.MainFrame)!='undefined'&&window.top.MainFrame.document.body!=null)){if(findElementById('HsDebugTextArea',(window.top.frames.length==0?window.top:window.top.MainFrame).document)==null){HsDebug.newInstance();}else{rIsInitialized=true;}
}else{HsDebug.newInstance();}
}
window.top.hsDebug.isDebugging=false;return rIsInitialized;}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug.prototype.create',ex));}
}
HsDebug.print=function(){try{window.top.hsDebug.isDebugging=true;if(HsDebug.isInitialized()){var message=window.top.hsDebug.messageStack.pop();findElementById('HsDebugTextArea',(window.top.frames.length==0?window.top.document:window.top.MainFrame.document)).value+=(message+'\n');if((typeof console)!='undefined'){console.debug(message);}
}else{setTimeout(HsDebug.print,200);}
window.top.hsDebug.isDebugging=false;}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug.print',ex));}
}
HsDebug.onMoveEvent=function(aEvent){try{window.top.hsDebug.isDebugging=true;var documentElement=((typeof this.body)=='undefined'?(window.top.frames.length==0?window.top.document:window.top.MainFrame.document):this);debugElement=findElementById('HsDebugElement',documentElement);if(debugElement!=null){calculateGraphics.call(debugElement,documentElement);moveTo.call(debugElement,debugElement.graphics.left,(documentElement.body.scrollTop+documentElement.body.clientHeight-debugElement.graphics.height-2),this);}
window.top.hsDebug.isDebugging=false;}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug.onMoveEvent',ex));}
}
HsDebug.debug=function(aMessage){try{if((typeof aMessage)=='undefined'){throw new Error('\'aMessage\' is a undefined parameter!');}
if((typeof window.top.hsDebug)=='undefined'){window.top.hsDebug=new HsDebug();}
if(!window.top.hsDebug.isDebugging){if(!window.top.hsDebug.isInitialized&&!window.top.hsDebug.isInitializing){HsDebug.newInstance();}
window.top.hsDebug.messageStack.push(aMessage);HsDebug.print();}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','HsDebug.debug',ex));}
}
Array.prototype.indexOf=function(aObject){try{if((typeof aObject)=='undefined'){throw new Error('\'aObject\' is a undefined parameter!');}
var rIndex=-1;if(this.length>0){for(var index=0;index<this.length;index++){if((typeof this[index])!='undefined'){var isArray=(this[index].constructor.toString().indexOf('Array')!=-1);if((isArray&&this[index][0]==aObject)||(!isArray&&this[index]==aObject)){rIndex=index;break;}
}
}
}
return rIndex;}catch(ex){throw new Error(createErrorMessage('HsScript.js','Array.prototype.contains',ex));}
}
Array.prototype.contains=function(aObject){try{if((typeof aObject)=='undefined'){throw new Error('\'aObject\' is a undefined parameter!');}
return(this.indexOf(aObject)!=-1);}catch(ex){throw new Error(createErrorMessage('HsScript.js','Array.prototype.contains',ex));}
}
String.prototype.startsWith=function(aString){try{if((typeof aString)=='undefined'){throw new Error('\'aString\' is a undefined parameter!');}
var filter=new RegExp(('^'+aString+'+'));return filter.test(this);}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.startsWith',ex));}
}
String.prototype.endsWith=function(aString){try{if((typeof aString)=='undefined'){throw new Error('\'aString\' is a undefined parameter!');}
var filter=new RegExp((aString+'+$'));return filter.test(this);}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.endsWith',ex));}
}
String.prototype.isEmpty=function(){try{return(this.length==0);}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.isEmpty',ex));}
}
String.transformXmlCode=function(aXmlCode){try{if((typeof aXmlCode)=='undefined'){throw new Error('\'aXmlCode\' is a undefined parameter!');}
return String.fromCharCode(aXmlCode.substring(2,(aXmlCode.length-1)).toInt());}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.transformXmlCode',ex));}
}
String.prototype.transformXml=function(){try{return this.replace(/(&#\d+;)/g,String.transformXmlCode);}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.transformXml',ex));}
}
String.prototype.trim=function(){try{return this.replace(/^\s+|\s+$/g,'');}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.trim',ex));}
}
String.prototype.leftTrim=function(){try{return this.replace(/^\s+/,'');}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.leftTrim',ex));}
}
String.prototype.rightTrim=function(){try{return this.replace(/\s+$/,'');}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.rightTrim',ex));}
}
String.prototype.toInt=function(){try{var rInt=parseInt(this.trim().replace(/^0+/,''));return(isNaN(rInt)?0:rInt);}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.toInt',ex));}
}
String.prototype.toLower=function(){try{return this.toLowerCase();}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.toLower',ex));}
}
String.prototype.toUpper=function(){try{return this.toUpperCase();}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.toUpper',ex));}
}
String.prototype.padLeft=function(aLength,aCharacter){try{if((typeof aLength)=='undefined'){throw new Error('\'aLength\' is a undefined parameter!');}else if((typeof aCharacter)=='undefined'){throw new Error('\'aCharacter\' is a undefined parameter!');}
var rString=this;if(this.length>aLength){rString=rString.substring((this.length-aLength),this.length);}else if(this.length<aLength){for(var i=0;i<(aLength-this.length);i++){rString=(aCharacter+rString);}
}
return rString;}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.padLeft',ex));}
}
String.prototype.padRight=function(aLength,aCharacter){try{if((typeof aLength)=='undefined'){throw new Error('\'aLength\' is a undefined parameter!');}else if((typeof aCharacter)=='undefined'){throw new Error('\'aCharacter\' is a undefined parameter!');}
var rString=this;if(this.length>aLength){rString=rString.substring(0,aLength);}else if(this.length<aLength){for(var i=0;i<(aLength-this.length);i++){rString+=aCharacter;}
}
return rString;}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.padRight',ex));}
}
String.prototype.left=function(aLength){try{if((typeof aLength)=='undefined'){throw new Error('\'aLength\' is a undefined parameter!');}
var rString=this;if(aLength>0&&this.length>aLength){rString=rString.substring(0,aLength);}else if(aLength<0){rString=rString.substring((aLength*-1),rString.length);}
return rString;}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.left',ex));}
}
String.prototype.right=function(aLength){try{if((typeof aLength)=='undefined'){throw new Error('\'aLength\' is a undefined parameter!');}
var rString=this;if(aLength>0&&this.length>aLength){rString=rString.substring((rString.length-aLength),rString.length);}else if(aLength<0){rString=rString.substring(0,(rString.length+aLength));}
return rString;}catch(ex){throw new Error(createErrorMessage('HsScript.js','String.prototype.right',ex));}
}
Date.newDate=function(aYear,aMonth,aDay){try{if((typeof aYear)=='undefined'){throw new Error('\'aYear\' is a undefined parameter!');}else if((typeof aMonth)=='undefined'){throw new Error('\'aMonth\' is a undefined parameter!');}else if((typeof aDay)=='undefined'){throw new Error('\'aDay\' is a undefined parameter!');}
return new Date(Date.UTC(aYear,(aMonth-1),aDay,0,0,0));}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.newDate',ex));}
}
Date.prototype.addDays=function(aCount){try{if((typeof aCount)=='undefined'){throw new Error('\'aCount\' is a undefined parameter!');}
this.setDate((this.getDate()+aCount));}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.addDays',ex));}
}
Date.prototype.addWeeks=function(aCount){try{if((typeof aCount)=='undefined'){throw new Error('\'aCount\' is a undefined parameter!');}
this.setDate((this.getDate()+(7*aCount)));}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.addWeeks',ex));}
}
Date.prototype.addMonths=function(aCount){try{if((typeof aCount)=='undefined'){throw new Error('\'aCount\' is a undefined parameter!');}
this.setMonth((this.getMonth()+aCount));}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.addMonths',ex));}
}
Date.prototype.addYears=function(aCount){try{if((typeof aCount)=='undefined'){throw new Error('\'aCount\' is a undefined parameter!');}
this.setFullYear((this.getFullYear()+aCount));}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.addYears',ex));}
}
Date.prototype.getWeekDay=function(){try{return((this.getDay()==0?7:this.getDay())-1);}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.getWeekDay',ex));}
}
Date.prototype.getWeekNumber=function(){try{var thisDate=Date.newDate(this.getFullYear(),(this.getMonth()+1),this.getDate());thisDate.setDate((thisDate.getDate()-thisDate.getWeekDay()+3));var thisMilliseconds=thisDate.valueOf();thisDate.setMonth(0);thisDate.setDate(4);return(Math.round(((thisMilliseconds-thisDate.valueOf())/(7*864e5)))+1);}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.getWeekNumber',ex));}
}
Date.prototype.formatDate=function(aDateFormat){try{if((typeof aDateFormat)=='undefined'){throw new Error('\'aDateFormat\' is a undefined parameter!');}
var rDateString=null;if(aDateFormat!=null&&(typeof aDateFormat)=='string'){rDateString=aDateFormat.replace('yyyy',this.getFullYear());rDateString=rDateString.replace('MM',(''+(this.getMonth()+1)).padLeft(2,'0'));rDateString=rDateString.replace('dd',(''+this.getDate()).padLeft(2,'0'));}
return rDateString;}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.formatDate',ex));}
}
Date.parseDate=function(aDateString,aDateFormat){try{if((typeof aDateString)=='undefined'){throw new Error('\'aDateString\' is a undefined parameter!');}else if((typeof aDateFormat)=='undefined'){throw new Error('\'aDateFormat\' is a undefined parameter!');}
var rDate=null;var yearPosition=aDateFormat.indexOf('yyyy');var monthPosition=aDateFormat.indexOf('MM');var dayPosition=aDateFormat.indexOf('dd');if(yearPosition==-1||monthPosition==-1||dayPosition==-1){throw new Error('\'aDateFormat\' is in invalid format!');}else{rDate=Date.newDate(aDateString.substring(yearPosition,(yearPosition+4)),aDateString.substring(monthPosition,(monthPosition+2)),aDateString.substring(dayPosition,(dayPosition+2)));}
return rDate;}catch(ex){throw new Error(createErrorMessage('HsScript.js','Date.prototype.parseDate',ex));}
}
function calculateGraphics(aDocument){try{var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null&&(typeof currentElement.offsetParent)!='unknown'){var oldDisplay=currentElement.style.display;var positionX=null;var positionY=null;if(hsBrowser.isDOM||hsBrowser.isIE4){var tempElement=currentElement;positionX=0;positionY=0;while(tempElement.offsetParent!=null){positionX+=tempElement.offsetLeft;positionY+=tempElement.offsetTop;tempElement=tempElement.offsetParent;}
}
if(hsBrowser.isMac&&hsBrowser.isIE){positionX+=document.body.leftMargin;positionY+=document.body.topMargin;}
var graphics=new Object();graphics.left=positionX;graphics.top=positionY;currentElement.style.display='block';graphics.width=currentElement.offsetWidth;graphics.height=currentElement.offsetHeight;currentElement.style.display=oldDisplay;graphics.right=(graphics.left+graphics.width);graphics.bottom=(graphics.top+graphics.height);currentElement.graphics=graphics;}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','calculateGraphics',ex));}
}
function moveTo(aPositionX,aPositionY,aDocument){try{if((typeof aPositionX)=='undefined'){throw new Error('\'aPositionX\' is a undefined parameter!');}else if((typeof aPositionY)=='undefined'){throw new Error('\'aPositionY\' is a undefined parameter!');}
var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){if(hsBrowser.isDOM){currentElement.style.left=parseInt(aPositionX);currentElement.style.top=parseInt(aPositionY);}else if(hsBrowser.isIE4){currentElement.style.pixelLeft=parseInt(aPositionX);currentElement.style.pixelTop=parseInt(aPositionY);}
calculateGraphics.call(currentElement);}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','moveTo',ex));}
}
function hide(aDocument){try{var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){currentElement.style.visible=false;currentElement.style.display='none';}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','hide',ex));}
}
function show(aDocument){try{var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){currentElement.style.visible=true;currentElement.style.display='';}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','show',ex));}
}
function disable(aDocument){try{var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){currentElement.disabled=true;}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','disable',ex));}
}
function enable(aDocument){try{var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){currentElement.disabled=false;}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','enable',ex));}
}
function removeAllChilds(aDocument){try{var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null&&currentElement.hasChildNodes()){while(currentElement.childNodes.length>0){currentElement.removeChild(currentElement.firstChild);}
}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','removeAllChilds',ex));}
}
function containsClass(aClassName,aDocument){try{if((typeof aClassName)=='undefined'){throw new Error('\'aClassName\' is a undefined parameter!');}
var rIsFound=false;var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){rIsFound=new RegExp(('(^|)'+aClassName+'(|$)')).test(currentElement.className);}
return rIsFound;}catch(ex){throw new Error(createErrorMessage('HsScript.js','containsClass',ex));}
}
function attachClass(aClassName,aDocument){try{if((typeof aClassName)=='undefined'){throw new Error('\'aClassName\' is a undefined parameter!');}
var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null&&!containsClass.call(currentElement,aClassName)){if(currentElement.className.isEmpty()){currentElement.className=aClassName;}else{currentElement.className+=(' '+aClassName);}
}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','attachClass',ex));}
}
function detachClass(aClassName,aDocument){try{if((typeof aClassName)=='undefined'){throw new Error('\'aClassName\' is a undefined parameter!');}
var currentElement=((typeof this.id)=='string'?this:findElementById(this,aDocument));if(currentElement!=null){var filter=new RegExp(('(^|)'+aClassName+'(|$)'));var classNames=currentElement.className;classNames=classNames.replace(filter,'$1');classNames=classNames.replace(/ $/,'');currentElement.className=classNames;}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','detachClass',ex));}
}
function attachEvent(aEventName,aFunction,aDocument){try{if((typeof aEventName)=='undefined'){throw new Error('\'aEventName\' is a undefined parameter!');}else if((typeof aFunction)=='undefined'){throw new Error('\'aFunction\' is a undefined parameter!');}
if(aEventName=='resize'){window.onresize=aFunction;}else{var currentElement=((typeof this.nodeName)!='undefined'&&this.nodeName.toLower()=='#document'?this:((typeof this.id)=='string'?this:findElementById(this,aDocument)));if(currentElement!=null){if((typeof currentElement.addEventListener)!='undefined'){currentElement.addEventListener(aEventName,aFunction,true);}else{if(aEventName=='scroll'){this.body.onscroll=aFunction;}else{if((typeof currentElement.attachEvent)!='undefined'){var tempFunction=(aEventName+aFunction);currentElement[('e'+tempFunction)]=aFunction;currentElement[tempFunction]=function(aEvent){if((typeof aEvent)=='undefined'){aEvent=window.event;}
currentElement[('e'+tempFunction)](aEvent);}
currentElement.attachEvent(('on'+aEventName),currentElement[tempFunction]);}else{var eventName=('on'+aEventName);if((typeof currentElement[eventName])=='function'){var oldEvent=currentElement[eventName];currentElement[eventName]=function(){oldEvent();return aFunction();}
}else{currentElement[eventName]=aFunction;}
}
}
}
}
}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','attachEvent',ex));}
}
function detachEvent(aEventName,aFunction,aDocument){try{if((typeof aEventName)=='undefined'){throw new Error('\'aEventName\' is a undefined parameter!');}else if((typeof aFunction)=='undefined'){throw new Error('\'aFunction\' is a undefined parameter!');}
var currentElement=(this==document?this:((typeof this.id)=='string'?this:findElementById(this,aDocument)));if(currentElement!=null){if((typeof currentElement.removeEventListener)!='undefined'){currentElement.removeEventListener(aEventName,aFunction,true);}else if((typeof currentElement.attachEvent)!='undefined'){var tempFunction=(aEventName+aFunction);currentElement.detachEvent(('on'+aEventName),currentElement[tempFunction]);currentElement[('e'+tempFunction)]=null;currentElement[tempFunction]=null;}else{currentElement[('on'+aEventName)]=null;}
}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','detachEvent',ex));}
}
function debug(aMessage){try{HsDebug.debug(aMessage);}catch(ex){throw new Error(createErrorMessage('HsScript.js','debug',ex));}
}
function stopEvent(aEvent){try{var currentEvent=((typeof aEvent)=='undefined'?window.event:aEvent);if(currentEvent!=null){currentEvent.returnValue=false;if((typeof currentEvent.preventDefault)!='undefined'){currentEvent.preventDefault();}
if((typeof currentEvent.stopPropagation)!='undefined'){currentEvent.stopPropagation();}else{currentEvent.cancelBubble=true;}
}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','stopEvent',ex));}
}
function getEvent(aEvent){try{var rEvent=((typeof aEvent)=='undefined'?window.event:aEvent);if(rEvent!=null){if((typeof rEvent.keyCode)=='undefined'){if((typeof rEvent.which)!='undefined'){rEvent.keyCode=rEvent.which;}else{rEvent.keyCode=null;}
}
if((typeof rEvent.target)=='undefined'){rEvent.target=rEvent.srcElement;}
if(rEvent.target!=null){while(rEvent.target.nodeType==3&&rEvent.target.parentNode!=null){rEvent.target=rEvent.target.parentNode;}
}
}
return rEvent;}catch(ex){throw new Error(createErrorMessage('HsScript.js','getEvent',ex));}
}
function findElementById(aElementId,aDocument){try{if((typeof aElementId)=='undefined'){throw new Error('\'aElementId\' is a undefined parameter!');}
var rElement=null;if(aElementId!=null){var currentDocument=((typeof aDocument)=='undefined'?document:aDocument);if(currentDocument!=null){if((typeof currentDocument.getElementById)!='undefined'){rElement=currentDocument.getElementById(aElementId);}else{rElement=currentDocument.all[aElementId];}
}
}
return rElement;}catch(ex){throw new Error(createErrorMessage('HsScript.js','findElementById',ex));}
}
function findElementsByTagName(aTagName,aElement){try{if((typeof aTagName)=='undefined'){throw new Error('\'aTagName\' is a undefined parameter!');}
var rElements=null;if(aTagName!=null){var currentElement=((typeof aElement)=='undefined'||aElement==null?document:aElement);if(currentElement!=null){if(hsBrowser.isDOM){rElements=currentElement.getElementsByTagName(aTagName);}else if(hsBrowser.isIE4){rElements=document.all.tags(aTagName);}
}
}
return rElements;}catch(ex){throw new Error(createErrorMessage('HsScript.js','findElementsByTagName',ex));}
}
function setFocus(aId){try{if((typeof aId)=='undefined'){throw new Error('\'aId\' is a undefined parameter!');}
var formElement=findElementById(aId);if(formElement!=null){if((typeof formElement.select)!='undefined'&&formElement.nodeName.toLower()!='textarea'&&(formElement.type)!='undefined'&&(formElement.type.toLower()=='text'||formElement.type.toLower()=='password')){formElement.select();}
formElement.focus();}
}catch(ex){throw new Error(createErrorMessage('HsScript.js','setFocus',ex));}
}
function newElement(aType,aAppendToElement,aInnerHTML,aParameterArray){try{if((typeof aType)=='undefined'){throw new Error('\'aType\' is a undefined parameter!');}
var rElement=null;if((typeof aAppendToElement)=='undefined'||aAppendToElement==null||aAppendToElement.ownerDocument==null){rElement=document.createElement(aType);}else{rElement=aAppendToElement.ownerDocument.createElement(aType);}
if((typeof aInnerHTML)!='undefined'&&aInnerHTML!=null){rElement.innerHTML=aInnerHTML;}
if(aType=='div'||aType=='span'){rElement.style.position='absolute';rElement.style.display='none';rElement.style.visible=false;calculateGraphics.call(rElement);}else if(aType=='table'){rElement.border=0;rElement.cellPadding=0;rElement.cellSpacing=0;}
if(arguments.length>3){for(var i=3;i<arguments.length;i++){if(arguments[i]!=null&&arguments[i].length>0){var parameter=arguments[i].split('=');if(parameter.length==2){if(parameter[0]=='id'){rElement.id=parameter[1];}else if(parameter[0]=='name'){rElement.id=parameter[1];rElement.name=parameter[1];}else if(parameter[0]=='class'){rElement.className=parameter[1];}else if(parameter[0]=='cursor'){rElement.style.cursor=parameter[1];}else if(parameter[0]=='zIndex'){rElement.style.zIndex=parameter[1];}else if(parameter[0]=='left'){rElement.style.left=parameter[1];}else if(parameter[0]=='top'){rElement.style.top=parameter[1];}else if(parameter[0]=='right'){rElement.style.right=parameter[1];}else if(parameter[0]=='bottom'){rElement.style.bottom=parameter[1];}else if(parameter[0]=='style-width'){rElement.style.width=parameter[1];}else if(parameter[0]=='style-height'){rElement.style.height=parameter[1];}else if(parameter[0]=='style-position'){rElement.style.position=parameter[1];}else if(parameter[0]=='text'){rElement.text=parameter[1];if(hsBrowser.isIE){rElement.innerHTML=parameter[1];}
}else if(parameter[0]=='value'){rElement.value=parameter[1];}else{rElement.setAttribute(parameter[0],parameter[1]);}
}
}
}
}
if((typeof aAppendToElement)!='undefined'&&aAppendToElement!=null&&aAppendToElement.ownerDocument!=null){rElement=aAppendToElement.appendChild(rElement);}
return rElement;}catch(ex){throw new Error(createErrorMessage('HsScript.js','newElement',ex));}
}
function createErrorMessage(aScriptFile,aMethod,aError,aDebugMessage){var rMessage=(((typeof aError.name)=='undefined'?'':(aError.name+': '))+((typeof aError.message)=='undefined'?aError:aError.message));if((typeof aDebugMessage)!='undefined'){rMessage+=(' [ DEBUG: '+aDebugMessage+' ] ');}
if((typeof aError.fileName)=='undefined'||(typeof aError.lineNumber)=='undefined'){rMessage+=(' at '+aScriptFile+'('+aMethod+')');}else{rMessage+=(' at '+aScriptFile+'(line '+aError.lineNumber+')');}
return rMessage;}
function alertXml(aString){try{if((typeof aString)=='undefined'){throw new Error('\'aString\' is a undefined parameter!');}
alert(aString.transformXml());}catch(ex){throw new Error(createErrorMessage('HsScript.js','alertXml',ex));}
}
function confirmXml(aString){try{if((typeof aString)=='undefined'){throw new Error('\'aString\' is a undefined parameter!');}
return confirm(aString.transformXml());}catch(ex){throw new Error(createErrorMessage('HsScript.js','confirmXml',ex));}
}
function promptXml(aString){try{if((typeof aString)=='undefined'){throw new Error('\'aString\' is a undefined parameter!');}
return prompt(aString.transformXml());}catch(ex){throw new Error(createErrorMessage('HsScript.js','promptXml',ex));}
}
function getCookie(aName){try{if((typeof aName)=='undefined'){throw new Error('\'aName\' is a undefined parameter!');}
var rValue=null;if(aName!=null&&(new RegExp(('(?:;)?'+aName+'=([^;]*);?')).test(document.cookie))){rValue=decodeURIComponent(RegExp['$1']);}
return rValue;}catch(ex){throw new Error(createErrorMessage('HsScript.js','getCookie',ex));}
}
function setCookie(aName,aValue){try{if((typeof aName)=='undefined'){throw new Error('\'aName\' is a undefined parameter!');}else if((typeof aValue)=='undefined'){throw new Error('\'aValue\' is a undefined parameter!');}
var rValue=null;if(aName!=null){var cookieValue=(aName+'='+encodeURIComponent(aValue));var expireDate=new Date();expireDate.setFullYear((expireDate.getFullYear()+10));cookieValue+=(';expires='+expireDate.toGMTString());cookieValue+=(';path=/');document.cookie=cookieValue;rValue=getCookie(aName);}
return rValue;}catch(ex){throw new Error(createErrorMessage('HsScript.js','setCookie',ex));}
}
function deleteCookie(aName){try{if((typeof aName)=='undefined'){throw new Error('\'aName\' is a undefined parameter!');}
var rValue=getCookie(aName);if(aName!=null){var expireDate=new Date();expireDate.setTime(expireDate.getTime()-1);document.cookie=(aName+'=null;expires='+expireDate.toGMTString()+';path=/');document.cookie=(aName+';expires='+expireDate.toGMTString()+';path=/');}
return rValue;}catch(ex){throw new Error(createErrorMessage('HsScript.js','deleteCookie',ex));}
}
function multipleMouseOverLink(aElement,aClassName,aLinkCount){var elementId=aElement.id.substring(0,aElement.id.lastIndexOf('.MultipleMouseOverLink'));for(var index=0;index<aLinkCount;index++){attachClass.call((elementId+'.MultipleMouseOverLink'+index),aClassName);}
}
function multipleMouseOutLink(aElement,aClassName,aLinkCount){var elementId=aElement.id.substring(0,aElement.id.lastIndexOf('.MultipleMouseOverLink'));for(var index=0;index<aLinkCount;index++){detachClass.call((elementId+'.MultipleMouseOverLink'+index),aClassName);}
}
function multipleOptionSelect(aSelectElement,aSelectElementCount){var selectedOptionElement=aSelectElement.options[aSelectElement.selectedIndex];var elementId=selectedOptionElement.id.substring(0,selectedOptionElement.id.lastIndexOf('.MultipleOptionSelect'));for(var index=0;index<aSelectElementCount;index++){var nextElementId=(elementId+'.MultipleOptionSelect'+index);if(nextElementId!=selectedOptionElement.id){var optionElement=findElementById(nextElementId);optionElement.parentNode.selectedIndex=-1;optionElement.selected=true;}
}
}
}

/* Time: 142 */

