//<![CDATA[
	/***********************************************
	* Dynamic Drive DHTML code
	* http://www.dynamicdrive.com/
	***********************************************/
	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 countlimit(maxlength,e,placeholder)
	{
		var theform=eval(placeholder)
		var lengthleft=maxlength-theform.value.length
		var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
		if (window.event||e.target&&e.target==eval(placeholder))
		{
			if (lengthleft<0) theform.value=theform.value.substring(0,maxlength)
			placeholderobj.innerHTML=lengthleft
		}
	}
	function displaylimit(thename, theid, thelimit)
	{
		var theform=theid!=""? document.getElementById(theid) : thename
		var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b>'
		if (document.all||ns6)
			document.write(limit_text)
		if (document.all)
		{
			eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
			eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
		} else if (ns6)
		{
			document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
			document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
		}
	}
	/*********************************************
	* Part of MZ_CMS
	* http://www.zelenkov.net/
	*********************************************/
	/*********************************************
	* deletion account
	*********************************************/
	function check_account_delete(form_name,alert_note,confirm_note)
	{
		if(form_name.userpassword.value.search("^(.+)(.+)$") == -1)
		{
			alert(alert_note);
			return false;
		}
		if(confirm_use(confirm_note))
		{ 
			form_name.action.value="delete";
			form_name.submit(); 
		}
	}
	
	/*********************************************
	*
	*********************************************/
	function getBrowserInfo()
	{
		var browser_name,browser_version = undefined;
		if (window.opera) browser_name = 'Opera';
		else if (document.all)
		{
			browser_name = 'IE';
			var nv = navigator.appVersion;
			var string = nv.indexOf('MSIE')+5;
			browser_version = nv.substring(string,string+1);
		} else if (navigator.appName) browser_name = 'Netscape';
		return {type:browser_name,version:browser_version};
	}
	/*********************************************
	*
	*********************************************/
	function bookmark(a)
	{
		var url = window.document.location;
		var title = window.document.title;
		var browser = getBrowserInfo();
		if (browser.type == 'IE' && 7 > browser.version && browser.version >= 4) window.external.AddFavorite(url,title);
		else if (browser.type == 'Opera')
		{
			a.href = url;
			a.rel = "sidebar";
			a.title = url+','+title;
			return true;
		} else if (browser.type == "Netscape") window.sidebar.addPanel(title,url,"");
		return false;
	}
	
	/*********************************************
	*
	*********************************************/
	function printpage(confirm_note)
	{
		if (window.print)
		{
			agree = confirm(confirm_note);
			if (agree) window.print(); 
		}
	}
	/*********************************************
	*
	*********************************************/
   var image_open = new Image();
   image_open.src = "/images/open.gif";
   var image_closed = new Image();
   image_closed.src = "/images/closed.gif";
	function toggle(image, section)
   {
      if(document.all)
	  {
        if(document.all[section].style.display == "block")
		{
           document.all[section].style.display = "none";
           document.all[image].src = image_closed.src;
        } else
        {              
           document.all[section].style.display = "block";
           document.all[image].src = image_open.src;
        }
      } else
      {
    	if(document.getElementById(section).style.display == "block")
	 	 {
         document.getElementById(section).style.display = "none";
         document.getElementById(image).src = image_closed.src;
         } else
         {              
         document.getElementById(section).style.display = "block";
         document.getElementById(image).src = image_open.src;
         }
      }
   }
	/*********************************************
	*
	*********************************************/
	function viewimage (fname,image_width,image_height)
	{
		window.open("viewimage.php?fname="+fname,"Handheld","height="+image_height+",width="+image_width+",left=80,top=80");
//		window.open("viewimage.php?fname="+fname,"image","height="+screen.availHeight+",width="+screen.availWidth+",left=80,top=80,resizable=yes,scrollbars=yes");
	}
/*
function openWindow(url, width, height, articul) {
	var feat = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height+', top=100, left=150';
 //  opinion = window.open(url,"Handheld", feat);
 	if( opinion != null ) {
		opinion.close();
	}
 	opinion = window.open('', "articul", feat);
	
	var pg = '<html><title>'+articul+'</title><body leftmargin="0" topmargin="0"> <img src="'+url+'"></body></html>';
	opinion.document.write( pg );
}
*/
	function popopen(popid) 
	{
		document.getElementById(popid).style.display='block';
	}      
	function popclose (popid)
	{	
		document.getElementById(popid).style.display='none';
	}


	function hided_open(popid) 
	{
		hided_close_all();
		document.getElementById(popid).style.display='block';
	}      
	function hided_close (popid)
	{	
		document.getElementById(popid).style.display='none';
	}
   function hided_show_all()
   {
     var divNodeList = document.getElementsByTagName('div'); 
     for (i = 0; i < divNodeList.length; i++)
	 { 
        if(divNodeList[i].id)
		{
           divNodeList[i].style.display = "block";
//		    document.getElementById('menu_' + divNodeList[i].id.substr(5)).src = "images/open.gif";
        }
     }
   }
   function hided_close_all()
   {
     var divNodeList = document.getElementsByTagName('div'); 
     for (i = 0; i < divNodeList.length; i++)
	 { 
        if(divNodeList[i].id)
		{
           divNodeList[i].style.display = "none";
//		    document.getElementById('menu_' + divNodeList[i].id.substr(5).src = "images/closed.gif";
        }
     }
   }

//]]>