function add2Fav(){
	if (window.ie){window.external.AddFavorite(window.location.href,document.title);return};
	if (window.gecko){window.sidebar.addPanel(document.title, window.location.href, "");return};
	if (window.opera){
		var mbm = document.createElement('a');
	    mbm.setAttribute('rel','sidebar');
	    mbm.setAttribute('href',widnow.location.href);
	    mbm.setAttribute('title',document.title);
	    mbm.click();
	};
	if (window.webkit){return};
}

function doPrint(){
	window.print();
	return false;
}

function getElementsByStyleClass (className) {
  var all = document.all ? document.all :
    document.getElementsByTagName('*');
  var elements = new Array();
  for (var e = 0; e < all.length; e++)
    if (all[e].className == className)
      elements[elements.length] = all[e];
  return elements;
}


function sendEmail(anchor){
	anchor.href=anchor.href + "?subject=www.sepe.gr&body=" + window.location.href;
}

var initFontSize = 2;

function resizeFont(inc,unit){
	var tags = new Array('div','a','li');
	var pixelArray = new Array('10','11','12','14');
	var emArray = new Array('0.6','0.7','0.9','1.0');
	
	/*if (!document.getElementById)
		return;*/
		var size = initFontSize;
		size += inc;
		if (size < 0 ) {
			size = 0;
		}
		if (size > 3 ) {
			size = 3;
		}
		initFontSize = size;
		//getBody = document.getElementsByTagName('p');
		getBody = $$('div.font-accessibility');
		//alert(getBody.length);
		for (i = 0 ; i < getBody.length ; i++ ) {			
			/*var s = parseInt(getBody[i].style.fontSize.replace('px',''));
			if (null==s){
				s = 0;
			}
			alert(s);*/
			//s += inc;

			getBody[i].style.fontSize = (unit=='px') ? pixelArray[size]+unit : emArray[size]+unit;
		}

}

function getCategory (catid,lang){
	document.documentElement.scrollTop = 400;
	new Ajax.Request(
		'/ajax.aspx?m=sepeModulesGL.ajaxNews&cnt='+catid+'&la='+lang,{
			onSuccess:	function(transport) {
			$("news").innerHTML = transport.responseText;
			}
		}
	);
}