function init() 
{
	
	fixPNG();
	
	
 	if (!document.getElementsByTagName) 
 		return;
 
 	var anchors = document.getElementsByTagName("a");
 	for (var i=0; i<anchors.length; i++) 
 	{
   		var anchor = anchors[i];
   		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
   		{
     		anchor.target = "_blank";
 		}	
     	else if (anchor.className.match("print")) 
     	{
        	anchor.onclick = function() 
        	{
          		printPage();
          		return false;
        	};
    	}
    	else if (anchor.className.match("window")) 
     	{
        	anchor.onclick = function() 
        	{
          		popUp(this.getAttribute("href"));
          		return false;
        	};
    	}
    	else if (anchor.className.match("file")) 
     	{
        	anchor.onclick = function() 
        	{
          		window.open(this.getAttribute("href"));
          		return false;
        	};
    	}
 	}
}

window.onload = init;


function popUp(URL)
{
	eval("window.open('" + URL + "','windowName', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=600,height=700');");
}

/* Author: Rebecca Skeers rebecca@webmistress.com.au 2005 */
function printPage() 
{
  	if (window.print)
		window.print()
	else
		alert("Sorry, your browser doesn't support the print feature. Use the File menu on your browser to select Print.");
	return false;
}






function fixPNG()
{
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	if ((version >= 5.5) && (document.body.filters) && (version < 7)) 
	{
		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
				var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
				img.outerHTML = strNewHTML
				i = i-1
			}
		}
	}	
};