// JavaScript Document

function on_load ()
{
	run_png_fix();	
}

function redirect ( url )
{
	document.location.href = url;	
}

function draw_help_box ( label, title, text )
{
	document.write (	
						"<div><img id='" + label + "' onmouseover='showhide_help_box(this.id, true);' onmouseout='showhide_help_box(this.id, false);' style='cursor:help; margin:5px;' src='/images/exclamation.png' /></div>" +
						"<div id='box_" + label + "'" + 
						"style='opacity: .95; filter: alpha(opacity=95);position:absolute; color:#333333; line-height:16px; text-align:left; display:none; font-size:10px; width:300px; margin:5px; background-color:white; border:1px solid black; padding:10px;'>" + 
						"<div class='help_title'>" + title + "</div>" + 
						"<div class='help_content'>" + text + "</div>" + 
						"</div>"
					);	
}

function showhide_help_box ( id, show )
{
	if (show)
		document.getElementById("box_" + id).style.display="";
	else
		document.getElementById("box_" + id).style.display="none";
}

// intended for background PNG images only
function run_png_fix ()
{
	var ary_png_ids = new Array("gradient_bottom");
	for (i = 0; i < ary_png_ids.length; i++)
		png_fix(ary_png_ids[i]);
}

// Ryan's fix for background PNG's
function png_fix ( id )
{
	var obj = document.getElementById(id);
	if (navigator.appName == "Microsoft Internet Explorer" && obj)
	{
		
		// strip out the url
		var tmp_image 	= obj.style.backgroundImage;
		var curr_image 	= tmp_image.substring(4, tmp_image.length - 1);
	
		obj.style.backgroundImage 	= "url(../style/transparent.gif)";
		obj.runtimeStyle.filter 	= "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + curr_image + "',sizingMethod='scale')";
	}
}

function sec_email (name, domain, suffix)
{
	document.write("<a href='mailto:" + name + "@" + domain + "." + suffix + "'>" + name + "@" + domain + "." + suffix + "</a>");	
}