function menu ()
{
this.elemId=-1;
this.elem;
this.x;
}
menu.prototype.init=function(dev)
{
if (this.elem)
	{
	this.elem.style.display='none';
	if (document.getElementById(this.elemId))
		{
		this.elem=document.getElementById(this.elemId);
		this.elem.style.left=dev+'px';
		this.x=this.elem.style.left;
		
		this.elem.style.display='block';
		}
	}
else
	{
	if (document.getElementById(this.elemId))
		{
		this.elem=document.getElementById(this.elemId);
		this.elem.style.left=dev+'px';
		this.x=this.elem.style.left;
		this.elem.style.display='block';
		}
	}
}
menu.prototype.beginMove=function(evt)
{
evt=(evt)?evt:(window.event)?window.event : "";
var elem=(evt.target)?evt.target:evt.srcElement;
if (elem.tagName=='A'||elem.tagName=='a')elem=elem.parentNode;
var devx=parseInt(document.getElementById('mc').offsetLeft);
devx+=parseInt(elem.offsetLeft)-10;

this.init(devx);
}
menu.prototype.hide=function(id)
{
	if (id==this.elemId)this.elem.style.display='none';
}

var myMenu=new menu();
var timeout_id;
function flashObj(name,id,arg,w,h,align,classname,fvars,scale)
{
this.id=id;
this.name=name;
this.src=arg;
if (scale)this.scale=scale;
else this.scale='';
if (document.getElementById(id)) this.elem=document.getElementById(id);
else this.elem=false;
if (w!='0') {this.width=' width="'+w+'"';}
else this.width='';
if (h!='0') {this.height=' height="'+h+'"';}
else this.height='';
if (classname.length>0)
this.classname=' class="'+classname+'"';
else this.classname='';
if (fvars.length>0)this.fvars='<PARAM NAME=FlashVars VALUE="'+fvars+'">';
else this.fvars='';
this.align=' align="'+align+'"';	
this.counter=0;
this.timeoutId;
this.writeFlash();
}
flashObj.prototype.writeFlash=function()
{
var alterscale='';
var fl='<object '+this.classname+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id=fl'+this.id+' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'+this.width+this.height+this.align+'>';
fl=fl+'<param name="allowScriptAccess" value="sameDomain" />';
fl=fl+'<param name="movie" value="'+this.src+'" /><param name="quality" value="autohigh" />';
fl=fl+'<param name="menu" value="false" /><param name="wmode" value="transparent" />';
if (this.scale.length>0)
	{
	fl=fl+'<param name="scale" value="'+this.scale+'" />';
	alterscale=' scale="'+this.scale+'" ';
	}
fl=fl+this.fvars;
fl=fl+'<embed  '+this.classname+'" src="'+this.src+'" '+alterscale+' quality="autohigh" wmode="transparent" id=ffl'+this.id+this.width+this.height+this.align+'  allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
fl=fl+'</embed></object>';
this.elem.innerHTML=fl;
if (parseInt(this.elem.offsetWidth)==0&&this.counter<5)
	{
	this.timeoutId = setTimeout(this.name+".writeFlash()", 30);
	}
else clearTimeout(this.timeoutId);
}


var timeout_id;
	function writeFlash(id,arg,w,h,align,fvars) {
var fl='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id=fl'+id+' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'" align="'+align+'">';
fl=fl+'<param name="allowScriptAccess" value="sameDomain" />';
fl=fl+'<param name="movie" value="'+arg+'" /><param name="quality" value="autohigh" />';
fl=fl+'<param name="menu" value="false" /><param name="wmode" value="transparent" />';
if (fvars.length>0)fl=fl+'<PARAM NAME=FlashVars VALUE="'+fvars+'">';
fl=fl+'<embed src="'+arg+'" ';
if (fvars.length>0)fl=fl+' FlashVars="'+fvars+'" ';
fl=fl+' quality="autohigh" wmode="transparent" id=ffl'+id+'  width="'+w+'" height="'+h+'" align="'+align+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
fl=fl+'</embed></object>';

    document.getElementById(id).innerHTML =fl;
} 
var isIE4=(navigator.appName.indexOf("Microsoft")==0);
if (navigator.userAgent.indexOf("Opera")>-1)
	var isOpera=true;
String.prototype.trim=new Function("return this.replace(/^\\s+|\\s+$/g,'')");
String.prototype.trimPhone=new Function("return this.replace(/[0-9]*[()]{0,1}[-]*[+]{0,1}[ \t]*/g,'')");
String.prototype.trimDec=new Function("return this.replace(/[0-9]*/g,'')");
function testphone()
{
var str='';
var val=this.value.trimPhone();
if (val.length>0)
	{
	str='Вы неправильно заполнили обязательное поле "'+this.defaultValue+'"';
	this.error=true;
	this.domEl.style.color=this.errorcolor;
	}
else
	{
	this.error=false;
	this.domEl.style.color=this.color;
	}
if (this.diverr)this.diverr.innerHTML=str;
}


function testpdec()
{
var str='';
var val=this.value.trimDec();
if (val.length>0)
	{
	str='Вы неправильно заполнили обязательное поле "'+this.defaultValue+'"';
	this.error=true;
	this.domEl.style.color=this.errorcolor;
	}
else
	{
	this.error=false;
	this.domEl.style.color=this.color;
	}
if (this.diverr)this.diverr.innerHTML=str;
}
inhtObject=function (name,value)
	{
	this.name=name;
	this.value=value;
	}

coords=function (x,y)
	{
	this.x=x;
	this.y=y;
	}
var myw;
var myh;
coord=new coords(0,10);	
colorObject=function ()
	{
	this.color1='#ff0000';
	this.color2='#737379';
	}
var colobj=new colorObject();
propObject = function(minvalue,requred,ajax,defaultValue,linked,defaultFill,testetTogether,beginload,testedTogetherJs,testedTogetherJsMet)
{
this.minvalue=minvalue;
this.requred=requred;
this.ajax=ajax;
this.defaultValue=defaultValue;
this.linked=linked;
this.defaultFill=defaultFill;
this.testetTogether=testetTogether;
this.testedTogetherJs=testedTogetherJs;
this.testedTogetherJsMet=testedTogetherJsMet;
this.beginload=beginload;
}




var Properties=new Array();

ContentLoader=function (url,method,params,component)
	{
	this.head=false;
	this.component=component;
	this.url=url;
	this.method=method;
	this.params=params;
	this.par='';
	}

ContentLoader.prototype.getTransport=function()
	{
	var transport=null;
	try
		{
       	transport=new ActiveXObject('Msxml2.XMLHTTP');
    	}
	catch (e)
		{
		try
			{
	        transport=new ActiveXObject('Microsoft.XMLHTTP');
    	    }
		catch (e)
			{
			if(window.XMLHttpRequest)
				{
				transport=new XMLHttpRequest();
            	}
        	}
		}
    return transport;	
	}


ContentLoader.prototype.setParams=function()
	{
	if (!this.method) this.method="GET";
	if (this.method=="POST")
		{
		this.head='application/x-www-form-urlencoded';
		var parL=this.params.length;
		if (parL>0)
			{
			this.par= this.params[0].name +'=' + encodeURIComponent(this.params[0].value);
			for (i=1;i<parL;i++)
				{
				this.par+='&' + this.params[i].name +'=' + encodeURIComponent( this.params[i].value);
				}
			}
		}

	}

	
ContentLoader.prototype.loadXMLDoc=function ()
		{
		var request=this.getTransport();
		if (request)
			{
			this.setParams();
			if (request.overrideMimeType)
				{
        		request.overrideMimeType('text/html');
        		}
			var loader=this;
			request.onreadystatechange=function ()
				{
				loader.onReadyState(request);
				}
			request.open (this.method,this.url,true);
			if (this.head)
				{
				request.setRequestHeader("Content-Type",this.head);
				request.setRequestHeader("Content-length", this.params.length);
      			request.setRequestHeader("Connection", "close");
				}
			request.send (this.par);
			}
		}
		
ContentLoader.prototype.onReadyState=function (request)
		{
		var ready=request.readyState;	
		if (ready==4)
			{
			var httpStatus=request.status;
			if (httpStatus==200||httpStatus==0)
				{
				if (this.component.ajaxUpdate) this.component.ajaxUpdate(request);
				else
					{
					this.component=new chekf(this.component,this.component.id)
					this.component.ajaxUpdate(request);
					}
				}
			}
		}
		

chekf=function (domEl,name,node_id)
	{
	this.name=name;
	this.id=domEl.id;
	this.url='/index.'+'php?action=sendform&id='+node_id+'&formid='+this.id;
	this.domEl=domEl;
	this.childs=this.domEl.elements;
	this.elemNumb=this.childs.length;
	this.divid=this.domEl.parentNode.id;
	this.diverr=this.id+'err';
	this.childobjs=new Array();
	this.childNumb=this.childobjs.length;
	this.beginload=false;
	this.domEl.inpuObj=this;
	this.domEl.onsubmit=this.sendForm;
	this.error=false;
	this.wait=false;
	this.timeout_id;
	this.sending=false;
	}

	
checkstatic=function (domEl,name,url)
	{
	this.name=name;
	this.id=domEl.id;
	this.url=url;
	this.domEl=domEl;
	this.diverr=this.id;
	this.domEl.inpuObj=this;
	}

checkstatic.prototype.ajaxUpdate=function(request)
	{
	var div=document.getElementById(this.diverr);
	var data=request.responseText;
	var arr = data.split('myperfectdevidehtml');
	var unchange=false;
	if (arr.length>1)
		{
		if (arr[1]=='myperfectsamehtml')
			{
			var testinner=new String(div.innerHTML);
			var testar=testinner.split('<script>');
			if (testar.length==1)testar=testinner.split('<SCRIPT>');
			arr[1]=testar[0];
			unchange=true;
			}
		div.innerHTML=arr[1];
		}
	arr = data.split('myperfectdevidejavascript');
	if (arr.length>1)
		{
		var theScript;
		if (unchange)
			{
			if (testar.length>1&&testar[1].length>0)
				{
				testinner=testar[1].split('<'+'/script>');
				if (testinner.length==1)testinner=testar[1].split('</'+'SCRIPT>');
				theScript= document.createElement('script');
				theScript.text=testinner[0];
				div.appendChild(theScript);
				} 
			}
		if (arr[1].length>0)
			{
			theScript= document.createElement('script');
			theScript.text = arr[1];
			div.appendChild(theScript);
			}
		}
	
	}

	
chekf.prototype.ajaxUpdate=function(request)
	{
	var div=document.getElementById(this.diverr);
	var data=request.responseText;
	var arr = data.split('myperfectdevidehtml');
	var unchange=false;
	if (arr.length>1)
		{
		if (arr[1]=='myperfectsamehtml')
			{
			var testinner=new String(div.innerHTML);
			var testar=testinner.split('<script>');
			if (testar.length==1)testar=testinner.split('<SCRIPT>');
			arr[1]=testar[0];
			unchange=true;
			}
		div.innerHTML=arr[1];
		}
	arr = data.split('myperfectdevidejavascript');
	if (arr.length>1)
		{
		var theScript;
		if (unchange)
			{
			if (testar.length>1&&testar[1].length>0)
				{
				testinner=testar[1].split('<'+'/script>');
				if (testinner.length==1)testinner=testar[1].split('</'+'SCRIPT>');
				theScript= document.createElement('script');
				theScript.text=testinner[0];
				div.appendChild(theScript);
				} 
			}
		if (arr[1].length>0)
			{
			theScript= document.createElement('script');
			theScript.text = arr[1];
			div.appendChild(theScript);
			}
		}
	
	}
	

chekf.prototype.checkError=function()
		{
		this.error=false;
		document.getElementById(this.diverr).innerHTML='';
		if (this.beginload)
			{
			var inner='';
			for (var i=0;i<this.childNumb;i++)
				if (this.childobjs[i].error==true)
					{
					this.error=true;
					}
				else
					{
					if (!this.childobjs[i].beginload&&this.childobjs[i].requred)
						{
						if (this.childobjs[i].diverr)this.childobjs[i].diverr.innerHTML='<br>Вы не заполнили обязательное поле ' + this.childobjs[i].defaultValue;	
						else inner=inner + '<br>Вы не заполнили обязательное поле ' + this.childobjs[i].defaultValue;						
						this.error=true;
						}
					}
			if (inner.length>0) document.getElementById(this.diverr).innerHTML=inner;
			}
		else
			{
			this.error=true;
			document.getElementById(this.diverr).innerHTML='Вы не заполнили форму';
			}
		}

chekf.prototype.checkWait=function()
		{
		this.wait=false;
		for (var i=0;i<this.childNumb;i++)
			if (this.childobjs[i].wait)
				{
				this.wait=true;
				break;
				}
		}

	
chekf.prototype.prepareForm=function()
	{
	for (var i=0;i<this.elemNumb;i++)
		{
		if (this.childs[i].value==this.childs[i].defaultValue)this.childs[i].value='';
		}
	}
chekf.prototype.createForm=function()
	{
	var prl=Properties.length;
	for (var i=0;i<this.elemNumb;i++)
		{
		if (this.domEl.elements[i].type!='radio'&&this.domEl.elements[i].type!='checkbox'&&this.domEl.elements[i].type!='button')this.childs[i].value='';
		else if (this.domEl.elements[i].type=='checkbox')this.domEl.elements[i].checked=false;
		this.childobjs[i]=new chekEl(this.childs[i]);
			

		if (Properties[this.childobjs[i].id])
			{
			this.childobjs[i].minvalue=Properties[this.childobjs[i].id].minvalue;
			this.childobjs[i].requred=Properties[this.childobjs[i].id].requred;
			this.childobjs[i].ajax=Properties[this.childobjs[i].id].ajax;
			this.childobjs[i].defaultValue=Properties[this.childobjs[i].id].defaultValue;
			this.childobjs[i].linked=Properties[this.childobjs[i].id].linked;
			this.childobjs[i].defaultFill=Properties[this.childobjs[i].id].defaultFill;
			this.childobjs[i].testetTogether=Properties[this.childobjs[i].id].testetTogether;
			this.childobjs[i].beginload=Properties[this.childobjs[i].id].beginload;
			this.childobjs[i].testedTogetherJs=Properties[this.childobjs[i].id].testedTogetherJs;
			this.childobjs[i].testedTogetherJsMet=Properties[this.childobjs[i].id].testedTogetherJsMet;
			}
		}
	this.childNumb=this.childobjs.length;
	}
	
chekf.prototype.clearForm=function()
	{
	for (var i=0;i<this.elemNumb;i++)
		{
		this.childs[i].value=this.childs[i].clearMe();
		}
	}

chekf.prototype.checkForm=function()
	{
	for (var i=0;i<this.elemNumb;i++)
		{
		this.childs[i].CheckMe();
		}
	}

chekf.prototype.sendForm=function()
	{
	if (!this.id)
		{
		var inpuObj=this.inpuObj.formEl.inpuObj;
		}
	else
		{
		var inpuObj=this;
		}
	var cmd=inpuObj.name+'.sendForm()';
	inpuObj.sending=true;
	inpuObj.checkWait();
	if (!inpuObj.wait)
		{
		if (inpuObj.timeout_id)clearTimeout(inpuObj.timeout_id);
		inpuObj.checkError();
		if (!inpuObj.error)
			{
			var name;
			var name1;
			var name2;
			var arrmypar=''
			for (var i=0;i<inpuObj.elemNumb;i++)
				{
				if ((inpuObj.domEl.elements[i].type!='radio'&&inpuObj.domEl.elements[i].type!='checkbox')||(inpuObj.domEl.elements[i].checked))
					{
					name='var par'+i;
					name2='par'+i;
					name1=name+'= new inhtObject(inpuObj.domEl.elements[i].name,inpuObj.domEl.elements[i].value);';
					eval(name1);
					arrmypar=arrmypar+','+name2;
					}
				}
			arrmyparL=arrmypar.length;
			arrmyparF='new Array('+arrmypar.substring(1,arrmyparL)+');';
			pars=eval(arrmyparF);	
			var sender=new ContentLoader(inpuObj.url,'POST',pars,inpuObj);
			sender.loadXMLDoc();
			}
		}
	else
		{
		inpuObj.timeout_id=setTimeout (cmd,50);
		}
	}
		
		
chekEl=function (domEl)
	{
	this.domEl=domEl;
	this.defaultFill=true;
	this.linked=false;
	this.id=domEl.id;
	this.testetTogether=false;
	this.requred=false;
	this.formEl=this.domEl.form;
	this.divid=this.id+'err';
	this.beginload=false;
	this.name=this.domEl.name;
	this.testedTogetherJs=false;
	this.testedTogetherJsMet=false;
	if (document.getElementById(this.divid))
	this.diverr=document.getElementById(this.divid);
	else this.diverr=null;
	this.value=this.domEl.value;
	this.defaultValue=this.domEl.defaultValue;
	this.color=colobj.color2;
	this.errorcolor=colobj.color1;
	this.minvalue=0;
	this.methodset=false;
	this.error=false;	
	this.wait=false;
	this.nodeid=false;
	this.domEl.inpuObj=this;
	this.domEl.onfocus=this.prepareMe;
	this.domEl.onblur=this.tryMe;
	if (this.domEl.type=='button'&&!this.methodset)
		{
		this.domEl.onclick=this.formEl.inpuObj.sendForm;
		this.domEl.onfocus=null;
		this.domEl.onblur=null;
		this.methodset=true;
		this.beginload=true;
		}
	}

chekEl.prototype.ajaxUpdate=function(request)
	{
//	alert (this)
	var div=this.diverr;
	var data=request.responseText;
	var arr = data.split("myperfectdevidehtml");
	var unchange=false;
	if (arr.length>1)
		{
		if (arr[1]=="myperfectsamehtml")
			{
			var testinner=new String(div.innerHTML);
			var testar=testinner.split("<"+"script>");
			if (testar.length==1)testar=testinner.split("<"+"SCRIPT>");
			arr[1]=testar[0];
			unchange=true;
			div.innerHTML=arr[1];
			}
		else
			{
			if (arr[1].length==0)
				{
				this.error=false;
				this.domEl.style.color=this.color;
				div.innerHTML='';
				}
			else
				{
				this.error=true;
				this.domEl.style.color=this.errorcolor;
				div.innerHTML=arr[1];
				}
			}
		}
	arr = data.split("myperfectdevidejavascript");
	if (arr.length>1)
		{
		var theScript;
		if (unchange)
			{
			if (testar.length>1&&testar[1].length>0)
				{
				testinner=testar[1].split("</"+"script>");
				if (testinner.length==1)testinner=testar[1].split("</"+"SCRIPT>");
				theScript= document.createElement('script');
				theScript.text=testinner[0];
				div.appendChild(theScript);
				} 
			}
		if (arr[1].length>0)
			{
			theScript= document.createElement('script');
			theScript.text = arr[1];
			div.appendChild(theScript);
			}
		}
	this.wait=false;
	}

chekEl.prototype.prepareMe=function()
{
var inpuObj;
if (this.parentNode)inpuObj=this.inpuObj;
else inpuObj=this;
if (!inpuObj.beginload)
	{
	inpuObj.formEl.inpuObj.beginload=true;
	if (inpuObj.domEl.type!='radio'&&inpuObj.domEl.type!='checkbox')
		{
		inpuObj.value='';
		inpuObj.domEl.value='';
		}
	inpuObj.beginload=true;
	}
}

chekEl.prototype.tryMe=function()
{
var inpuObj=this.inpuObj;
if (inpuObj.beginload)
	{
	inpuObj.value=this.value;
	inpuObj.checkMe();	
	}
}



function testphone()
{
var str='';
var val=this.value.trimPhone();
if (val.length>0)
	{
	str='Вы неправильно заполнили обязательное поле "'+this.defaultValue+'"';
	this.error=true;
	this.domEl.style.color=this.errorcolor;
	}
else
	{
	this.error=false;
	this.domEl.style.color=this.color;
	}
if (this.diverr)this.diverr.innerHTML=str;
}


function testpdec()
{
var str='';
var val=this.value.trimDec();
if (val.length>0)
	{
	str='Вы неправильно заполнили обязательное поле "'+this.defaultValue+'"';
	this.error=true;
	this.domEl.style.color=this.errorcolor;
	}
else
	{
	this.error=false;
	this.domEl.style.color=this.color;
	}
if (this.diverr)this.diverr.innerHTML=str;
}


chekEl.prototype.checkMe=function()
	{
	var inpuObj=this;
	var mess;
	if (inpuObj.requred)
		{
		if (inpuObj.ajax)inpuObj.wait=true;
		var str=new String(inpuObj.value);
		inpuObj.value=str.trim();
		if (inpuObj.value.length<=inpuObj.minvalue)
			{
			inpuObj.error=true;
			if (inpuObj.minvalue==0)
				{
				mess='Вы не заполнили обязательное поле "'+inpuObj.defaultValue+ '"';
				inpuObj.clearMe();
				}
			else mess='Длина обязательного поля "'+inpuObj.defaultValue+ '" меньше '+inpuObj.minvalue;
			if (inpuObj.diverr)inpuObj.diverr.innerHTML=mess;
			inpuObj.domEl.style.color=inpuObj.errorcolor;				 
			}
		else
			{
			if (inpuObj.testedTogetherJsMet) inpuObj.testedTogetherJsMet.call(inpuObj);
			else inpuObj.error=false;
			if (!inpuObj.error)	
				{
				if (inpuObj.ajax)
					{
					var pars;
					inpuObj.wait=true;
					if (inpuObj.testetTogether)
						{
						var formob=inpuObj.formEl.inpuObj;
						var name;
						var name1;
						var name2;
						var arrmypar=''
						for (var k=0;k<formob.childNumb;k++)
							{
							if (formob.childobjs[k].beginload)
								{
								name='var par'+k;
								name2='par'+k;
								name1=name+'= new inhtObject(formob.childobjs[k].name,formob.childobjs[k].value);';
								eval(name1);
								arrmypar=arrmypar+','+name2;
								}
							}
						arrmyparL=arrmypar.length;
						arrmyparF='new Array('+arrmypar.substring(1,arrmyparL)+');';
						pars=eval(arrmyparF);
						}
					else
						{
						var par=new inhtObject(inpuObj.name,inpuObj.value);
						pars=new Array(par);
						}
					var url='/index.'+'php?action=check&what='+inpuObj.id;
					var sender= new ContentLoader(url,'POST',pars,inpuObj);
					sender.loadXMLDoc();
					}
				else
					{
					inpuObj.error=false;
					if (inpuObj.diverr&&inpuObj.diverr.innerHTML.length>0)inpuObj.diverr.innerHTML='';
					inpuObj.domEl.style.color=inpuObj.color;				 
					}	
				}
			}
		}
	}
		
chekEl.prototype.clearMe=function()
{
if (this.diverr) this.diverr.innerHTML='';
this.domEl.style.color=this.color;
if (this.defaultFill)
	{
	this.value=this.defaultValue;
	this.domEl.value=this.defaultValue;
	}
this.beginload=false;
}
function checkCoords(evt)
{
evt=(evt)?evt:(window.event)?window.event : ""
var elem=(evt.target)?evt.target:evt.srcElement;
var sdv=isNaN (window.scrollY)?elem.parentNode.parentNode.parentNode.parentNode.parentNode.offsetHeight-elem.parentNode.parentNode.offsetHeight+257:window.scrollY;
coord.x=30;
coord.y=evt.screenY;
y=evt.clientY+sdv;
y=257;
document.getElementById('formbig').style.top=y+'px';
document.getElementById('formbig').style.left='30px';
document.getElementById('formbig').style.visibility='visible';
document.getElementById('formbig').style.display='block';
}

function checkCoords1(evt)
{
evt=(evt)?evt:(window.event)?window.event : ""
var elem=(evt.target)?evt.target:evt.srcElement;
var sdv=isNaN (window.scrollY)?elem.parentNode.parentNode.parentNode.parentNode.parentNode.offsetHeight-elem.parentNode.parentNode.offsetHeight+257:window.scrollY;
coord.x=30;
coord.y=evt.screenY;
y=evt.clientY+sdv;
y=257;
document.getElementById('pictbig').style.top=y+'px';
document.getElementById('pictbig').style.left='30px';
document.getElementById('pictbig').style.visibility='visible';
document.getElementById('pictbig').style.display='block';
}

function closeMe()
{
document.getElementById('formbig').style.visibility='hidden';
document.getElementById('formbig').style.display='none';
}
function closeMe1()
{
document.getElementById('pictbig').style.visibility='hidden';
document.getElementById('pictbig').style.display='none';
}
function setActiveStyleSheet(name) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1){
		  a.disabled = true;
     }
	 }
document.getElementById('css').href=name;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1){
          a.disabled = false;
     }
}
if (name=='/p.css')document.getElementById('print').innerHTML="<a href=JavaScript:history.go(0);>вернуться</a>";
else document.getElementById('print').innerHTML="<a href=JavaScript:setActiveStyleSheet('/p.css');>версия для печати</a>";
}
