var _isIE,_isNS,_isDOM,_isSF,_isNS70;var _isWin;var _divID=101;_isIE=(navigator.appName=="Microsoft Internet Explorer");_isNS=(navigator.appName=="Mozilla"||navigator.appName=="Netscape");_isSF=(navigator.userAgent.toLowerCase().indexOf('safari')!=-1);_isDOM=_isNS&&(navigator.appVersion.indexOf("4.")==-1);_isNS70=_isNS&&(navigator.userAgent.toLowerCase().indexOf('netscape/7.0')!=-1);_isNS71=_isNS&&(navigator.userAgent.toLowerCase().indexOf('netscape/7.1')!=-1);_isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1);var allObjs=new Array();function findParentControl(e){var obj=findParentNodeWithProperty(e,'parentControl');if(obj!=null)
{return obj['parentControl'];}
return null;}
function parentOfType(e,tagName){var src=(e.target)?e.target:event.srcElement;if(src==null){return;}
while(src!=null&&!src.tagName==tagName)
{src=src.parentNode;}
if(src==null)return null;return src;}
function findParentNodeWithProperty(e,propName){var src=(e.target)?e.target:event.srcElement;if(src==null){return;}
while(src!=null)
{if(src.nodeType==1&&getTagAttribute(src,propName)!=null){return src;}
src=src.parentNode;}
return null;}
function nextDocObjID(){return"_auto"+_divID++;}
function dom_object(obj){this.docObj=obj;this.name=obj.id;this.scrollTop=obj.scrollTop;this.hide=domHide;this.show=domShow;this.isShown=domIsShow;this.getHeight=domGetHeight;this.getWidth=domGetWidth;this.setTop=domSetTop;this.setLeft=domSetLeft;this.setInnerHTML=domSetInnerHTML;this.unDisplay=domUnDisplay;this.display=domDisplay;this.getChildNodes=domGetChildNodes;this.moveTo=commonMoveTo;this.setClass=commonSetClass;this.setTagAttribute=commonSetAttribute;this.getTagAttribute=commonGetAttribute;this.setHeight=commonSetHeight;this.setWidth=commonSetWidth;this.getZIndex=domGetZIndex;this.setZIndex=domSetZIndex;}
function sf_object(obj){this.docObj=obj;this.name=obj.id;this.scrollTop=obj.scrollTop;this.hide=domHide;this.show=domShow;this.isShown=domIsShow;this.getHeight=ieGetHeight;this.getWidth=ieGetWidth;this.setTop=domSetTop;this.setLeft=domSetLeft;this.setInnerHTML=domSetInnerHTML;this.unDisplay=domUnDisplay;this.display=domDisplay;this.getChildNodes=domGetChildNodes;this.moveTo=commonMoveTo;this.setClass=commonSetClass;this.setTagAttribute=commonSetAttribute;this.getTagAttribute=commonGetAttribute;this.setHeight=commonSetHeight;this.setWidth=commonSetWidth;this.getZIndex=domGetZIndex;this.setZIndex=domSetZIndex;}
function ie_object(obj){this.docObj=obj;this.name=obj.id;this.scrollTop=obj.scrollTop;this.hide=domHide;this.show=domShow;this.isShown=domIsShow;this.getHeight=ieGetHeight;this.getWidth=ieGetWidth;this.setTop=domSetTop;this.setLeft=domSetLeft;this.getChildNodes=ieGetChildNodes;this.setInnerHTML=domSetInnerHTML;this.unDisplay=domUnDisplay;this.display=domDisplay;this.moveTo=commonMoveTo;this.setClass=commonSetClass;this.setTagAttribute=commonSetAttribute;this.getTagAttribute=commonGetAttribute;this.setHeight=commonSetHeight;this.setWidth=commonSetWidth;this.getZIndex=domGetZIndex;this.setZIndex=domSetZIndex;}
function ie_image(obj){this.imgObj=obj;this.getTop=ieGetImgTop;this.getLeft=ieGetImgLeft;this.getHeight=ieGetImgHeight;this.getWidth=ieGetImgWidth;this.setHeight=ieSetImgHeight;this.setWidth=ieSetImgWidth;this.getZIndex=commonGetImgZIndex;this.setZIndex=commonSetImgZIndex;}
function ns_image(obj){this.imgObj=obj;this.getTop=nsGetImgTop;this.getLeft=nsGetImgLeft;this.getHeight=nsGetImgHeight;this.getWidth=nsGetImgWidth;this.setHeight=nsSetImgHeight;this.setWidth=nsSetImgWidth;this.getZIndex=commonGetImgZIndex;this.setZIndex=commonSetImgZIndex;}
function ieGetImgTop(){return parseInt(this.imgObj.offsetTop);}
function ieGetImgLeft(){return parseInt(this.imgObj.offsetLeft);}
function ieGetImgHeight(){return parseInt(this.imgObj.offsetHeight);}
function ieGetImgWidth(){return parseInt(this.imgObj.offsetWidth);}
function ieGetHeight(){return parseInt(this.docObj.clientHeight);}
function ieSetImgHeight(h){this.imgObj.offsetHeight=parseInt(h);}
function ieSetImgWidth(w){this.imgObj.offsetWidth=parseInt(w);}
function ieGetWidth(){return parseInt(this.docObj.clientWidth);}
function ieGetChildNodes(){return this.docObj.all;}
function domHide(){this.docObj.style.visibility="hidden";}
function domShow(){this.docObj.style.visibility="visible";}
function domIsShow(){return(this.docObj.style.visibility=="visible");}
function domSetInnerHTML(s){this.docObj.innerHTML=s;}
function domGetHeight(){return parseInt(document.defaultView.getComputedStyle(this.docObj,"").getPropertyValue("height"));}
function domGetWidth(){return parseInt(document.defaultView.getComputedStyle(this.docObj,"").getPropertyValue("width"));}
function domUnDisplay(){this.docObj.style.display='none';}
function domDisplay(){this.docObj.style.display='';}
function domSetLeft(x){this.docObj.style.left=x+"px";}
function domSetTop(y){this.docObj.style.top=y+"px";}
function domGetZIndex(){return parseInt(this.docObj.style.zIndex);}
function domSetZIndex(z){this.docObj.style.zIndex=parseInt(z);}
function domGetChildNodes(){return this.docObj.childNodes;}
function commonGetImgZIndex(){return parseInt(this.imgObj.style.zIndex);}
function commonSetImgZIndex(z){this.imgObj.style.zIndex=parseInt(z);}
function commonSetHeight(h){this.docObj.style.height=parseInt(h);}
function commonSetWidth(w){this.docObj.style.width=parseInt(w);}
function nsGetImgTop(){return parseInt(this.imgObj.y);}
function nsGetImgLeft(){return parseInt(this.imgObj.x);}
function nsGetImgHeight(){return parseInt(this.imgObj.height);}
function nsGetImgWidth(){return parseInt(this.imgObj.width);}
function nsHide(){this.docObj.visibility="hidden";}
function nsShow(){this.docObj.visibility="inherit";}
function nsGetHeight(){return this.docObj.document.height;}
function nsSetHeight(y){this.docObj.clip.height=y;}
function nsSetWidth(x){this.docObj.clip.width=x;}
function nsSetTop(y){this.docObj.top=y;}
function nsSetLeft(x){this.docObj.left=x;}
function nsUnDisplay(){this.docObj.clip.left=0;this.docObj.clip.right=0;this.docObj.clip.bottom=0;this.docObj.clip.top=0;}
function commonMoveTo(x,y){this.setLeft(x);this.setTop(y);}
function commonSetClass(name){this.docObj.className=name;}
function commonSetAttribute(attribute,value){this.docObj.setAttribute(attribute,value);}
function commonGetAttribute(attribute){return this.docObj.getAttribute(attribute);}
function nsSetInnerHTML(s){this.docObj.document.clear();this.docObj.document.write(s);this.docObj.document.close();}
function findNSLayer(objName){for(i=0;i<document.layers.length;i++){if(document.layers[i].name==objName)return document.layers[i];}
}
function getImgObj(objName){if(allObjs[objName])return allObjs[objName];var theObj=null;if(_isIE||_isDOM){if(!document.images[objName]){return null;}
theObj=new ie_image(document.images[objName]);}else if(_isNS){if(!document.images[objName]){}
theObj=new ns_image(document.images[objName]);}
allObjs[objName]=theObj;return theObj;}
function getDocObj(objName,ignoreCache){if(!ignoreCache||ignoreCache==undefined||ignoreCache=="false"){if(allObjs[objName])return allObjs[objName];}
var theObj=null;if(_isIE){if(!document.all[objName]){return null;}
theObj=new ie_object(document.all[objName]);}else if(_isSF){if(!document.getElementById(objName)){return null;}
theObj=new sf_object(document.getElementById(objName));}
else if(_isDOM){if(!document.getElementById(objName)){return null;}
theObj=new dom_object(document.getElementById(objName));}else if(_isNS){return null;}
allObjs[objName]=theObj;return theObj;}
function getDocObjFromElement(rootEle,objName){var theObj=null;if(_isIE){if(!rootEle||!rootEle.docObj){return null;}
if(!rootEle.docObj.all[objName]){return null;}
theObj=new ie_object(rootEle.docObj.all[objName]);}else if(_isSF){if(!rootEle||!rootEle.docObj){return null;}
var children=rootEle.docObj.childNodes;for(var x in children){var id=children[x].getAttribute("id");if(id==objName){theObj=new sf_object(children[x]);break;}
}
}
else if(_isDOM){if(!rootEle||!rootEle.docObj){return null;}
var children=rootEle.docObj.childNodes;var foundNode=false;for(var x in children){if(children[x]instanceof HTMLElement){if(!foundNode){var id=children[x].getAttribute("id");if(id==objName){theObj=new dom_object(children[x]);foundNode=true;}
}
}
}
}else if(_isNS){return null;}
return theObj;}
function objFromNode(docObj){var theObj=null;if(_isIE){theObj=new ie_object(docObj);}else if(_isSF){theObj=new sf_object(docObj);}else if(_isDOM){theObj=new dom_object(docObj);}else if(_isNS){}
return theObj;}
function doesObjExist(objName){if(allObjs[objName])return true;if(_isIE){if(document.all[objName]){return true;}
}else if(_isDOM){if(document.getElementById(objName)){return true;}
}else if(_isNS){}
return false;}
function newDocObj(name,left,top,width,height,html){var debugBorders="";var heightString="";if(height){heightString="height:"+height+"px;";}
if(name==null){name=nextDocObjID();}
var nL;if(_isIE)
{var divhtml='<div id="'+name+'" style="visibility:hidden;left:'+left+'px;top:'+top+'px;width:'+width+'px;'+heightString+'position:absolute;'+debugBorders+'">'+html+'</div>';document.body.insertAdjacentHTML('beforeEnd',divhtml);nL=document.all[name].style;}
else if(_isDOM)
{var nL=document.createElement("DIV");nL.innerHTML=html;var mybody=document.body;mybody.appendChild(nL);nL.style.position="absolute";nL.style.visibility="hidden";nL.style.left=left;nL.style.top=top;nL.style.width=width;if(height){nL.style.height=height;}
nL.id=name;nL=nL.style;}
else if(_isNS)
{return null;}
return getDocObj(name);}
function getTagAttribute(obj,attr)
{var ret=null;if(obj!=null&&obj.nodeType==1)
{ret=obj[attr];if(!ret)
{ret=obj.getAttribute(attr);if(ret=="")
{ret=null;}
}
}
return ret;}
function getPageOffset(){var offset=0;if(_isNS||_isDOM){offset=window.pageYOffset;}else{offset=self.document.body.scrollTop;}
if(offset>0){return offset;}
return 0;}
function getPageXOffset(){var offset=0;if(_isNS||_isDOM){offset=window.pageXOffset;}else{offset=self.document.body.scrollLeft;}
if(offset>0){return offset;}
return 0;}
function scrollRestore(value){window.scrollTo(0,value);}
function getObjectScrollTop(obj){return(getDocObj(obj).docObj.scrollTop);}
function objectScrollRestore(obj,value){getDocObj(obj).docObj.scrollTop=value;}
function swapClass(e,oldClass,newClass){var src=(e.target)?e.target:event.srcElement;while(src!=null&&src.className!=oldClass)
{src=src.parentNode;}
if(src!=null){src.className=newClass;}
}
