function get_element(element_id)
{
    return document.all ? document.all[element_id] : document.getElementById(element_id);
}


function redirect(url, idfield)
{
	element = document.getElementById(idfield);
	if (element.value != 0) { path = url + element.value; }
	else {path = url;}
	this.location = path;

}

function getpage(url)
{
	this.location = url;
}

var popUpWin=0;

function popUpWindow(URLStr, width, height)
{
  var left = 1;
  var top = 1;
  var resiz = "no";

  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable='+resiz+',copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+',alwaysRaised');

  popUpWin.focus();		
}

function save(id) {
	addon = "";
	if (id) addon = "&id=" + id;
	popUpWindow("index.php?page=10" + addon, 450, 530);	
}

function upload() {
	popUpWindow("index.php?page=60", 450, 530);	
}


