//fix dotted line thing when link is OnClicked
var theahrefs = document.getElementsByTagName('a');
for(var x=0;x!=theahrefs.length;x++){
	theahrefs[x].onfocus = function stopLinkFocus(){
		this.hideFocus=true;
	};
}

function descDown() {
	var el = document.getElementById('infowardesc');
	if(el) {
		var type = el.getAttribute('class');
	   if(type == null) { /* internet explorer */
     	 	var type = el.getAttribute('className');
			el.setAttribute('className','infowardesc');
		} else {
			el.setAttribute('class','infowardesc');
		}
		el.style.zIndex = 0;
	}
}

function descOver() {
	var el = document.getElementById('infowardesc');
	if(el) {
		var type = el.getAttribute('class');
	   if(type == null) { /* internet explorer */
	      var type = el.getAttribute('className');
			el.setAttribute('className','infowardescOver');
		} else {
			el.setAttribute('class','infowardescOver');
		}
		el.style.zIndex = 500;
	}
}

// show/hide
function changeDisplayState (id) {
   d=YAHOO.util.Dom.get(id); // the element to show/hide
	 i=YAHOO.util.Dom.get('img_' + id); // change the corresponding arrow to open/close
   if (d.style.display == 'none' || d.style.display == "") {
   	d.style.display = 'block';
		i.setAttribute('src','style/open.gif');
		i.setAttribute('alt','open');
   } else {
      d.style.display = 'none';
		i.setAttribute('src','style/close.gif');
		i.setAttribute('alt','close');
   }
}

function DisplayStateOpen (id) {
   d=YAHOO.util.Dom.get(id); // the element to show 
	 i=YAHOO.util.Dom.get('img_' + id); // change the corresponding arrow to close
   	d.style.display = 'block';
		i.setAttribute('src','style/open.gif');
		i.setAttribute('alt','open');
 
}


// Reload PNG images in MSIE, using the AlphaImageLoader
function fixPNG(myImage, id)
{
  if (window.ie && getOS() == 'Windows' && (myImage.src+"X").slice(-4,-1).toLowerCase() == "png")  // Only MSIE in Windows ; reload png images only
//  if (window.ie && getOS() == 'Windows') // Only MSIE in Windows ; reload ALL images (.jpg, .gif, .png, etc.)
  {
    div_style_obj = document.getElementById(id).style;     // Div object that will contain the Alpha loaded png image
    div_style_obj.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + myImage.src + "')"; // Reload image in a nasty way
    myImage.style.visibility = "hidden"; // Hide original image
  }
}
