/*
Opens a popup window
*/
function popupOpen(url, windw, x, y, w, h) {
	
	str = "width="+w+",height="+h+",left="+x+",top="+y+",scrollbars=yes";
	window.open(url, windw, str);
	}
	
/*
Close a popup window
*/
function popupClose(windw) {

	windwControl = window.open('', windw);
	windwControl.close();
	}
	
/*
Refreshes a popup window
*/
function popupRefresh(windw) {
	windwControl = window.open('', windw);
	windwControl.location.reload();
	}
	
/*
Refreshes the parent of a popup window
*/
function parentRefresh() {
	
	opener.location.reload();
	}

/*
Preloads a picture as an object
*/
function preload(imgObj,imgSrc) 
	{
	if (document.images) 
		{
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
		}
	}
	
/*
Changes the picture of an image object
*/
function changeImage(layer,imgName,imgObj) 
	{
	if (document.images) 
		{
		if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src')
		else document.images[imgName].src = eval(imgObj+".src")
		}
	}
	
/*
Changes the background of an object by ID
*/
function bkg(id, col1)
	{
	eval(id+".style.backgroundColor=\""+col1+"\"");
	}	

/*
Changes the inner HTML content of an object by give ID
*/
function changeContent(id, content) {
	
	document.getElementById(id).innerHTML= content;
	}
