function intelicopyright(var1,var2)
{
	var currdate=new Date();
	var Year=currdate.getFullYear();
	var itext="";
	if(var1=="") { itext="&copy; "+Year+" "+var2; } else { itext="&copy; "+var1+" - "+Year+" "+var2; }
	document.write(itext);
}
function intelifieldcheck(var1,var2,var3,var4)
{
var color="";
var unicode="";
	if(var1=="num")
	{
		var unicode=var2.charCode? var2.charCode : var2.keyCode
		if (unicode!=8) { if (unicode<48||unicode>57) return false; }
	}
	else if(var1=="char")
	{
		var unicode=var2.charCode? var2.charCode : var2.keyCode
		if (unicode!=8) { if (unicode<64 && unicode<90) return false; }
	}
	else if(var1=="maxnum")
	{
		if(var2.value.length < var3)
		{
		var color="lightcoral";
		var2.style.background = color;
		document.getElementById('formmessage').innerHTML = "<h2><strong><font color=\""+color+"\"> "+var3+" - "+var4+" karakter<\/font><\/strong><\/h2>";
		}
		else
		{
			if(var2.value.length > var4)
			{
			var color="lightcoral";
			var2.style.background = color;
			var2.value= var2.value.substring(0,var4);
			document.getElementById('formmessage').innerHTML = "<h2><strong><font color=\""+color+"\"> "+var3+" - "+var4+" karakter<\/font><\/strong><\/h2>";
			}
			else
			{
			var color="lightgreen";
			var2.style.background = color;
			document.getElementById('formmessage').innerHTML = "<h2><strong><font color=\""+color+"\"> "+var3+" - "+var4+" karakter<\/font><\/strong><\/h2>";
			}
		}		
	}
	else
	{
	
	}
}
function loader(url, target)
{
	//document.getElementById(target).innerHTML = ' Betoltes...';
	if (window.XMLHttpRequest)
	{
	req = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
	req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (req != undefined)
	{
	req.onreadystatechange = function() {loaderDone(url, target);};
	req.open("GET", url, true);
	req.send("");
	}
}  

function loaderDone(url, target)
{
	if (req.readyState == 4)
	{
		if (req.status == 200)
		{
		document.getElementById(target).innerHTML = req.responseText;
		}
		else
		{
		document.getElementById(target).innerHTML=" Hiba a betoltes soran:\n"+ req.status + "\n" +req.statusText;
		}
	}
}

function inteliloader(name, div)
{
	if(name)
	{
	//setTimeout("loader(name,div)", 1000);
	loader(name,div);
	}
return false;
}


function inteliprint(id)
{
str=document.getElementById(id).innerHTML;
newwin=window.open('','printwin','left=200,top=100,width=500,height=600');
newwin.document.write('<html>\n<head>\n');
newwin.document.write('<title></title>\n');
newwin.document.write('<style type="text/css">\n');
newwin.document.write('body { font-family: Arial; font-weight: normal; background-color: #FFFFFF; }\n');
newwin.document.write('h1 { color: #598CBB; width: 487px; height: 40px; font-weight: bold; font-size: 11pt; }\n');
newwin.document.write('h2 { color: #999999; width: 487px; height: 20px; font-weight: normal; font-size: 8.5pt; }\n');
newwin.document.write('h3 { color: #999999; width: 487px; font-weight: normal; font-size: 8.5pt; }\n');
newwin.document.write('h4 { color: #999999; clear: both; width: 487px; line-height: 100px; height: 100px; font-weight: normal; font-size: 8.5pt; text-align: center; }\n');
newwin.document.write('h3 img { width: 244px; height: 244px; border:0; float: right; margin: 5px 0 10px 15px; }\n');
newwin.document.write('h1,h2,h3,body { margin: 0; padding: 10px; text-align: left; }\n');
newwin.document.write('</style>\n');
newwin.document.write('<script>\n');
newwin.document.write('function chkstate(){\n');
newwin.document.write('if(document.readyState=="complete"){\n');
newwin.document.write('window.close();\n');
newwin.document.write('}\n');
newwin.document.write('else{\n');
newwin.document.write('setTimeout("chkstate()",2000);\n');
newwin.document.write('}\n');
newwin.document.write('}\n');
newwin.document.write('function print_win(){\n');
newwin.document.write('window.print();\n');
newwin.document.write('chkstate();\n');
newwin.document.write('}\n');
newwin.document.write('<\/script>\n');
newwin.document.write('</head>\n');
newwin.document.write('<body onload="print_win();">\n');
newwin.document.write(str);
newwin.document.write('<h4><script>var currdate=new Date(); var Year=currdate.getFullYear(); var Month=currdate.getMonth()+1; var Day=currdate.getDate(); document.write(document.location.host+" - "+Year+"/"+Month+"/"+Day);</script></h4>\n');
newwin.document.write('</body>\n');
newwin.document.write('</html>\n');
newwin.document.close();
}
function inteliplayer2(src,width,height)
{
var id=Math.round(Math.random()*100000000);
var flashtohtml = new String();
}

function inteliplayer3(src,width,height)
{
var id=Math.round(Math.random()*100000000);
var flashtohtml = new String();
	flashtohtml += '<embed src="c/t/js/video.swf" ';
	flashtohtml += 'name="'+id+'" ';
	flashtohtml += 'width="'+width+'" ';
	flashtohtml += 'height="'+height+'" ';
	flashtohtml += 'allowscriptaccess="always" ';
	flashtohtml += 'allowfullscreen="true" ';
	flashtohtml += 'flashvars="video=../../../'+src+'&preview=../../../pictures/s/video.jpg&playerskin=c/t/js/COPM.swf" />';
	document.write(flashtohtml);
}

function inteliplayer(src,width,height)
{
var id=Math.round(Math.random()*100000000);
var version="9.0.0.0";
var bgcolor="FFFFFF";
var flashtohtml = new String();
	
	flashtohtml += '<object width="'+width+'" height="'+height+'" id="'+id+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">';
	flashtohtml += '<param name="movie" value="c/t/js/video.swf?video=../../../'+src+'&preview=../../../pictures/s/video.jpg" />';
	flashtohtml += '<param name="menu" value="false" />';
	flashtohtml += '<embed src="c/t/js/video.swf?video=../../../'+src+'&preview=../../../pictures/s/video.jpg" width="'+width+'" height="'+height+'" name="'+id+'" type="application/x-shockwave-flash" />';
	flashtohtml += '<\/object>';
	
document.write(flashtohtml);
}

function game(var1)
{
	if(var1=="sol")
	{
	var url='c/t/sol/solitaire.htm?';
	var gw="670";
	var gh="400";
	}
	else
	{
	var url='c/t/mj/mahjong.htm?';
	var gw="550";
	var gh="450";
	}
	var felso=Math.floor((screen.height-460)/2);
	var bal=Math.floor((screen.width-700)/2);
	usrwindow=window.open(url, var1, 'toolbar=no,scrollbars=no,menubar=no,top='+felso+',left='+bal+',resizable=no,status=yes,hotkeys=no,width='+gw+',height='+gh);
}

function inteliselected(var1,var2)
{
var replaces=0;
var intelimenu = document.getElementById(var1).getElementsByTagName('li');
	
	for (i=0; i<intelimenu.length; i++)
	{
	while (intelimenu[i].innerHTML.indexOf(var2) != -1 && replaces < 1)
		{
       		intelimenu[i].innerHTML = "<span>"+var2+"</span>";
		replaces++;
		}
	}
}
function inteliwindow(var1,var2,var3,var4,var5,var6,var7)
{
	if (var3=="pictures") { url='picture?pid='+var1+'&name='+var2+'&IMRSID='+var6; }
	if (var3=="orders") { url='print?pid='+var1+'&mode='+var3+'&IMRSID='+var6; }
	if (var3=="newsletter") { url='dump.php?file='+var1+'&mode='+var3+'&IMRSID='+var6; }
	if (var4=="") var4=200;
	if (var5=="") var5=200;
	if (var7=="") var7=no;
	felso=Math.floor((screen.height-var4)/2);
	bal=Math.floor((screen.width-var5)/2);
	if (typeof usrwindow != 'undefined') { if (!usrwindow.closed) { usrwindow.close(); } }
	usrwindow=window.open(url, var3, 'toolbar=no,scrollbars='+var7+',menubar=no,top='+felso+',left='+bal+',resizable=no,status=yes,hotkeys=no,width='+var4+',height='+var5);
}

function intelimail(var1)
{
var alltags=document.getElementsByTagName(var1);
	if(alltags!="")
	{
	var replaces=0;
	var i=0;
		for (i=0; i < alltags.length; i++)
		{
			while (alltags[i].innerHTML.indexOf('#kukac#') != -1 && replaces < 10000)
			{
       			alltags[i].innerHTML = alltags[i].innerHTML.replace('#kukac#', String.fromCharCode(64));
			alltags[i].innerHTML = alltags[i].innerHTML.replace('#pont#', String.fromCharCode(46));
			replaces++;
			}
		}
	}
}