

//####################################//


function checkInputData(type)
{
	if(type == 'int')
	{
		if((event.keyCode < 48) || (event.keyCode > 57) && event.keyCode != 13)
			event.returnValue = false;
	}
	else
	if(type == 'float')
	{
		if((event.keyCode < 48 || event.keyCode > 57)
			 && event.keyCode != 46 && event.keyCode != 44 && event.keyCode != 13)
			event.returnValue = false;
	}
}


//####################################//


function imgWnd(obj)
{
	if(obj == null)
		return false;

	var name = "imgWnd" + Math.ceil( Math.random() * 3000 );
		
	if(obj.tagName == "A" & obj.getAttribute("href") != null)
	{
		var loc = obj.getAttribute("href");
		wnd = window.open(loc , name, 'toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,resizable=yes,status=no,width=400,height=300');
		wnd.focus();
		return false;
	}
	else
	{
		return true;
	}
}


//####################################//


function displayMenu(id, menu)
{
	menuSrc = document.getElementById(menu);
	if(!menuSrc)
		return;
	img = document.getElementById("IMG_"+menu);
	
	if(menuSrc.style.display=="none")
	{
		menuSrc.style.display =  "block";
		
		if(img != null)
		{
			imgSrc = document.getElementById("IMG_"+menu).src;
			imgSrc = imgSrc.replace("plus", "minus");
			img.src = imgSrc;
		}
	}
	else
	{
		menuSrc.style.display =  "none";
		
		if(img != null)
		{
			imgSrc = document.getElementById("IMG_"+menu).src;
			imgSrc = imgSrc.replace("minus", "plus");
			img.src = imgSrc;
		}
	}
}


//####################################//


function cntrParams()
{
	params = "";
		
	var cntrFlash=""; var cntrCookies=0; var cntrJava=0; var ref=top.document.referrer;
	if(navigator.userAgent.toLowerCase().indexOf("msie")){
		msieFlashV=0;
		document.writeln("<s"+"cript language=\"VBScript\">\non error resume next\n msieFlashV=0");
		for (y=3;y<= 8;y++)document.writeln("if(IsNull(CreateObject(\"ShockwaveFlash.ShockwaveFlash."+y+"\"))) then dummy=0 else msieFlashV="+y+" end if");
		document.writeln("</s"+"cript>");
		if(msieFlashV > 0) cntrFlash="Shockwave Flash "+msieFlashV;
	}
	if(navigator.plugins["Shockwave Flash"] != null){ cntrFlash = navigator.plugins["Shockwave Flash"].description; }
	document.cookie="cntr_cook=1";cntrCookies=(document.cookie.indexOf("cntr_cook")!=-1)?1:0;cntrJava=(navigator.javaEnabled())?1:0;
	
	params = "referer="+escape(ref)+"&amp;screenres="+screen.width+"x"+screen.height+"&amp;colordepth="+screen.colorDepth+"&amp;doctitle="+document.title+"&amp;flash="+escape(cntrFlash)+"&amp;cookies="+cntrCookies+"&amp;js=1&amp;java="+cntrJava+"&amp;r="+Math.random();
	
	return params;
}


//####################################//


