function $g(element) { return document.getElementById(element); }
function showHide(divId,hiddenId){if($g(hiddenId).value=="0"){$g(hiddenId).value="1";$g(divId).style.display="none";}
else{$g(divId).style.display="";$g(hiddenId).value="0";}}
function showHide2(divId,hiddenId,chngTxt){if($g(hiddenId).value=="0"){$g(hiddenId).value="1";$g(chngTxt).innerHTML="Show Comments";$g(divId).style.display="none";}
else{$g(chngTxt).innerHTML="Hide Comments";$g(divId).style.display="";$g(hiddenId).value="0";}}
function showHide3(divId,hiddenId,chngTxt,chngVal,chngVal2){if($g(hiddenId).value=="0"){$g(hiddenId).value="1";$g(chngTxt).innerHTML=chngVal;$g(divId).style.display="none";}
else{$g(chngTxt).innerHTML=chngVal2;$g(divId).style.display="";$g(hiddenId).value="0";}}
function onlyShow(divId){$g(divId).style.display="";}
function onlyHide(divId){$g(divId).style.display="none";}
var about_array=new Array("blogDiv","QuotesDiv","pollDiv","pictureDiv","forumDiv","eventsDiv");function displayTab(about_sub){if($g(about_sub).style.display==""){$g(about_sub).className="tabSelected";}
for(i=0;i<about_array.length;i++){var my_sub=$g(about_array[i]);my_sub.style.display="none";}
$g(about_sub).style.display="";}
var tab_array=new Array("blogA","quoteA","pollA","pictureA","forumA","eventsA");function chngClass(divId){for(i=0;i<tab_array.length;i++){$g(tab_array[i]).className="a";}
$g(divId).className="tabSelected";}
function changeTab(showTbl,hideTbl,showTab,hideTab,showDiv,hideDiv){$g(showTbl).style.display='';$g(hideTbl).style.display='none';$g(showTab).className="corrosspanUp";$g(hideTab).className="corrosspan";$g(showDiv).style.display='';$g(hideDiv).style.display='none';}
function changeTab2(showTbl,hideTbl,showTab,hideTab,cls1,cls2,hideDiv,showDiv){$g(showTbl).style.display='';$g(hideTbl).style.display='none';$g(showTab).className=cls1;$g(hideTab).className=cls2;$g(showDiv).style.display='';$g(hideDiv).style.display='none';}
function changeClass(showTab, hideTab, cls1, cls2) { $g(showTab).className = cls1; $g(hideTab).className = cls2; }

function changeimg(id,src1,src2,hidId)
{if($g(hidId).value==0){$g(hidId).value=1;$g(id).src=src1;}
else{$g(id).src=src2;$g(hidId).value=0;}}
function get_mouse(e)
{var tipDiv=$g("tipDiv").style
if(!e){var e=window.event||arguments.callee.caller.arguments[0];}
tempX=(navigator.appName=='Netscape')?e.clientX:event.clientX;tempY=(navigator.appName=='Netscape')?e.clientY:event.clientY;tipDiv.left=tempX;tipDiv.top=tempY;}
function doTooltip(id,leftPX,topPX)
{scrolledV=window.pageYOffset;scrolledH=window.pageXOffset;$g(id).style.display="";if(!e)
{var e=window.event||arguments.callee.caller.arguments[0];}
tempX=(navigator.appName=='Netscape')?e.clientX:event.clientX;tempY=(navigator.appName=='Netscape')?e.clientY:event.clientY;$g(id).style.left=(tempX)-leftPX+'px';$g(id).style.top=(tempY)-topPX+'px';}
function hideme(name)
{$g(name).style.display="none";}
function fixImgs(whichId,maxW)
{var pix=$g(whichId).getElementsByTagName('img');for(i=0;i<pix.length;i++)
{w=pix[i].width;h=pix[i].height;if(w>maxW)
{f=1-((w-maxW)/w);pix[i].width=w*f;pix[i].height=h*f;}}}
var ie=document.all
var dom=$g
var ns4=document.layers
var calunits=document.layers?"":"px"
var bouncelimit=32
var direction="up"
function initbox(){if(!dom&&!ie&&!ns4)
return
crossobj=(dom)?$g("pop").style:ie?document.all.dropin:document.dropin
scroll_top=(ie)?truebody().scrollTop:window.pageYOffset
crossobj.top=scroll_top-250+calunits
crossobj.visibility=(dom||ie)?"visible":"show"
dropstart=setInterval("dropin()",50)}
function dropin(){scroll_top=(ie)?truebody().scrollTop:window.pageYOffset
if(parseInt(crossobj.top)<150+scroll_top)
crossobj.top=parseInt(crossobj.top)+40+calunits
else{clearInterval(dropstart)}}
function bouncein(){crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if(bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if(bouncelimit==0){clearInterval(bouncestart)}}
function dismissbox(){if(window.bouncestart)clearInterval(bouncestart)
crossobj.visibility="hidden"}
function truebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function a(){alert('sfsd');}
window.getSize=function(){var width=0,height=0,vScroll=0,hScroll=0,tWidth=0,tHeight=0;if(typeof(window.innerWidth)=='number'){width=window.innerWidth;height=window.innerHeight;}
else{if(document.documentElement&&document.documentElement.clientWidth){width=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}
else{if(document.body&&document.body.clientWidth){width=document.body.clientWidth;height=document.body.clientHeight;}}}
if(document.body&&(document.body.scrollTop||document.body.scrollLeft)){vScroll=document.body.scrollTop;hScroll=document.body.scrollLeft;}
else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){vScroll=document.documentElement.scrollTop;hScroll=document.documentElement.scrollLeft;}
else{if(window.pageYOffset){vScroll=window.pageYOffset;hScroll=window.pageXOffset;}}}
var xScroll=0,yScroll=0;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}
else{if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}
else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}}
tWidth=Math.max(width,xScroll);tHeight=Math.max(height,yScroll);return{width:width,height:height,vScroll:vScroll,hScroll:hScroll,totalWidth:tWidth,totalHeight:tHeight};}
function test(){var x=window.getSize();$g('blackDiv').style.height=x.totalHeight;}
var initHeight=0;var slidedown_direction=1;var slidedownContentBox=false;var slidedownContent=false;var slidedownActive=false;var contentHeight=false;var slidedownSpeed=7;var slidedownTimer=7;function slidedown_showHide(){if(initHeight==0)slidedown_direction=slidedownSpeed;else slidedown_direction=slidedownSpeed*-1;if(!slidedownContentBox){slidedownContentBox=$g('Sliding_contentBox');slidedownContent=$g('Sliding_content');contentHeight=$g('Sliding_content').offsetHeight;}
slidedownContentBox.style.visibility='visible';slidedownContentBox.style.display='';slidedownActive=true;slidedown_showHide_start();}
function slidedown_showHide_start(){if(!slidedownActive)return;initHeight=initHeight/1+slidedown_direction;if(initHeight<=0){slidedownActive=false;slidedownContentBox.style.visibility='hidden';slidedownContentBox.style.display='none';initHeight=0;}
if(initHeight>contentHeight){slidedownActive=false;}
slidedownContentBox.style.height=initHeight+'px';slidedownContent.style.top=initHeight-contentHeight+'px';setTimeout('slidedown_showHide_start()',slidedownTimer);}
function setslidedownWidth(newWidth){$g('Sliding_slidedown').style.width=newWidth+'px';$g('Sliding_contentBox').style.width=newWidth+'px';}
function setSlideDownSpeed(newSpeed){slidedownSpeed=newSpeed;}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
var contentDivId
function hideDiv(id1,id2)
{$g(id1).style.display="none";$g(id2).style.display="none";}
function showDivs(id1,id2)
{$g(id1).style.display="";$g(id2).style.display="";}
function getBrowserSize()
{var bodyWidth=document.documentElement.clientWidth;var bodyHeight=document.documentElement.clientHeight;var bodyWidth,bodyHeight;if(self.innerHeight){bodyWidth=self.innerWidth;}else if(document.documentElement&&document.documentElement.clientHeight)
{bodyWidth=document.documentElement.clientWidth;}
else if(document.body){bodyWidth=document.body.clientWidth;}
var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
$g('blackDiv').style.height=bodyHeight+scrOfY+"px";$g('blackDiv').style.width=bodyWidth+"px";var contentW=$g(contentDivId).style.width;var contentH=$g(contentDivId).style.height;var actW=bodyWidth-contentW.replace('px','');var actH=((bodyHeight-contentH.replace('px',''))/2)+scrOfY;$g(contentDivId).style.left=actW/2+"px";$g(contentDivId).style.top=actH+"px";}
function getContentDivId(contentDivIdParam){contentDivId=contentDivIdParam;}
function openGrayDiv(contentDivIdParam)
{getContentDivId(contentDivIdParam)
window.onresize=getBrowserSize;window.onscroll=getBrowserSize;getBrowserSize();}
var tabdropdown = { disappeardelay: 200, disablemenuclick: false, enableiframeshim: 1, dropmenuobj: null, ie: document.all, firefox: $g && !document.all, previousmenuitem: null, currentpageurl: window.location.href.replace("http://" + window.location.hostname, "").replace(/^\//, ""), getposOffset: function(what, offsettype) {
    var totaloffset = (offsettype == "left") ? what.offsetLeft : what.offsetTop; var parentEl = what.offsetParent; while (parentEl != null) { totaloffset = (offsettype == "left") ? totaloffset + parentEl.offsetLeft : totaloffset + parentEl.offsetTop; parentEl = parentEl.offsetParent; }
    return totaloffset;
}, showhide: function(obj, e, obj2) {
    if (this.ie || this.firefox)
        this.dropmenuobj.style.left = this.dropmenuobj.style.top = "-500px"
    if (e.type == "click" && obj.visibility == hidden || e.type == "mouseover") {
        if (obj2.parentNode.className.indexOf("default") == -1)
            obj2.parentNode.className = "selected1"
        obj.visibility = "visible"
    }
    else if (e.type == "click")
        obj.visibility = "hidden"
}, iecompattest: function() { return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body }, clearbrowseredge: function(obj, whichedge) {
    var edgeoffset = 0
    if (whichedge == "rightedge") {
        var windowedge = this.ie && !window.opera ? this.standardbody.scrollLeft + this.standardbody.clientWidth - 15 : window.pageXOffset + window.innerWidth - 15
        this.dropmenuobj.contentmeasure = this.dropmenuobj.offsetWidth
        if (windowedge - this.dropmenuobj.x < this.dropmenuobj.contentmeasure)
            edgeoffset = this.dropmenuobj.contentmeasure - obj.offsetWidth
    }
    else {
        var topedge = this.ie && !window.opera ? this.standardbody.scrollTop : window.pageYOffset
        var windowedge = this.ie && !window.opera ? this.standardbody.scrollTop + this.standardbody.clientHeight - 15 : window.pageYOffset + window.innerHeight - 18
        this.dropmenuobj.contentmeasure = this.dropmenuobj.offsetHeight
        if (windowedge - this.dropmenuobj.y < this.dropmenuobj.contentmeasure) {
            edgeoffset = this.dropmenuobj.contentmeasure + obj.offsetHeight
            if ((this.dropmenuobj.y - topedge) < this.dropmenuobj.contentmeasure)
                edgeoffset = this.dropmenuobj.y + obj.offsetHeight - topedge
        }
        this.dropmenuobj.firstlink.style.borderTopWidth = (edgeoffset == 0) ? 0 : "1px"
    }
    return edgeoffset
}, dropit: function(obj, e, dropmenuID) {
    if (this.dropmenuobj != null) {
        this.dropmenuobj.style.visibility = "hidden"
        if (this.previousmenuitem != null && this.previousmenuitem != obj) {
            if (this.previousmenuitem.parentNode.className.indexOf("default") == -1)
                this.previousmenuitem.parentNode.className = ""
        }
    }
    this.clearhidemenu()
    if (this.ie || this.firefox) {
        obj.onmouseout = function() { tabdropdown.delayhidemenu(obj) }
        obj.onclick = function() { return !tabdropdown.disablemenuclick }
        this.dropmenuobj = $g(dropmenuID)
        this.dropmenuobj.onmouseover = function() { tabdropdown.clearhidemenu() }
        this.dropmenuobj.onmouseout = function(e) { tabdropdown.dynamichide(e, obj) }
        this.dropmenuobj.onclick = function() { tabdropdown.delayhidemenu(obj) }
        this.showhide(this.dropmenuobj.style, e, obj)
        this.dropmenuobj.x = this.getposOffset(obj, "left")
        this.dropmenuobj.y = this.getposOffset(obj, "top")
        this.dropmenuobj.style.left = this.dropmenuobj.x - this.clearbrowseredge(obj, "rightedge") + "px"
        this.dropmenuobj.style.top = this.dropmenuobj.y - this.clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + 1 + "px"
        this.previousmenuitem = obj
        this.positionshim()
    }
}, contains_firefox: function(a, b) {
    while (b.parentNode)
        if ((b = b.parentNode) == a)
        return true; return false;
}, dynamichide: function(e, obj2) {
    var evtobj = window.event ? window.event : e
    if (this.ie && !this.dropmenuobj.contains(evtobj.toElement))
        this.delayhidemenu(obj2)
    else if (this.firefox && e.currentTarget != evtobj.relatedTarget && !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
        this.delayhidemenu(obj2)
}, delayhidemenu: function(obj2) { this.delayhide = setTimeout(function() { tabdropdown.dropmenuobj.style.visibility = 'hidden'; if (obj2.parentNode.className.indexOf('default') == -1) obj2.parentNode.className = '' }, this.disappeardelay) }, clearhidemenu: function() {
    if (this.delayhide != "undefined")
        clearTimeout(this.delayhide)
}, positionshim: function() {
    if (this.enableiframeshim && typeof this.shimobject != "undefined") {
        if (this.dropmenuobj.style.visibility == "visible") {
            this.shimobject.style.width = this.dropmenuobj.offsetWidth + "px"
            this.shimobject.style.height = this.dropmenuobj.offsetHeight + "px"
            this.shimobject.style.left = this.dropmenuobj.style.left
            this.shimobject.style.top = this.dropmenuobj.style.top
        }
        this.shimobject.style.display = (this.dropmenuobj.style.visibility == "visible") ? "block" : "none"
    }
}, hideshim: function() {
    if (this.enableiframeshim && typeof this.shimobject != "undefined")
        this.shimobject.style.display = 'none'
}, isSelected: function(menuurl) {
    var menuurl = menuurl.replace("http://" + menuurl.hostname, "").replace(/^\//, "")
    return (tabdropdown.currentpageurl == menuurl)
}, init: function(menuid, dselected) {
    this.standardbody = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body
   
    if ($g(menuid) != null) {
        var menuitems = $g(menuid).getElementsByTagName("a")
        for (var i = 0; i < menuitems.length; i++) {
            if (menuitems[i].getAttribute("rel")) {
                var relvalue = menuitems[i].getAttribute("rel")
                $g(relvalue).firstlink = $g(relvalue).getElementsByTagName("a")[0]
                menuitems[i].onmouseover = function(e) {
                    var event = typeof e != "undefined" ? e : window.event
                    tabdropdown.dropit(this, event, this.getAttribute("rel"))
                }
            }
            if (dselected == "auto" && typeof setalready == "undefined" && this.isSelected(menuitems[i].href)) {
                menuitems[i].parentNode.className += " selected default"
                var setalready = true
            }
            else if (parseInt(dselected) == i)
                menuitems[i].parentNode.className += " selected default"
        }
    }
}
}
var divName = 'arrowTipDiv'; var offX = 15; var offY = 15; function mouseX(evt) { if (!evt) evt = window.event; if (evt.pageX) return evt.pageX; else if (evt.clientX) return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return 0; }
function mouseY(evt) { if (!evt) evt = window.event; if (evt.pageY) return evt.pageY; else if (evt.clientY) return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return 0; }
function follow(evt, txt) {
    if ($g) {
        var obj = $g(divName).style; obj.visibility = 'visible';
        obj.left = (parseInt(mouseX(evt)) + offX) + 'px';
        obj.top = (parseInt(mouseY(evt)) + offY) + 'px';
        $g('tipTxt').innerHTML = txt;
    } 
}

function hideTip() {
    var obj = $g(divName).style; obj.visibility = 'hidden';
}
function changeImg(imgID, imgSrc) { $g(imgID).src = imgSrc; }

