// Summer 2007 

function WM_preloadImages() 
{
if (document.images) 
	{
	if (typeof(document.WM) == 'undefined')
		{
		document.WM = new Object();
    	        }
	document.WM.loadedImages = new Array();
	var argLength = WM_preloadImages.arguments.length;
	for(arg=0;arg<argLength;arg++) 
		{
		document.WM.loadedImages[arg] = new Image();
		document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
		}
	}
}

var supported = (document.getElementById || document.all);

if (supported)
{
	document.write("<style type='text/css'>");
	document.write(".content { display:none; }");
	document.write("</style>");

	var max = 7;
	var shown = new Array();
	for (var i=1;i<=max;i++)
	{
		shown[i+1] = false;
	}
}

function blocking(i)
{
	if (!supported)
	{
		alert('This link does not work in your browser.');
		return;
	}
	shown[i] = (shown[i]) ? false : true;
	current = (shown[i]) ? 'block' : 'none';
	if (document.getElementById)
	{
		document.getElementById('co'+i).style.display = current;
	}
	else if (document.all)
	{
		document.all['number'+i].style.display = current;
	}
}

	function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
	}

///Variables
var isIE4 = (navigator.appVersion.indexOf("MSIE 4") != -1) ? true : false;
var isMac = (navigator.appVersion.indexOf("Mac") != -1) ? true : false;

var newwin;
var winposition;
var winproperties; 

//Get the width and height of the user's screen
var w = screen.width;
var h = screen.height;

function launchwin(winurl,winname,win_w,win_h,winfeatures) {

	//Calculate the center point of the screen
	var w_loc = (w - parseInt(win_w))/2;
	var h_loc = (h - parseInt(win_h))/2;
	
	//document.write("test abc098");

	//Set the starting window position as the center of the screen
	winposition = "top=" + h_loc + ",left=" + w_loc + ",screenX=" + w_loc + ",screenY=" + h_loc;
	
	//Combine width and height with window position and feature settings
	winproperties = "height=" + win_h + ",width=" + win_w + "," + winfeatures + "," + winposition;
	
	//This launches a new window and then
	//focuses it if window.focus() is supported.
	newwin = window.open(winurl,winname,winproperties);
	
	if(javascript_version > 1.0) {
		//delay a bit here because IE4 encounters errors
		//when trying to focus a recently opened window
 		setTimeout('newwin.focus();',350);
	}
	
	if(isMac && isIE4) {
		//This moves the new window to the center of the screen
		newwin.moveTo(w_loc,h_loc);
	}
	if(isMac && isIE4) {
		//This moves the new window to the center of the screen
		newwin.moveTo(w_loc,h_loc);
	}
	
}
