
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}


function wFoc(w){ 
  if(w.focus) //focus method supported 
  { 
   w.blur(); 
   w.focus(); 
   } 
}


function showbox(url) {
        var x=-30;
        var y=-60;
        if (document.layers) {
                x=0;
                y=0;
        } else {
                x=0;
                y=0;
        }
        if (x<0) x=0;
        if (y<0) y=0;
        var w=window.open(url,"akcio","top="+y+",left="+x+",width=160,height=300,location=0,menubar=0,toolbar=0,status=0,resizable=0,scrollbars=1");
        //var w=window.open(url,"akcio","top="+y+",left="+x+",width=710,height=580,location=0,menubar=0,toolbar=0,status=0,resizable=1,scrollbars=1");
        //var w=window.open(url,"akcio","top="+y+",left="+x+",width=710,height=580,location=0,menubar=0,toolbar=0,status=0,resizable=1,scrollbars=1");
        //w.focus();
        wFoc(w);
        return;
}

