
function ion(imgName) {
	document [imgName].src = eval(imgName + "on.src");
}

function ioff(imgName) {
	document [imgName].src = eval(imgName + "off.src");
}

function new_window(x, y, url) {
	var xWin = (screen.availWidth - 10);
	var yWin = (screen.availHeight - 29);
	var xscrepos = ((xWin - x) / 2);
	var yscrepos = ((yWin - y) / 2);
	if(xscrepos < 0)
		xscrepos = 0;
	if(yscrepos < 0)
		yscrepos = 0;
	if ((xWin <= x) || (yWin <= y)) {
		eval('window.open(url, "cover", "menubar=no, status=no, toolbar=no, resizable=no, directories=no, ' +
			'scrollbars=yes, fullscreen=no, top='+yscrepos+', left='+xscrepos+', height='+y+', width='+x+'")');
	} else if((xWin > x) && (yWin > y)) {
		eval('window.open(url, "cover", "menubar=no, status=no, toolbar=no, resizable=no, directories=no, ' +
			'scrollbars=no, fullscreen=no, top='+yscrepos+', left='+xscrepos+', height='+y+', width='+x+'")');
	}
}

function player_window(x, y, url) {
	var xWin = (screen.availWidth - 10);
	var yWin = (screen.availHeight - 29);
	var xscrepos=((xWin - x) / 2);
	var yscrepos=((yWin - y) / 2);
	if(xscrepos < 0) xscrepos = 0;
	if(yscrepos < 0) yscrepos = 0;
	if ((xWin <= x) || (yWin <= y)) {
		eval('window.open(url, "player", "menubar=no, status=no, toolbar=no, resizable=no, directories=no, ' +
			'scrollbars=yes, fullscreen=no, top='+yscrepos+', left='+xscrepos+', height='+y+', width='+x+'")');
	} else if((xWin > x) && (yWin > y)) {
		eval('window.open(url, "player", "menubar=no, status=no, toolbar=no, resizable=no, directories=no, ' +
			'scrollbars=no, fullscreen=no, top='+yscrepos+', left='+xscrepos+', height='+y+', width='+x+'")');
	}
}

