var openThis=0;
function openBox(openPage,days,width,height){
if(!getCookie("gSTP") && openThis==0){
	call(openPage,width,height);
	setCookie("gSTP", 1, days);
	openThis=1;
}

}
function clicked(url){
document.location=url;
return true;
}
function call(URL,width,height) {
day = new Date();
id = day.getTime();
var centerLeft=(window.screen.width - width) / 2;
var centerTop=(window.screen.height - height) / 2;
var aopen=window.open(URL, id, 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width='+width+',height='+height+',left ='+centerLeft+',top = '+centerTop+'');
aopen.blur();
}
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
 
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

/* MESSAGES SCRIPT START */
message = function ()
{
	var pub = {};
	var self = {};
	
	pub.init = function ()
	{
		$('.message').live ( 'click', self.closeMessage );
	}
	
	self.closeMessage = function ()
	{
		$(this).slideUp ();	
		return false;	
	}
	
	return pub;	
}();
$(document).ready(function () { message.init(); });
/* MESSAGES SCRIPT END */
