_mac=/Mac/i.test(navigator.userAgent);_ie=/MSIE/i.test(navigator.userAgent);_ie512=/MSIE 5.12/i.test(navigator.userAgent);_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);_dom=document.all&&_ie?(document.getElementById?2:1):(document.getElementById?4:(document.layers?3:0));_createLayerNo=0;function getWindowWidth(){if(_dom==4||_dom==3)return window.innerWidth;if(_dom==2||_dom==1)return document.body.clientWidth;return 0;}function getWindowHeight(){if(_dom==4||_dom==3)return window.innerHeight;if(_dom==2||_dom==1)return document.body.clientHeight;return 0;}function getWinXOffset(){if(_dom==4)return window.scrollX;if(_dom==2||_dom==1)return document.body.scrollLeft;if(_dom==3)return window.pageXOffset;return 0;}function getWinYOffset(){if(_dom==4)return window.scrollY;if(_dom==2||_dom==1)return document.body.scrollTop;if(_dom==3)return window.pageYOffset;return 0;}function getDivFromName(nm){if(_dom==4||_dom==2)return document.getElementById(nm);if(_dom==1)return document.all(nm);if(_dom==3){var s='';for(var i=1;i<arguments.length;i++)s+='document.layers.'+arguments[i]+'.';return eval(s+'document.layers.'+nm);}return null;}function getDivName(div){if(_dom==4||_dom==2||_dom==1)return div.id;if(_dom==3)return div.name;return'';}function createLayer(left,top,width,height,parentDiv){var s='';if(arguments.length>5){for(var i=5;i<arguments.length;i++)s+=arguments[i];}if(_dom==4){var divName='_js_layer_'+_createLayerNo;_createLayerNo++;var pDiv=parentDiv?parentDiv:document.body;var div=document.createElement('DIV');div.id=divName;div.setAttribute('style','position:absolute;left:'+left+';top:'+top+(width>0?(';width:'+width):'')+(height>0?(';height:'+height):'')+';visibility:hidden');var range=document.createRange();range.selectNodeContents(div);range.collapse(true);var cf=range.createContextualFragment(s);div.appendChild(cf);pDiv.appendChild(div);return div;}if(_dom==2||_dom==1){var adj=(_mac&&!_ie512)?' ':'';var divName='_js_layer_'+_createLayerNo;_createLayerNo++;var ha=(height>0)?(';height:'+height):'';var pDiv=parentDiv?parentDiv:document.body;pDiv.insertAdjacentHTML('BeforeEnd','<div id="'+divName+'" style="position:absolute;left:'+left+';top:'+top+(width>0?(';width:'+width):';width:1')+(height>0?(';height:'+height):'')+';visibility:hidden;">'+s+'<\/div>'+adj);return document.all(divName);}if(_dom==3){var div=parentDiv?(new Layer(width,parentDiv)):(new Layer(width));if(height>0)div.resizeTo(width,height);div.moveTo(left,top);if(s!=''){div.document.open('text/html','replace');div.document.write(s);div.document.close();}return div;}return null;}function createILayer(url,left,top,width,height,parentDiv){if(_dom==4){var divName='_js_layer_'+_createLayerNo;_createLayerNo++;var pDiv=parentDiv?parentDiv:document.body;var div=document.createElement('IFRAME');div.id=divName;div.name=divName;div.setAttribute('style','position:absolute;left:'+left+';top:'+top+';width:'+width+(height>0?(';height:'+height):'')+';visibility:hidden');div.setAttribute('src',url);div.setAttribute('frameborder',0);div.setAttribute('scrolling','no');pDiv.appendChild(div);return div;}if(_dom==2||_dom==1){var adj=(_mac&&_ie512)?' ':'';var bd,divName='_js_layer_'+_createLayerNo;_createLayerNo++;var ha=(height>0)?(';height:'+height):'';if(arguments.length>5&&parentDiv)bd=parentDiv;else bd=document.body;bd.insertAdjacentHTML('BeforeEnd','<div id="'+divName+'" style="position:absolute;left:'+left+';top:'+top+';width:'+width+ha+';visibility:hidden;">'+'<iframe src="'+url+'" name="'+divName+'_if" '+'width='+width+' height='+height+'marginwidth=0 marginheight=0 '+'scrolling="no" frameborder="no">'+'<\/iframe>'+'<\/div>'+adj);return document.all(divName);}if(_dom==3){var div=parentDiv?(new Layer(width,parentDiv)):(new Layer(width));if(height>0)div.resizeTo(width,height);div.moveTo(left,top);div.load(url,width);return div;}return null;}function getDivImage(div,imgName){if(_dom==4)return document.images[imgName];if(_dom==2||_dom==1)return document.images(imgName);if(_dom==3)return div.document.images[imgName];return null;}function getDivForm(div,frmName){if(_dom==4)return document.forms[frmName];if(_dom==2||_dom==1)return document.forms(frmName);if(_dom==3)return div.document.forms[frmName];return null;}function initDivPos(div){if(_dom==4){div.style.left=div.offsetLeft+'px';div.style.top=div.offsetTop+'px';}else if(_dom==2||_dom==1){div.style.pixelLeft=div.offsetLeft;div.style.pixelTop=div.offsetTop;}return div;}function initDivSize(div){if(_dom==4){div.style.width=div.offsetWidth+'px';div.style.height=div.offsetHeight+'px';}else if(_dom==2||_dom==1){div.style.pixelWidth=div.offsetWidth;div.style.pixelHeight=div.offsetHeight;}return div;}function getDivLeft(div){if(_dom==4||_dom==2)return div.offsetLeft;if(_dom==1)return div.style.pixelLeft;if(_dom==3)return div.left;return 0;}function getDivTop(div){if(_dom==4||_dom==2)return div.offsetTop;if(_dom==1)return div.style.pixelTop;if(_dom==3)return div.top;return 0;}function getDivWidth(div){if(_dom==4||_dom==2)return div.offsetWidth;if(_dom==1)return div.style.pixelWidth;if(_dom==3)return div.clip.width;return 0;}function getDivHeight(div){if(_dom==4||_dom==2)return div.offsetHeight;if(_dom==1)return div.style.pixelHeight;if(_dom==3)return div.clip.height;return 0;}function getILayerWidth(objILayer){if(_dom==4)return objILayer.contentDocument.body.offsetWidth;if(_dom==2||_dom==1)return _mac?frames(objILayer.id).document.body.offsetWidth:frames(objILayer.id).document.body.scrollWidth;if(_dom==3)return objILayer.document.width;return 0;}function getILayerHeight(objILayer){if(_dom==4)return objILayer.contentDocument.body.offsetHeight;if(_dom==2||_dom==1)return _mac?frames(objILayer.id).document.body.offsetHeight:frames(objILayer.id).document.body.scrollHeight;if(_dom==3)return objILayer.document.height;return 0;}function moveDivTo(objDiv,left,top){if(_dom==4){objDiv.style.left=left+'px';objDiv.style.top=top+'px';return;}if(_dom==2||_dom==1){objDiv.style.pixelLeft=left;objDiv.style.pixelTop=top;return;}if(_dom==3){objDiv.moveTo(left,top);return;}}function moveDivBy(objDiv,left,top){if(_dom==4){objDiv.style.left=objDiv.offsetLeft+left;objDiv.style.top=objDiv.offsetTop+top;return;}if(_dom==2){objDiv.style.pixelLeft=objDiv.offsetLeft+left;objDiv.style.pixelTop=objDiv.offsetTop+top;return;}if(_dom==1){objDiv.style.pixelLeft+=left;objDiv.style.pixelTop+=top;return;}if(_dom==3){objDiv.moveBy(left,top);return;}}function scrollILayerXTo(objILayer,x){if(_dom==4){frames[objILayer.id].scrollTo(x,frames[objILayer.id].scrollY);return;}if(_dom==2||_dom==1){frames(objILayer.id).scrollTo(x,frames(objILayer.id).document.body.scrollTop);return;}if(_dom==3){var dx=x-objILayer.clip.left,ch=objILayer.clip.width;objILayer.left-=dx;objILayer.clip.left=x;objILayer.clip.width=ch;return;}return;}function scrollILayerYTo(objILayer,y){if(_dom==4){frames[objILayer.id].scrollTo(frames[objILayer.id].scrollX,y);return;}if(_dom==2||_dom==1){frames(objILayer.id).scrollTo(frames(objILayer.id).document.body.scrollLeft,y);return;}if(_dom==3){var dy=y-objILayer.clip.top,ch=objILayer.clip.height;objILayer.top-=dy;objILayer.clip.top=y;objILayer.clip.height=ch;return;}return;}function changeILayerUrl(objILayer,url){if(_dom==4){objILayer.setAttribute('src',url);return;}if(_dom==2||_dom==1){frames(objILayer.id).location.replace(url);return;}if(_dom==3){objILayer.load(url,objILayer.clip.width);return;}return;}function resizeDivTo(objDiv,width,height){if(_dom==4){objDiv.style.width=width+'px';objDiv.style.height=height+'px';return;}if(_dom==2||_dom==1){objDiv.style.pixelWidth=width;objDiv.style.pixelHeight=height;return;}if(_dom==3){objDiv.resizeTo(width,height);return;}}function resizeDivBy(objDiv,width,height){if(_dom==4){objDiv.style.width=(objDiv.offsetWidth+width)+'px';objDiv.style.height=(objDiv.offsetHeight+height)+'px';return;}if(_dom==2){objDiv.style.pixelWidth=objDiv.offsetWidth+width;objDiv.style.pixelHeight=objDiv.offsetHeight+height;return;}if(_dom==1){objDiv.style.pixelWidth+=width;objDiv.style.pixelHeight+=height;return;}if(_dom==3){objDiv.resizeBy(width,height);return;}}function showHideLayer(){var i,p,v,obj,args=showHideLayer.arguments;for(i=0;i<(args.length-1);i+=2){if((obj=getDocumentObject(args[i]))!=null){v=args[i+1];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}obj.visibility=v;}}}function setDivVisibility(objDiv,visible){var st,v,h;st=(objDiv.style?objDiv.style:objDiv);v=(visible?'visible':'hidden');st.visibility=v;}function hideSelectBoxes(x,y,w,h,l){var sel,hsel,selx,sely,selw,selh,i;sel=document.getElementsByTagName("SELECT");sel.level=0;hsel=new Array();for(i=0;i<sel.length;i++){selx=0;sely=0;var selp;if(sel[i].offsetParent){selp=sel[i];while(selp.offsetParent){selp=selp.offsetParent;selx+=selp.offsetLeft;sely+=selp.offsetTop;}}selx+=sel[i].offsetLeft;sely+=sel[i].offsetTop;selw=sel[i].offsetWidth;selh=sel[i].offsetHeight;if(selx+selw>x&&selx<x+w&&sely+selh>y&&sely<y+h){if(sel[i].style.visibility!="hidden"){sel[i].level=l;sel[i].style.visibility="hidden";hsel[hsel.length]=sel[i];}}}return hsel;}function hideCoveredElements(ex1,ex2,ey1,ey2){var r=new Array();if(_dom!=4){var tags=new Array('select','iframe','applet','object','embed');var cx1,cx2,cy1,cy2;for(i=0;i<tags.length;i++){var list=document.getElementsByTagName(tags[i]);for(j=0;j<list.length;j++){pos=getAbsolutePos(list[j]);cx1=pos.x;cx2=list[j].offsetWidth+cx1;cy1=pos.y;cy2=list[j].offsetHeight+cy1;if(cx1<ex2&&cx2>ex1&&cy1<ey2&&cy2>ey1){list[j].style.visibility="hidden";r[r.length]=list[j];}}}}return r;}function setDivVisibilities(divs,visible){if(!divs.length)return;if(_dom==4||_dom==2||_dom==1){for(var i=0;i<divs.length;i++)divs[i].style.visibility=(visible)?'inherit':'hidden';}if(_dom==3){for(var i=0;i<divs.length;i++)divs[i].visibility=(visible)?'inherit':'hide';}return divs;}function setDivClip(objDiv,top,right,bottom,left){if(_dom==4||_dom==2||_dom==1){objDiv.style.clip='rect('+top+'px '+right+'px '+bottom+'px '+left+'px)';return;}if(_dom==3){objDiv.clip.top=top;objDiv.clip.right=right;objDiv.clip.bottom=bottom;objDiv.clip.left=left;return;}}function writeToDiv(objDiv,op,cl){var s='';for(var i=3;i<arguments.length;i++)s+=arguments[i];if(_dom==4){if(op){while(objDiv.hasChildNodes())objDiv.removeChild(objDiv.lastChild);}var range=document.createRange();range.selectNodeContents(objDiv);range.collapse(true);var cf=range.createContextualFragment(s);objDiv.appendChild(cf);return;}if(_dom==2||_dom==1){if(op)objDiv.innerHTML='';if(_mac&&!_ie512)objDiv.innerHTML+=s;else objDiv.insertAdjacentHTML('BeforeEnd',s);return;}if(_dom==3){if(op)objDiv.document.open('text/html','replace');objDiv.document.write(s);if(cl)objDiv.document.close();return;}}function setDivBackgroundColor(objDiv,color){if(color==null)color='transparent';if(_dom==3)objDiv.bgColor=color;else objDiv.style.backgroundColor=color;}function setDivBackgroundImage(objDiv,url){if(_dom==3)objDiv.background.src=url?url:null;else objDiv.style.backgroundImage=url?('url('+url+')'):'none';}function setDivZIndex(objDiv,order){if(_dom==4||_dom==2||_dom==1){objDiv.style.zIndex=order;return;}if(_dom==3){objDiv.zIndex=order;return;}}function setDivStyleAttribute(div,nm,value){if(_dom!=0&&_dom!=3)eval('div.style.'+nm+'='+value);return div;}function getLeftFromEvent(e){if(_dom==4)return e.clientX+window.scrollX;if(_dom==2||_dom==1)return document.body.scrollLeft+window.event.clientX;if(_dom==3)return e.pageX;return 0;}function getTopFromEvent(e){if(_dom==4)return e.clientY+window.scrollY;if(_dom==2||_dom==1)return document.body.scrollTop+window.event.clientY;if(_dom==3)return e.pageY;return 0;}