document.write ("<style type=\"text/css\">\r\n");
document.write ("#logo {POSITION: absolute; TOP:1;  right:1; VISIBILITY: hidden; Z-INDEX: 84000;\r\n");
document.write ("WIDTH: 9px; HEIGHT: 9px;}\r\n");
document.write ("textarea     {  }\r\n");
document.write ("</style>\r\n");
document.write ("<div id=\"logo\" style=\"width: 200; height: 47\">\r\n");
document.write ("<scri");
document.write ("pt language=\"JavaScri");
document.write ("pt\" type=\"text/javascri");
document.write ("pt\"><!--\r\n");
document.write ("d=document;var a=\'\';a+=\';r=\'+escape(d.referrer)\r\n");
document.write ("js=10//--></scri");
document.write ("pt><scri");
document.write ("pt language=\"JavaScri");
document.write ("pt1.1\" type=\"text/javascri");
document.write ("pt\"><!--\r\n");
document.write ("a+=\';j=\'+navigator.javaEnabled()\r\n");
document.write ("js=11//--></scri");
document.write ("pt><scri");
document.write ("pt language=\"JavaScri");
document.write ("pt1.2\" type=\"text/javascri");
document.write ("pt\"><!--\r\n");
document.write ("s=screen;a+=\';s=\'+s.width+\'*\'+s.height\r\n");
document.write ("a+=\';d=\'+(s.colorDepth?s.colorDepth:s.pixelDepth)\r\n");
document.write ("js=12//--></scri");
document.write ("pt><scri");
document.write ("pt language=\"JavaScri");
document.write ("pt1.3\" type=\"text/javascri");
document.write ("pt\"><!--\r\n");
document.write ("js=13//--></scri");
document.write ("pt><scri");
document.write ("pt language=\"JavaScri");
document.write ("pt\" type=\"text/javascri");
document.write ("pt\"><!--\r\n");
document.write ("d.write(\'<a href=\"http://top.mail.ru/jump?from=355577\"\'+\r\n");
document.write ("\' target=_top><img src=\"http://top.list.ru/counter\'+\r\n");
document.write ("\'?id=355577;t=91;js=\'+js+a+\';rand=\'+Math.random()+\r\n");
document.write ("\'\" alt=\"Рейтинг@Mail.ru\"\'+\' ><\\/a>\')\r\n");
document.write ("if(11<js)d.write(\'<\'+\'!-- \')//--></scri");
document.write ("pt><noscri");
document.write ("pt>\r\n");
document.write ("<img src=\"http://top.list.ru/counter?js=na;id=355577;t=91\"></noscri");
document.write ("pt><scri");
document.write ("pt language=\"JavaScri");
document.write ("pt\" type=\"text/javascri");
document.write ("pt\"><!--\r\n");
document.write ("if(11<js)d.write(\'--\'+\'>\')//--></scri");
document.write ("pt>\r\n");
document.write ("<img src=\"http://www.artforum.ru/toplist/counter.cfm?id=65\">\r\n");
document.write ("<img src=\"http://counter.rambler.ru/top100.cnt?534143\">\r\n");
document.write ("<scri");
document.write ("pt language=\"JavaScri");
document.write ("pt\">document.write(\'<a href=\"http://www.rax.ru/click\" target=_blank><img src=\"http://counter.yadro.ru/hit?t16.6;r\' + escape(document.referrer) + ((typeof(screen)==\'undefined\')?\'\':\';s\'+screen.width+\'*\'+screen.height+\'*\'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + \';\' + Math.random() + \'\" border=0 width=88 height=31></a>\')</scri");
document.write ("pt>\r\n");
document.write ("</div>\r\n");


function link(url) { 
	link = window.open("http://"+url,"Link","toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=yes,resizable=1"); 
	link.focus();
}

function Link(url) { 
	link = window.open(url,"Link","toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=yes,resizable=1"); 
	link.focus();
}

function e_mail() {
	document.write ("<a href=\"mailto:&#105;&#110;&#102;&#111;&#64;&#115;&#103;&#97;&#108;&#108;&#101;&#114;&#121;&#46;&#110;&#101;&#116;?subject=from sgallery visitor\">E-mail</a>\r\n");
}

var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder){
	if (window.event&&event.srcElement.value.length>=maxlength)
	return false
	else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
	var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
	if (pressedkey.test(String.fromCharCode(e.which)))
	e.stopPropagation()
}
}

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()
fromX = -185
fromX1 = -300
fromX2 = -400
fromY = 10
fromY1 = -20
fromY3 = -110
function makeObj(obj){								
   	this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
	if(!this.evnt) return false
	this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0;	
   	this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0;		
	this.writeIt=b_writeIt;																
	return this
}
var px = bw.ns4||window.opera?"":"px";
function b_writeIt(text){
	if (bw.ns4){this.wref.write(text);this.wref.close()}
	else this.wref.innerHTML = text
}
var descx = 0
var descy = 0
function popmousemove(e){descx=bw.ns4||bw.ns6?e.pageX:event.x; descy=bw.ns4||bw.ns6?e.pageY:event.y
}
var oDesc;
function popup(num){
    if(oDesc){
	oDesc.writeIt('<div class="clDescription">'+messages[num]+'</div>')
	if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
	oDesc.css.left = (descx+fromX)+px
	oDesc.css.top = (descy+fromY)+px
	oDesc.css.visibility = "visible"
    }
}
function popup1(num){
    if(oDesc){
	oDesc.writeIt('<div class="clDescription">'+messages[num]+'</div>')
	if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
	oDesc.css.left = (descx+fromX1)+px
	oDesc.css.top = (descy+fromY1)+px
	oDesc.css.visibility = "visible"
    }
}
function popup2(num){
    if(oDesc){
	oDesc.writeIt('<div class="clDescription">'+messages[num]+'</div>')
	if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
	oDesc.css.left = (descx+fromX2)+px
	oDesc.css.top = (descy+fromY)+px
	oDesc.css.visibility = "visible"
    }
}
function popup3(num){
    if(oDesc){
	oDesc.writeIt('<div class="clDescription">'+messages[num]+'</div>')
	if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
	oDesc.css.left = (descx+fromX1)+px
	oDesc.css.top = (descy+fromY3)+px
	oDesc.css.visibility = "visible"
    }
}
function popout(){
	if(oDesc) oDesc.css.visibility = "hidden"
}
function setPopup(){
   	if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
   	document.onmousemove = popmousemove;
	oDesc = new makeObj('divDescription')
}

function alp(cur,which){
	strength=(which==0)? 1 : 0.2
	if (cur.style.MozOpacity)
	cur.style.MozOpacity=strength
	else if (cur.filters)
	cur.filters.alpha.opacity=strength*100
}

function alp2(cur,which){
	strength=(which==0)? 1 : 0.2
	if (cur.style.MozOpacity)
	cur.style.MozOpacity=strength
	else if (cur.filters)
	cur.filters.alpha.opacity=strength*250
}
function fnews_alert(theForm)
{
if (theForm.email.value == "Enter Email")
{
alert("Please enter a value for the \"E-mail address\" field.");
	theForm.email.focus();
	return (false);
}
if (theForm.email.value == "")
{
alert("Please enter a value for the \"E-mail address\" field.");
	theForm.email.focus();
	return (false);
}
if (theForm.email.value.length < 7)
{
alert("Please enter a value for the \"Email\" field.");
	theForm.email.focus();
	return (false);
}
if (theForm.name.value == "")
{
alert("Please enter a value for the \"Name\" field.");
	theForm.name.focus();
	return (false);
}
if (theForm.name.value == "Your name")
{
alert("Please enter a value for the \"Name\" field.");
	theForm.name.focus();
	return (false);
}
return (true);
}
