// JavaScript Document

function iePNGFix(dImg)
{
	dImg.runtimeStyle.behavior='none';
	
	var src = dImg.src ;
	if(src.substr( src.length-4 , 4).toLowerCase() != '.png'){return;}
	if(!dImg.complete){setTimeout( function(){ iePNGFix(dImg);} ,100 );}
	else
	{
		var dParentNode = dImg.parentNode;
		var oParentNodeStyle = dParentNode.runtimeStyle ;
		var oImgStyle =  dImg.currentStyle;
		var sDisplay = dParentNode.currentStyle.display.toLowerCase();
		dParentNode.title = ( dImg.title || dImg.alt );
		oParentNodeStyle.width = dImg.width + 'px';
		oParentNodeStyle.height = dImg.height + 'px';
		oParentNodeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + dImg.src + "',sizingMethod='scale')";
		oParentNodeStyle.border = [ oImgStyle.borderStyle , oImgStyle.borderWidth , oImgStyle.borderColor ].join(' '); 
		if(! dParentNode.currentStyle.hasLayout){oParentNodeStyle.display = 'inline-block' ;};
	};
};

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}

var popupWindow=null;
function popup(mypage,myname,w,h,pos,infocus,s){

if (pos == 'random')
{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
else
{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars='+ s+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';popupWindow=window.open('',myname,settings);
if(infocus=='front'){popupWindow.focus();popupWindow.location=mypage;}
if(infocus=='back'){popupWindow.blur();popupWindow.location=mypage;popupWindow.blur();}

}