var ext = new Image();
var int = new Image();
var com = new Image();
var link = new Image();
var con = new Image();
var hom = new Image();
function init()
{
	ext.src = 'img/but_ext-ovr.jpg';
	int.src = 'img/but_int-ovr.jpg';
	com.src = 'img/but_com-ovr.jpg';
	link.src = 'img/but_link-ovr.jpg';
	con.src = 'img/but_con-ovr.jpg';
	hom.src = 'img/but_hom-ovr.jpg';
}
function hover(i, y)
{
	var y = y || false;
	var d = document.getElementById(i);
	if(y){
		d.src = 'img/but_' + i + '.jpg';
	} else {
		d.src = eval(i + '.src');
	}
}

window.onload = function () { init(); }

function launch(w)
{
	var windowWidth, windowHeight;
	if (window.innerHeight) // all except Explorer
	{
		windowWidth = window.innerWidth - 17; //-16 to compensate for scrollbars, disable if you have smaller desktop
		windowHeight = document.body.clientHeight + 10;
	}
	else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
	{
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.body.clientHeight + 10;
	}
	else if (document.body) // other Explorers
	{
		windowWidth = document.body.clientWidth - 17;
		windowHeight = document.body.clientHeight + 10;
	}
	var p = document.getElementById('frame');
	var x = document.getElementById('close');
	p.style.top = '0px';
	p.style.left = '0px';
	p.style.width = windowWidth + 'px';
	p.style.height = windowHeight + 'px';
	p.style.position = 'absolute';
	p.style.zIndex = '9';
	p.src = w + '.htm';
	document.getElementById('anim').style.visibility = 'hidden';
	p.style.display = 'block';
	x.style.top = '10px';
	x.style.left = '10px';
	x.style.position = 'absolute';
	x.style.zIndex = 30;
	x.style.display = 'block';
}

function zap(w)
{
	var p = document.getElementById('frame');
	var x = document.getElementById('close');
	p.style.display = 'none';
	p.src = 'loading.html';
	
	x.style.display = 'none';
	document.getElementById('anim').style.visibility = 'visible';
}