function gid(a){return document.getElementById(a)}

//from: http://www.pixelpusher.biz/examples/scroll/ + HEB
var scrlSpeed=1
scrlSpeed=(document.all)? scrlSpeed : Math.max(1, scrlSpeed-1) // decreasing speed for mozilla

function jump_to_place(id) {
	location.href="/place.php?id="+id;
}
function bookmark(title, url) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); 
	}
}
/*
function initScroll(container,object){
	if (document.getElementById(container) != null){
		var contObj=document.getElementById(container);
		var obj=document.getElementById(object);
		heightObject=obj.offsetHeight;
		contObj.style.visibility = "visible";
		contObj.scrlSpeed = scrlSpeed; 
		heightContainer = contObj.offsetHeight;
		obj.style.bottom=parseInt(-heightObject)+"px";
		heightObject=obj.offsetHeight;
		interval=setInterval("objScroll('"+ container +"','"+ object +"',"+ heightContainer +")",20);
		contObj.onmouseover = function(){
			contObj.scrlSpeed=0;
		}
		contObj.onmouseout = function(){
			contObj.scrlSpeed=scrlSpeed;
		}	
	}
}
function objScroll(container,object,heightContainer){
	var contObj=document.getElementById(container);
	var obj=document.getElementById(object);
	heightObject=obj.offsetHeight;
	if (parseInt(obj.style.bottom)<heightContainer){
		obj.style.bottom=parseInt(obj.style.bottom)+contObj.scrlSpeed+"px";
	} else {
		obj.style.bottom=parseInt(-heightObject)+"px";
	}
} 

$(document).ready(function(){
	initScroll('news_ticker','news_ticker_scroll');
	new showLocalTime("datetime", "server-php", 0, "short");
});


function resize_fonts(n) {
	var theRules = new Array();
	if (document.styleSheets[0].cssRules)
		theRules = document.styleSheets[0].cssRules
	else if (document.styleSheets[0].rules)
		theRules = document.styleSheets[0].rules
	else return;
	
	for(var i=0; i<theRules.length; i++)
		if(theRules[i].selectorText.toLowerCase()=="#body")
			theRules[i].style.fontSize=n+'pt';
}

/***********************************************
* Local Time script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.

var weekdaystxt=["éåí à'", "éåí á'", "éåí â'", "éåí ã'", "éåí ä'", "éåí å'", "ùáú"];
function showLocalTime(container, servermode, offsetMinutes, displayversion){
	if(!document.getElementById || !document.getElementById(container)) return;
	this.container=document.getElementById(container);this.displayversion=displayversion; this.localtime=this.serverdate=new Date(servertimestring);this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000);this.updateTime();this.updateContainer();
}
showLocalTime.prototype.updateTime=function(){
	var thisobj=this;
	this.localtime.setSeconds(this.localtime.getSeconds()+1);
	setTimeout(function(){thisobj.updateTime()}, 1000);
}
showLocalTime.prototype.updateContainer=function(){
	var thisobj=this
	if (this.displayversion=="long")
		this.container.innerHTML=this.localtime.toLocaleString();
	else{
		var hour=this.localtime.getHours();
		var minutes=this.localtime.getMinutes();
		var seconds=this.localtime.getSeconds();
		var dayofweek=weekdaystxt[this.localtime.getDay()];
		this.container.innerHTML=dayofweek+" "+this.localtime.getDate()+"."+this.localtime.getMonth()+"."+this.localtime.getFullYear()+" "+hour+":"+formatField(minutes);//+":"+formatField(seconds);
	}
	setTimeout(function(){thisobj.updateContainer()}, 1000);
}
function formatField(num, isHour){
	return (num<=9)? "0"+num : num;
}
*/
/***********************************************/

