<!--
var win=null;

function popUp(x,y,a,b,text)
{	features="width="+a+",height="+b;
	PopUp=window.open("","Info",features);
	PopUp.moveTo(x,y);
	PopUp.document.write("<html><body bgcolor=blue><font color=white><b>"+text+"<p align=center>* <INPUT type=button value='close window' onClick='window.close()'> *</body></html>");
//	PopUp.document.write("<html><body bgcolor=blue><font color=white><b>"+text+"</body></html>");
}

function swap(n,pic)
{	document.images[n].src=pic;
}

function getRandom(x)
{	return Math.floor(Math.random()*(x+1));
}

function Assign()
{	document.data.num.value=0;
}

function swap2(n,pic,max)
{	x=document.data.num.value;
	x++; if(x>=max){x=0;}
	document.data.num.value=x;
	document.images[n].src=pic+"-"+x+".jpg";
}

function newWindow() 
{	win=window.open('XmasInvite.htm','','scrollbars=no,menubar=no,height=200,width=720,resizable=yes,toolbar=no,location=no,status');
	win.document.close();
	win.focus();
}

function closeWindow()
{	win.close();
}

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());
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires=");
}

function delCookie(c_name) {
//alert("cookie "+c_name+" gone!");
document.cookie = c_name +'=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}

function checkCookie()
{
c_value=getCookie('eec');
//alert("cookie: "+c_value+"//");
if (c_value!=null && c_value!="ok")
{	newWindow();
	setCookie('eec','ok',1);
}
}
