        

function getValidForm(formName)
{
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1)
	{
		theform = eval("document." + formName);
	}
	else
	{
		theform = document.forms[formName];
	}
	return theform;
}

function ZoomImage(image, width, height, name)
{
	if(!width) width = 550;
	if(!height) height = 450;
	if(!name) name = null;
	var left = (screen.width/2) - (width/2);
	var top = (screen.height/2) - (height/2);
	var win;
	win = window.open("Popupimage.aspx?i=" + image, name, 'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height + ',toolbar=0,resizable=1');
	win.focus();
	return(win);
}

function ZoomImagePattern(image, width, height, name) {
    if (!width) width = 550;
    if (!height) height = 450;
    if (!name) name = null;
    var left = (screen.width / 2) - (width / 2);
    var top = (screen.height / 2) - (height / 2);
    var win;
    win = window.open("Popupimage.aspx?i=" + image + "&print=0", name, 'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height + ',toolbar=0,resizable=1');
    win.focus();
    return (win);
}

function PopUp(url, width, height, name)
{
	if(!width) width = 780;
	if(!height) height = 560;
	if(!name) name = null;
	var left = (screen.width/2) - (width/2);
	var top = (screen.height/2) - (height/2);
	var win;
	win = window.open(url, name, 'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height + ',toolbar=0,resizable=0,scrollbars=1');
	win.focus();
	return(win);
}

function PopUpNew(url, width, height, name) {
    if (!width) width = 900;
    if (!height) height = 600;
    if (!name) name = null;
    var left = (screen.width / 2) - (width / 2);
    var top = (screen.height / 2) - (height / 2);
    var win;
    win = window.open(url, name, 'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height + ',toolbar=0,resizable=0,scrollbars=1');
    win.focus();
    return (win);
}