function openChat() {
	window.open('/chat/','chat',"width=800,height=600,menubar=no,resizable=yes,toolbar=no,scrollbars=no");
}
function openLogin(lang,afterurl) {
	return ;
	lightwindowInit();
	if (afterurl=='') {
		afterurl='uloginfast';
	}
	myLightWindow.activateWindow({
		href: 'http://'+lang+'.tixik.com/user/'+afterurl,	
		type:'external',
		width:600,
		height:300		
	});
	
}

function openWin(lang,afterurl) {

	if (afterurl=='') {
		afterurl='user/ulogin';
	}	
	alert('asd');
	window.open('http://'+lang+'.tixik.com/'+afterurl);	
	
	
}

function clickwatch(nazev) {
	new Ajax.Updater(
				'none', 
				'/ajax/clickwatch/'	,
					{
					method: 'post', 					
					postBody:'&nazev='+nazev						
				});
}

function bookmark(){
    var title=document.title;
    var url="http://www.tixik.com"

    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);

}

function updater(par,id,id1,id2,id3) {
	
	var showcil = new Ajax.Updater(
				id, 
				'/ajax/'+par+'/'	,
					{
					method: 'post', 
					
					evalScripts:true,
					postBody:'&id='+id1+'&id2='+id2+'&id3='+id3						
				});
}


function getWindowSize()
		    {
			    var e = new Object();
			    if(window.self && self.innerWidth)
			    {
				    e.width = self.innerWidth;
				    e.height = self.innerHeight;
			    }
			    else if(document.documentElement &&
		document.documentElement.clientHeight)
			    {
				    e.width = document.documentElement.clientWidth;
				    e.height = document.documentElement.clientHeight;
			    }else
			    {
				    e.width = document.body.clientWidth;
				    e.height = document.body.clientHeight;
			    }
			    return e
		    } 
		    
		    function selectset(id, value) {
		    	var id=document.getElementById(id);
		    	id.value=value;
				//alert('asd');
			}
			
			var checked=false;
			function checkedAll (frm1) {
				var aa= document.getElementById(frm1);
				 if (checked == false)
			          {
			           checked = true
			          }
			        else
			          {
			          checked = false
			          }
				for (var i =0; i < aa.elements.length; i++) 
				{
				 aa.elements[i].checked = checked;
				}
      }
			
			

			function showhelp(a) {
						   document.getElementById('helper').style.display='block';	
							document.getElementById('helper').innerHTML=a;
							//Effect.Appear('helper',{duration:.2});
			}
						
			function hidehelp() {
							//Effect.Fade('helper',{duration:.2});
				   document.getElementById('helper').style.display='none';
			}


						
						
						// Detect if the browser is IE or not.
						// If it is not IE, we assume that the browser is NS.
						var IE = document.all?true:false
						
						// If NS -- that is, !IE -- then set up for mouse capture
						if (!IE) document.captureEvents(Event.MOUSEMOVE)
						
						// Set-up to use getMouseXY function onMouseMove
						
						
						// Temporary variables to hold mouse x-y pos.s
						var tempX = 0
						var tempY = 0
						
						// Main function to retrieve mouse x-y pos.s
						
						function getMouseXY(e) {
						  if (IE) { // grab the x-y pos.s if browser is IE
						    tempX = event.clientX + document.body.scrollLeft
						    tempY = event.clientY + document.body.scrollTop
						  } else {  // grab the x-y pos.s if browser is NS
						    tempX = e.pageX
						    tempY = e.pageY
						  }  
						  
						 
						  // catch possible negative values in NS4
						  if (tempX < 0){tempX = 0}
						  if (tempY < 0){tempY = 0}  
						  
						  
						  document.getElementById('helper').style.left=tempX +30+"px";
			  			  document.getElementById('helper').style.top=(tempY-70)+"px";	
			  			  
						  return true
						}
