<!--//--><![CDATA[//><!--

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("main-nav");
		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", "");
				}
			}
		}
	}
}

function setScroller(){
	
	if (!document.getElementsByTagName) return false;
	
	var links = document.getElementsByTagName("A");
	
	for (var i = 0; i < links.length; i++){
		if (links[i].href.indexOf("#") != -1){
			links[i].onmouseup = function(){
				setTimeout('forceScroll(60)',100);
			}
		}
	}
	
	if(this.location.href.indexOf("#") != -1){
		setTimeout('forceScroll(30)',100);
	}

}

function forceScroll(scroll_amount){

	window.scrollTo(0,0);
	if (navigator.userAgent.indexOf("Safari") != -1) {

		var b = document.getElementById("content-right");
	//	alert (b.scrollTop + " : " + (b.scrollHeight - b.clientHeight))
		if (b.scrollTop < b.scrollHeight - b.clientHeight){
			b.scrollTop -= scroll_amount;
		}
	}
	
}


function swapStyle(i, n){
	var s = document.getElementById(i);
	s.id = n;
};

var detail_window;

function showDetail(url, w, h){
	
	if(detail_window) detail_window.close();
	
	detail_window = window.open(url, "fileWindow",
                            "menubar=no, toolbar=no, location=no, scrollbars=no, status=no, resizable=no, width="+w+", height="+h);
	
	detail_window.focus();

   
}

function correctPNG(){

	var strGif = "images/transparentpixel.gif"
	var strFilter = "progid:DXImageTransform.Microsoft.AlphaImageLoader"
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])

	if ((version >= 5.5) && (document.body.filters)) 
	{
		for(var i=0; i<document.images.length; i++)
		{
		   var img = document.images[i]
		   var imgName = img.src.toUpperCase()
		   if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		   {
			  var imgID = (img.id) ? "id='" + img.id + "' " : ""
			  var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			  var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			  var imgStyle = "display:inline-block;" + img.style.cssText 
			  if (img.align == "left") imgStyle = "float:left;" + imgStyle
			  if (img.align == "right") imgStyle = "float:right;" + imgStyle
			  if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
			  if (img.useMap)
			  {  
				 strAddMap = "<img style=\"position:absolute; left:" + 30 + "px;"
				 + "height:" + img.height + "px;width:" + img.width +"\" "
				 + "src=\"" + strGif + "\" usemap=\"" + img.useMap 
				 + "\" border=\"" + img.border + "\">"
			  }
			  var strNewHTML = "<span " + imgID + imgClass + imgTitle
			  + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			  + "filter:" + strFilter
			  + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
			  if (img.useMap) strNewHTML += strAddMap
			  img.outerHTML = strNewHTML

			  i = i-1
		   }
		}

	   for(i=0; i < document.forms.length; i++) findImgInputs(document.forms(i))
	}

}

function findImgInputs(oParent)
{
   var oChildren = oParent.children
   if (oChildren)
   {
      for (var i=0; i < oChildren.length; i++ )
      {
         var oChild = oChildren(i)
         if ((oChild.type == 'image') && (oChild.src))
         {
             var origSrc = oChild.src
             oChild.src = strGif
             oChild.style.filter = strFilter + "(src='" + origSrc + "')"
         }
         findImgInputs(oChild)
      }
   }
}

//--><!]]>