

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var hideForever = false;
adCount=0;

// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}



function initInvitation(){
	//Cookie Checking
	if (!getCookie("hidePopup806028")) {
		if(!ns && !ie && !w3) return;
		if(ie)		adDiv=eval('document.all.invitationDiv.style');
		else if(ns)	adDiv=eval('document.layers["invitationDiv"]');
		else if(w3)	adDiv=eval('document.getElementById("invitationDiv").style');
	        if (ie||w3)
				adDiv.visibility="visible";
	        else
				adDiv.visibility ="show";
			showInvitation();
	}
}
function showInvitation(){
	if (ie){documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
	documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200;adDiv.top =documentHeight-200;
}

function closeInvitation(){
	if(hideForever) {
		setCookie("hidePopup806028","1","Thu 31-Dec-2032 11:59:59 GMT"); // expire in the year 2099
	}
	if (ie||w3)
		adDiv.display="none";
	else
		adDiv.visibility="hide";
}

onload=initInvitation;
//End-->

document.writeln('<style type="text/css">');
document.writeln('<!--');
document.writeln('#invitationDiv {position:absolute; height:1; width:1; top:0; left:0;}');
document.writeln('-->');
document.writeln('</style>');

document.writeln('<div id="invitationDiv" style="z-index:10000; visibility:hidden">');
document.writeln('<table width="470" cellpadding=1 border=0 cellspacing=0 ><tr><td bgcolor="#CD853F">');
document.writeln('<table width="100%" height="348" cellpadding=0 border=0 align=center cellspacing=0 bgcolor="#D9D4BE">');

	document.writeln('<tr><td colspan=2 align="center" valign="top">');
	document.writeln('');
	
	document.write('<IFRAME SRC=\"http://vote.sparklit.com/ad_top\"');
	document.write('WIDTH=468 HEIGHT=60 FRAMEBORDER=0 BORDER=0 MARGINWIDTH=0 ');
	document.writeln('MARGINHEIGHT=0 VSPACE=0 HSPACE=0 SCROLLING=NO>');
	document.writeln('<layer > &nbsp; </layer>');
	document.writeln('</IFRAME>');
document.writeln('<tr><td colspan=2 align="center" valign="middle">');

document.writeln('<FONT FACE=\"ARIAL,HELVETICA\" COLOR=\"#000000\" SIZE=\"-1\" ><BR><BR>Voice your opinion on our Online Poll!<BR><BR>Q: Gender Survey! Tick the one you are, not the one you wish you were.<BR><BR></FONT>');
document.writeln('</TD></TR><TR><TD WIDTH=285>&nbsp;</TD><TD><A HREF="http://vote.sparklit.com/web_poll.spark?pollID=806028"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=\"#000000\" SIZE=\"-1\" >Take This Poll Now!</FONT></A>');
document.writeln('</TD></TR><TR><TD ALIGN=LEFT><A HREF="http://www.sparklit.com/"><IMG BORDER=0 SRC="http://www.sparklit.com/images/sparklitpowereds.gif"></A></TD>');

document.writeln('<TD HEIGHT=20 ALIGN=RIGHT><form name=adg><input type="Checkbox" name="hideForeverCheckBox" onClick="hideForever=hideForeverCheckBox.checked;"> <FONT FACE="ARIAL,HELVETICA" COLOR="#000000" SIZE="-1" >Hide forever?</FONT> &nbsp;&nbsp; <a href="javascript:void(0);" onClick="closeInvitation(this);"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=\"#000000\" SIZE=\"-1\" >CLOSE</FONT></a>&nbsp;&nbsp;');
document.writeln('</td></tr></table></td></tr></table>');
document.writeln('</div></form>');

