// nav sliding.js

var unitdist = 10;var slideinterval = 10;var slideTimer = "";var moving  = false;var i = 0;function MoveBy(elt, finalX) {var thiselt = document.getElementById(elt);	currTop = thiselt.offsetTop;		amt = Math.floor((finalX - currTop) / 2);		moveTo = currTop + amt;		if (Math.abs(finalX - moveTo)  <= 1) {			clearInterval(slideTimer);			moving = false;			moveTo = finalX;  		}thiselt.style.top =  moveTo + "px"; }function SlideBy(elt, dX, dY) {	if (moving) return;		var thiselt = document.getElementById(elt);	var finalX = thiselt.offsetTop + dX;			dx = finalX+(dX-finalX)/5;		if (dX > 0)	dx = dx;		moving = true;		  slideTimer = setInterval("MoveBy('" + thiselt.id + "','" + finalX + "'," + dx + ",'0')", slideinterval);}// function to make Safari version staticfunction safMoveBy(elt, dX, dY) { var thiselt = document.getElementById(elt); thiselt.style.top = thiselt.offsetTop + dX  + "px";}

//-->

// nav tabs.js

// this should change to wherever you are storing your images for the tabs with the arrows var imgdir  = 'img/icons/tabs/';var slideready = false;var ua = navigator.userAgent.toLowerCase();var isSafari = (ua.indexOf('safari') > 0);window.onload = function() { 	slideready = true;}function toggle(element) { 			if (!slideready || moving) return false;		// closes any currently open tabs and sets the open one	reset(element);	  var imgtoggle = document.getElementById(element + '-img');  var main = document.getElementById('main-wrap');	var inner = document.getElementById('inner-wrap');	var innerposition = inner.offsetTop;	main.className = "";	if (!document.getElementById) return true;	var elt = document.getElementById(element);	if (/exposed/i.test(elt.className)) {			// this closes the tab			var currentheight= elt.offsetHeight;			scrollamt = currentheight - innerposition;				if (scrollamt == 0 && /exposed/i.test(elt.className)) {				scrollamt = -innerposition;			}       main.className = element.replace(/drop-/g, '');			elt.className = elt.className.replace(/exposed/g,'');			imgtoggle.src = imgdir + element.replace(/drop-/g, '') + '_down.gif';							} else {			// this opens the tab						elt.className += " exposed";			var currentheight= elt.offsetHeight;			scrollamt = currentheight - innerposition;						if (scrollamt == 0 && /exposed/i.test(elt.className)) {				scrollamt = -innerposition;			} 			main.className = element.replace(/drop-/g, '');			imgtoggle.src = imgdir + element.replace(/drop-/g, '') + '_up.gif';	}// this next section allows for you to change Safari back to a static version// if there are any issues with the animation, simply uncomment the lines below		//if (isSafari) {				//safMoveBy('inner-wrap', scrollamt,0);		//	} else {				SlideBy('inner-wrap', scrollamt, 0);		// 	}		return false;}function reset(element) {	var elt = document.getElementById('drops');	var elts = elt.getElementsByTagName('div');	var exposed = document.getElementById(element);	for (i=0; i< elts.length; i++) {				if (!/drop-/i.test(elts[i].id) || (exposed == document.getElementById(elts[i].id))) {		continue;		}				thiselt = elts[i];				thiselt.className = thiselt.className.replace(/exposed/g,'')		var imgtoggle = document.getElementById(thiselt.id + '-img');			imgtoggle.src = imgdir + thiselt.id.replace(/drop-/g, '') + '_down.gif';	}	return;}

function expandcollapse (postid) { 

   whichpost = document.getElementById(postid); 
   
   if (whichpost.className=="postshown") { 
      whichpost.className="posthidden"; 
   } 
   else { 
      whichpost.className="postshown"; 
   } 
} 

//-->


function showMoreComments(varA12, varB12){
var1232 = ('varXYZ2' + (varA12));
varABC2 = ('varP2' + (varA12));
if( document.getElementById ) {
if( document.getElementById(var1232).style.display ) {
if( varB12 != 0 ) {
document.getElementById(var1232).style.display = "block";
document.getElementById(varABC2).style.display = "none";
} else { document.getElementById(var1232).style.display = "none"; 
document.getElementById(varABC2).style.display = "block"; }
} else { location.href = varB12;
return true; }
} else { location.href = varB12;
return true; }
}

//-->


var xmlhttp=false;
// This first set of conditions captures the case where you are using IE
// The case only executes if you have javascript that uses try-catch
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/

// Here is the non-IE case
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	xmlhttp = new XMLHttpRequest();
}

function getMyHTML(serverPage, objID) {
	// Get the document element ID'd by objID
	var obj = document.getElementById(objID);
	// Send a request for the content page
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function() {
		// if our request for content succeeded replace the content of obj
		// with the results
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}
//-->

startList = function() {
        if (document.all && document.getElementById) {
                navRoot = document.getElementById("dmenu");
                for (i=0; i < navRoot.childNodes.length; i++) {
                        node = navRoot.childNodes[i];
                        if (node.nodeName=="LI") {
                                node.onmouseover=function() {
                                        this.className+=" over";
                                }
                                node.onmouseout=function() {
                                        this.className=this.className.replace(" over", "");
                                }
                        }
                }
        }
}

window.onload=startList;
//-->




		

