function popup(file)
{
	location.href = file
	//var wnd = window.open(file, "popup");
	//wnd.focus();
}

function SetDivHeight(name, iHeight)
{ 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById(name).style.height = iHeight; 
	} 
	else { 
		if (document.layers) { // Netscape 4 
			eval("document." + name + ".height = iHeight"); 
		} 
		else { // IE 4 
			eval("document.all." + name + ".style.height = iHeight"); 
		} 
	} 
}
 
function checkMail(strMail)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return (filter.test(strMail));
}

function DisplaySendMailResponse(successMessage)
{
	try {
		var addr = location.href.replace(/\%20/g, " "); 
		if (addr.indexOf("error=") != -1)
		{
			var message = addr.substr(addr.indexOf("error=") + 6);
			document.write("<center><font color=red>" + message + "</font></center><br>");
		}
		else if (addr.indexOf("resp=1") != -1)
		{
			document.write("<center>" + successMessage + "</center><br>");
		}
	} catch(ERR)
	{
	}
}
var userName = "";
function DisplayLoginResponse(formObj, strErrorMessage, strLogoutMessage, strNoServiceMessage)
{
	try {
		var addr = location.href.replace(/\%20/g, " "); 
		if (addr.indexOf("error=1") != -1 && addr.indexOf("user=") != -1)
		{
			userName = addr.substr(addr.indexOf("user=") + 5);
			document.write("<center><font color=red>" + strErrorMessage + "</font></center>");
		}
		if (addr.indexOf("error=2") != -1)
		{
			document.write("<center>" + strLogoutMessage + "</center>");
		}
		if (addr.indexOf("error=3") != -1)
		{
			document.write("<center><font color=red>" + strNoServiceMessage + "</font></center>");
		}
	} catch(ERR)
	{
	}
}
function isDefined(property)
{
	return (typeof property != 'undefined');
}

if (!activeLink)
{
	var activeLink = '';
}
var rolloverInitialized = false;

function rolloverInit()
{
	if (!rolloverInitialized && isDefined(document.images))
	{
		// get all images (not including <input type="image">s)
		var images = new Array();
	      if (isDefined(document.getElementsByTagName))
		 {
			images = document.getElementsByTagName('img');
               } else { //ie4, opera4,5
	         images = document.images;
	      }
	    // get all images with '_off.' in src value excepting the one that is for the BODY

      for (var i = 0; i < images.length; i++) {
         if (images[i].src.indexOf('_off.') != -1) {
            //check for active link
		   if (images[i].id == activeLink)
               images[i].src = images[i].src.replace(/_off\./, '_on.');
            else {
            var image = images[i];

            // store the off state filename in a property of the image object
            image.offImage = new Image();
		image.offImage.src = image.src;

// store the on state filename in a property of the image object
// (also preloads the on state image)
image.onImage = new Image();
image.onImage.imageElement = image;

// add onmouseover and onmouseout event handlers once the on state image has loaded
// Safari's onload is quirky for off-screen images; temporary fix
if (navigator.userAgent.toLowerCase().indexOf('safari') != - 1)
{
	image.onmouseover = function() {this.src = this.onImage.src;};
        image.onmouseout =  function() {this.src = this.offImage.src;};
}
else
{
       image.onImage.onload = function() {this.imageElement.onmouseover = function() {this.src = this.onImage.src;};this.imageElement.onmouseout = function() {this.src = this.offImage.src;
                  };
               };
}

// set src of on state image after defining onload event handler
// so cached images (that load instantly in IE) will trigger onload
image.onImage.src = image.src.replace(/_off\./, '_on.');
}
}
}
}
rolloverInitialized = true;
}

//////////////////////////////////////////////////////
/// INITIALIZE LAYER AND ROLLOVER FUNCTIONS ONLOAD ///
//////////////////////////////////////////////////////

function globalOnLoad() 
{
	rolloverInit();
}
