<!--
// Path to images directory
var gsPath = "images/";

function checkIt(string)
{
	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,version,total,thestring;
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function imgOff(sName) {
	if (document.images) {
		document[sName].src = gsPath + sName + "_off.gif";
	}
}
function imgOn(sName) {
	if (document.images) {
		document[sName].src = gsPath + sName + "_on.gif";
	}
} 
function popup(URLtoOpen, windowName, windowFeatures) {
	newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
function openVideo(url,w,h) {
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	var popup = window.open(url,'remote',windowprops);
	popup.focus();
}

function openWindow(url,w,h) {
// parameters:	url = URL of the popup window
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no';
	var popup = window.open(url,'remote2',windowprops);
	popup.focus();
}

function openWindowWithName(url,w,h, name, addressbar) {
// parameters:	url = URL of the popup window
// 				w = width
// 				h = height
	if (checkIt('safari'))
	{
		h += 80;
	}

	scrollbars = false;
	if(screen.height<=780)
	{
		h = screen.height-100;
		w += 20;
		scrollbars = true;
	}
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-80-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location='+(addressbar ? 'yes' : 'no')+',directories=no,status=no,scrollbars='+(scrollbars ? 'yes' : 'no')+',menubar=no';
	var popup = window.open(url,name,windowprops);
	popup.focus();
}

function openWinFull(url) {
// parameters:	url = URL of the popup window
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,menubar=no';
	var popup = window.open(url,'wallpaper',windowprops);
	popup.focus();
}

function openWindowNoScrollbar(url,w,h) {
// parameters:	url = URL of the popup window
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	var popup = window.open(url,'remote3',windowprops);
	popup.focus();
}

function openFullWindow(url) {
	// parameters:	url = URL of the popup window
	//alert(screen.width);
	var w = screen.width; //fixed width
	var h = screen.height; //fixed height
	//var url = url_full;
	//if(w <= 800) {
	//	url = url_800;
	//}
	leftPosition = 0;		// centering horizontal position to middle of screen
	topPosition = 0;	// centering vertical position to middle of screen
	if (h<645)
	{
		var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no'; //set popup window properties
	} else
	{
		var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no'; //set popup window properties
	}
	var popup = window.open(url,'remote',windowprops); // open popup window with properties
	//popup.moveTo(0,0)
	popup.resizeTo(screen.width,screen.height);
	//popup.focus(); // focus on window
}
//-->
