////
// Begin: CUSTOM CODE
//
var popUpVisible = 0;

if (top.frames.length!=0) {
    if (window.location.href.replace)
        top.location.replace(self.location.href);
    else
        top.location.href=self.document.href;
}

function LaunchWindow(u,x,y) {

	var is_ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4));
	x += 20;
    y += 40;

	var w = window.open(u, "_blank", "width=" + x + ", height=" + y + ",resizable=no,scrollbars=no,status=no,menubar=no,toolbar=no");
	if (!document.layers) {
		w.resizeTo(x, y);
	} else {
		w.setResizable(true);
		w.resizeTo(x, y);
		w.setResizable(false);
	}
	w.moveTo(30,30);
	w.focus();
}

function OpenPopUp(img, x, y) {
    if (document.all || document.getElementById ) {
        // open image in a layer
		if (!x) var x = 400;
		if (!y) var y = 300;
        DOMGetElement('PopUpImage').innerHTML = '<img id="Image" width="' + x + '" height="' + y + '" src="' + img + '" onload="CenterPopUp()" onclick="ClosePopUp()">';
		popUpVisible = 1;
		CenterPopUp();
		MM_showHideLayers('PopUp','','show');
    } else if (document.layers) {
        // open image in a pop-up window
		if (!x) var x = 600;
		if (!y) var y = 500;
		var w = window.open("", "PopUpImage", "width=" + x + ",height=" + y + ",resizable=no,scrollbars=no,status=no,menubar=no,toolbar=no");
		w.moveTo(80, 60);

        var is_ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4));
		if (!is_ns4) {
			w.resizeTo(x, y);
		} else {
			w.setResizable(true);
			w.resizeTo(x, y);
			w.setResizable(false);
		}
		w.focus();
		w.document.open();
		w.document.write("\n\n<html>\n<head>\n<title>" + imgTitle + "<\/title>\n<\/head>\n\n<body style=\"margin: 0px; padding: 0px;\" marginwidth=\"0\" marginheight=\"0\" marginleft=\"0\" margintop=\"0\">\n<img src=\"" + imgURL + "\" width=\"" + x + "\" height=\"" + y + "\" alt=\" \" />\n<\/body>\n\n<\/html>");
		w.document.close();
    }
}

function ClosePopUp() {
    if (document.all || document.getElementById ) {
        MM_showHideLayers('PopUp','','hide');
		popUpVisible = 0;
	}
}

function CenterPopUp() {
	var o = DOMGetElement('PopUp');
	DOMElementSetLeftPos( o, 357 - DOMElementGetWidth(o)/2 );
    DOMElementSetTopPos( o, DOMWindowGetYOffset() + DOMWindowGetInnerHeight()/2 - DOMElementGetHeight(o)/2 );
	if (popUpVisible) {
        setTimeout( 'CenterPopUp()', 10 );
    }
}

function Scrolled() {
	ClosePopUp();
}
//
// End: CUSTOM CODE
////