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.toUTCString());
}


var username = 'username';
var url = "";
var fire = true;
 

 $(document).ready(function(){

	if(!$.cookie(username)) {
	fire = false;
   url = window.location;
  $('.mask').fadeIn('slow');
       return false;
	   }

 });


 function redirect(){
	if(document.cookie != 'username' && document.options.box1.checked == true){
   setCookie('username', username, 365);
	}
   document.location.href = "http://eepurl.com/gILe";
 }

 function cont(){  
   if(document.cookie != 'username' && document.options.box1.checked == true){
   setCookie('username', username, 365);
   }
   $('.mask').fadeOut('slow');
   return false;
 }
 
 body.onunload = xitConf();

function xitConf(){

if(fire == true){
	var conf = confirm("Before you go, please drop us a line?");
if (conf == true){
	var newWin = window.open("mailto:f.goldwyn@quorumassociates.com?subject=Request for More Information","","");
		}
	}
}
