var d = document;
var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById &&  d.documentElement.behaviorUrns))  ? true : false;

function openPicture(src, alt, width, height)
{
	var img = "<img src='" + src + "' height='" + height + "' width='" + width + "' alt='" + alt + "'>";
	var body = "<html>\n<head>\n<meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>\n<title>" + alt + "</title>\n</head>\n\n<body leftmargin='0' topmargin='0' marginheight='0' marginwidth='0' onload='focus()' onclick='window.close()'>\n" + img + "\n</body>\n</html>";
	var params = "width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no,scrollbar=yes";
	PictureWindow = open("", "_blank", params);
	PictureWindow.document.write(body);
	PictureWindow.document.close();
}

function DisplayElement(id)
{
	var tElement=document.getElementById(id);
	var tElementStyle=tElement.style.display;
	if (tElementStyle=="")
		tElement.style.display="none";
	else
		tElement.style.display="";
}

function cField(field) {if (field.value==field.defaultValue) {field.value="";}}
function sField(field) {if (field.value=="") {field.value=field.defaultValue;}}

function SendURL(act)
{
var w = 640, h = 480;

if (document.all || document.layers) {
    w = screen.availWidth;
    h = screen.availHeight;
}

var popW = 500, popH = 680;
var leftPos = (w-popW)/2, topPos = (h-popH)/2;
SendWin = window.open('/action/form.php?action=' + act, 'Action', 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',resizable=yes');
if (navigator.appName=='Netscape') { SendWin.focus(); }
}