function writeHTML(a)
	{ document.write(a); }
	
function openPhoto(i)
	{
	artPhoto = window.open("photo.asp?aid="+i, "artPhoto", "resizable=yes,status=no,scrollbars=yes, width=100, height=100");
	artPhoto.focus();
	}

function scroller()
	{
	par=document.getElementById("divTP");
	el=document.getElementById("divTicker");
	l=(parseInt(el.style.left));
	if ((l+el.offsetWidth)<0)
		{ l=(par.offsetWidth + 5); }
	el.style.left=l-1;
	setTimeout("scroller()",30);
	}
	
function initScroll()
	{
	par=document.getElementById("divTP");
	if (message=="")
		{ 
		par.style.display="none";
		return; 
		}
	el=document.getElementById("divTicker");
	el.style.top="1px";
	el.style.visibility="visible";
	el.innerHTML="<table cellspacing=0 cellpadding=0 border=0><tr><td nowrap class='maintext' style='font-size:12px'><b>" + message + "</b></td></tr></table>";
	el.style.left=(par.offsetWidth + 5) + "px";
	setTimeout("scroller()",500);
	}

function popWindow() 
	{
	// new url,winname, width, height
	args=popWindow.arguments;
	//sizestr='width='+args[2];
	w=args[2];
	h=args[3];
	s=args[4];
	r=args[5];
	if (s=='scroll')
		{scrollbar=",scrollbars=yes";}
	else
		{
		scrollbar="";
		if (w>=screen.width)
			{ 
			w=screen.width-100; 
			scrollbar=",scrollbars=yes";
			}
		if (h>=screen.height)
			{ 
			h=screen.height-150; 
			scrollbar=",scrollbars=yes";
			}
		}
	if (r=='resize')
		{scrollbar+=",resizable=yes";}
	sizestr='width='+w;
	sizestr+=',height='+h;
	midx=(screen.width - w) / 2;
	midy=(screen.height - h) / 2;
	sizestr+=',left='+midx;
	sizestr+=',top='+midy;
	sizestr+=scrollbar;
  	popupWin = window.open(args[0], args[1], sizestr);
	if (window.focus) {popupWin.focus()}
	}
