function openWin(file, title, params) {
	w = window.open(file, title, params);
}

function showimg(u,wd,hg) {
	s = window.open('','Pic','toolbar=no,location=no,directoties=no,status=no,scrollbars=no,menubar=no,resizable=yes,top=20, left=20,width='+(wd+16)+',height='+(hg+16));
	s.document.open();
	s.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>photo</title></head><body bgcolor=#ffffff onload="window.self.focus();return true;" style="margin: 0px;"><table cellspacing=0 cellpadding=5 border=0 style="height: 100%; width: 100%;"><tr><td align=center><a href=javascript:window.close()><img src="' + u + '" border="0" width="' + wd + '" height="' + hg + '" alt="close"></a></td></tr></table></body></html>');
	s.document.close();
	s.focus();
}

function GetCookie(sName) {
	var aCookie = document.cookie.split('; ');
	for (var i=0; i < aCookie.length; i++) {
		var aCrumb = aCookie[i].split('=');
		if (sName == aCrumb[0])
			return unescape(aCrumb[1]);
	}
  return null;
}

function BodyOnLoad() {
	var cookieUserFrom = GetCookie('user_from');
	if (cookieUserFrom == null && document.referrer) {
		document.cookie = 'user_from=' + escape(document.referrer) + '; path=/';
	}
}

