﻿// JScript File

function NewWin(url, winHeight, winWidth)
{
    var myWin = window.open(url, "NewWin", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes,location=no,toolbar=no,menubar=no,resizable=no,top=0,left=0");
	myWin.focus();
}

function NewResizableWin(url, winHeight, winWidth)
{
    var myWin = window.open(url, "NewWin", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes,location=no,toolbar=no,menubar=no,resizable=yes,top=0,left=0");
	myWin.focus();
}

function NewResizableWindow(url, winHeight, winWidth)
{
    var myWin = window.open(url, "NewWin", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes,location=yes,toolbar=yes,menubar=yes,resizable=yes,top=0,left=0");
	myWin.focus();
}

function ImagePopUp(url)
{
    var height = 506;
	var width = 400;
	
	var xposition = (screen.width-width)/2;
	var yposition = (screen.height-height)/2;
	
	var argWindow = "width=" + width + ",height=" + height + ",scrollbars=no,location=no,toolbar=no,menubar=no,resizable=no,left=" + xposition + ",top=" + yposition + ",screenx=" + xposition + ",screeny=" + yposition;
	
	var newWindow = window.open( url, "ImagePopUp", argWindow );
	
	if( newWindow )
		newWindow.focus();
}

function VideoPopUp(url)
{
    var height = 400;
	var width = 440;
	
	var xposition = (screen.width-width)/2;
	var yposition = (screen.height-height)/2;
	
	var argWindow = "width=" + width + ",height=" + height + ",scrollbars=no,location=no,toolbar=no,menubar=no,resizable=no,left=" + xposition + ",top=" + yposition + ",screenx=" + xposition + ",screeny=" + yposition;
	
	var newWindow = window.open( url, "VideoPopUp", argWindow );
	
	if( newWindow )
		newWindow.focus();
}

function OpenMaximizedWindow(url)
{
	top.window.moveTo(0,0);
	
	var winHeight, winWidth;

	if (document.all) 
	{
		winHeight = screen.availHeight;
		winWidth = screen.availWidth;
		
		top.window.resizeTo(screen.availWidth, screen.availHeight);
	}
	else if (document.layers||document.getElementById) 
	{
		if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
		{
			winHeight = screen.availHeight;
			winWidth = screen.availWidth;
		}
	}
	
	var myWin = window.open(url, "NewWin", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes,location=yes,toolbar=yes,menubar=yes,resizable=yes,status=yes,top=0,left=0");

	myWin.resizeTo(winWidth, winHeight);
	myWin.focus();
}

