﻿function msover(img,ref) {
	myImage = document.images[img].src;
	re = /_sel.gif/;

	if ( ! re.test( myImage ) ) {
		document.images[img].src = ref;
	}

}
	
function msout(img,ref) {

	myImage = document.images[img].src;

	re = /_sel.gif/;

	if ( ! re.test( myImage ) ) {
		document.images[img].src = ref;
	}


}


function openWindowThread( url ) {

	optionStr = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1";
    //helpWindow = window.open( url, "content", optionStr);
    helpWindow = openCenteredWindow( url, screen.height-150, screen.width-150,  "content", optionStr);
}


function openCenteredWindow(url, height, width, name, parms) {

    if (height <= 1) { height = Math.floor(screen.height * height); }
    if (width <= 1) { width = Math.floor(screen.width * width); } 


    var left = Math.floor( (screen.width - width) / 2);
    var top = Math.floor( (screen.height - height) / 2);
    var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
    if (parms) { winParms += "," + parms; }
    var win = window.open(url, name, winParms);
        if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
    return win;
} 


function gotoURL( url ) {
	window.opener.location.href = url;
	self.close();
}



function gotoURLNoClose( url ) {

	window.opener.location.href = url;
}


function parentGotoURL( url ) {

	parent.window.opener.location.href = url;
	parent.window.close();
	top.opener.focus();
}



function openWindow2( url, w, h ) {

	optionStr = "scrollbars=yes,location=no,toolbar=yes,width=" + w + ",height=" + h;
	helpWindow = window.open( url, "content", optionStr );

}


function openWindow3( url, w, h ) {

	optionStr = "scrollbars=no,location=no,toolbar=no,width=" + w + ",height=" + h;
	helpWindow = window.open( url, "content", optionStr );

}


function openGallery( url, w, h ) {

	optionStr  = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + w + ",height=" + h;
	helpWindow = window.open( url, "content", optionStr );

}

