function popup(link,width,height)
{
	var options = "scrollbars=yes,resizable=yes,menubar=yes"

	var left = (screen.width-width)/2;
	var top  = (screen.height-height)/2;
	
	window.open(link,"","top="+top+",left="+left+",width="+width+",height="+height+","+options);
}

function largepopup(link)
{
	var options = "scrollbars=yes,resizable=yes,menubar=no"
	var width   = (screen.width-20-10);
	var height  = (screen.height-20-30);

	var left = (screen.width-width)/2;
	var top  = (screen.height-height)/2;
	
	left = 10;
	top  = 10;
	window.open(link,"","top="+top+",left="+left+",width="+width+",height="+height+","+options);
}

function popup_image(link,width,height)
{
	var options = "scrollbars=1,resizable=1,menubar=0"
	width = width + 50;
	height = height + 145;
	if(width < 550) width = 550;
	
	var left = (screen.width - width)/2;
	var top  = (screen.height - height)/2;
	if(width != 0 && height != 0)
	{
		window.open("/index.php?page=view_image&blank=1&link=" + link,"","top="+top+",left="+left+",width="+(width + 20)+",height="+(height + 20)+","+options);
	}
}

function flip(id)
{
	status = (document.getElementById(id).style.display == 'none') ? 'block' : 'none';
	document.getElementById(id).style.display = status;
}

function doBlink()
{
  var blink = document.all.tags("BLINK")
  for (var i=0; i < blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
}

function startBlink() {
  if (document.all)
    setInterval("doBlink()",500)
}

function altimage(url,obj,alt)
{
	var img = new Image();
	img.onerror = function(){ obj.src = alt;};
	img.src = url;
	obj.src = url;
}

window.onload = startBlink;

