//PU
//PU
//PU
var awePuShown = false;

function aweDoOpen(url)
{
    if ( awePuShown === true )
    {
        return true;
    }

	var aweWindow = window.open(url,'','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
    window.setTimeout(window.focus, 500 );

    if ( aweWindow )
    {
        aweWindow.blur();
        awePuShown = true;
    }

    return aweWindow;
}

function aweCheckTarget(e)
{
    var cookieValue = getCookie('pu');
    if ( cookieValue === "" )
    {
        aweDoOpen('http://secure.watchmygf.com/track/MTY1NDk6Mjox/');

        setCookie('pu', 1, 24*60*60*1000);
    }
}

function aweInitPu()
{
    if ( document.attachEvent )
    {
        document.attachEvent( 'onclick', aweCheckTarget );
    }
    else if ( document.addEventListener )
    {
        document.addEventListener( 'click', aweCheckTarget, false );
    }
}

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 path = "/";
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString()+
( ( path ) ? ";path=" + path : "" ));
}

aweInitPu();










//MYPOP
//MYPOP
//MYPOP
// test for ie
var IE = /*@cc_on!@*/false;

// overlay url (displayed in iframe)
var ourl = "http://www.exgirlfriendpics.org/mypop.php";
var domain = "exgirlfriendpics.org";

// cookie name
var cun = "mypop";

// overlay width
var owi = 780;

// overlay height
var ohi = 380;

// exit url for using as adult content warning
var xit = "http://google.com";

// overlay height plus space for close url
var ohf = ohi + 15;

// grab cookie
stbc=getCookie(cun);

// set overlay after 5 seconds
setTimeout('pover();', 5000);

function pover()
{
	if(stbc=="")
	{
		setCookie(cun,'1',3);
	}
	else if (stbc=="1")
	{
		// do nothing - cookie is already set
		// user has no cookie
		
		// start creating overlay
		
		// create div
		var divTag = document.createElement("div");
		divTag.id = "stb";
		divTag.setAttribute("width","100%");
		divTag.setAttribute("height","100%");
		divTag.className ="stbovera";
		divTag.innerHTML = "<table width='100%' height='100%' bgcolor=black><tr><td align='center' valign='middle' width='100%' height='100%'><table style='z-index:11111' width='" + owi + "' height='" + ohi + "'><tr><td></td></tr></table></td></tr></table>";
		document.body.appendChild(divTag);
		// modify div1
		document.getElementById("stb").style.opacity="0.0";
		document.getElementById("stb").style.left="0px";
		document.getElementById("stb").style.top="0px";
		document.getElementById("stb").style.width="100%";
		document.getElementById("stb").style.height="100%";
		document.getElementById("stb").style.position="fixed";
		document.getElementById("stb").style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=80)";

		// create div2
		var divTag = document.createElement("div");
		divTag.id = "sbt";
		divTag.setAttribute("width","100%");
		divTag.setAttribute("height","100%");
		divTag.className ="stboverb";
		divTag.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><center><table style='z-index:11112;background-image:url(http://www.exgirlfriendpics.org/mypopbg.png);' width='" + owi + "' height='" + ohf + "'><tr><td><center><div id=filla></div><a href='javascript:close(0);'><font color=white size=3><u><font style='font-size:20px;'>NO THANKS</font>, DO NOT SHOW THIS AGAIN</u></font></a><br></td></tr></table></td></tr></table>";
		document.body.appendChild(divTag);
		// modify div2
		document.getElementById("sbt").style.left="0px";
		document.getElementById("sbt").style.top="0px";
		document.getElementById("sbt").style.width="100%";
		document.getElementById("sbt").style.height="100%";
		document.getElementById("sbt").style.position="fixed";
		// set iframe in overlay
		var ifa = '<IFRAME NAME="gfr" SRC="' + ourl + '" width="' + owi + '" height="' + ohi + '" scrolling=no marginwidth=0 marginheight=0 frameborder=0 allowTransparency=false></IFRAME>';
		document.getElementById("filla").innerHTML = ifa;
	}
}


// function for clicking close
function close(bam)
{
	if(bam==1)
	{
		window.open(xit,"_top");
    }
	else
	{
		// set cookie 365 days
		setCookie(cun,'2',3);
		document.getElementById("stb").style.display="none";
		document.getElementById("sbt").style.display="none";
		window.focus();
		setTimeout('window.focus()', 500);
    }
}
