var signup = null;
var bg = null;
var barrier = null;
var shadow = null;
var cWidth = null;

function checkBarrier(){
	if (document.formGuestSignup.earnings.value=="u75") {
		signup = document.formGuestSignup.earnings;
		bg = document.getElementById("background");
		barrier = document.getElementById("barrier");
		shadow = document.getElementById("shadow");
		signup.style.visibility = "hidden";
		if(document.getElementById("search_state")) document.getElementById("search_state").style.visibility = "hidden";
		if(document.getElementById("search_weeks")) document.getElementById("search_weeks").style.visibility = "hidden";
		bg.style.display = "block";
		barrier.style.display = "block";
		shadow.style.display = "block";
		document.getElementById("container").style.visibility = "visible";
		return false;
		}
}
function revert() {
	bg.style.display = "none";
	barrier.style.display = "none";
	shadow.style.display = "none";
	signup.style.visibility = "visible";
	if(document.getElementById("search_state")) document.getElementById("search_state").style.visibility = "visible";
	if(document.getElementById("search_weeks")) document.getElementById("search_weeks").style.visibility = "visible";
	document.getElementById("container").style.visibility = "hidden";
	document.formGuestSignup.earnings.selectedIndex = 0;
}

function drawBlocker(){
var left = document.documentElement.clientWidth/3;
var top = document.documentElement.clientHeight/3.6;
var shadowLeftOffset = left+35;
var shadowTopOffset = top+30;

document.write('<div id="container"><div id="background" style="width:'+document.documentElement.clientWidth+'px;height:'+document.documentElement.clientHeight+'px;"></div>');

var dynStaticBase = (location.protocol == "https:") ? 
                    "https://secure.theladders.com/static/" : 
                    "http://cdn.theladders.net/static/";

var bdyStr = "<p>If you earn less than $75,000, the kinds of jobs we have probably aren't right for you.</p><p>For jobs paying under $100k, we suggest:<br>&nbsp;";
bdyStr += "<a href=\"http://www.dpbolvw.net/click-1764479-10364410\" target=\"_top\"><img src=\"" + dynStaticBase + "images/SalesLadder/guest/75kblocker_mnstr.gif\" width=\"20\" height=\"18\" border=\"0\" alt=\"Monster.com\" style=\"text-decoration:none;padding-right:5px;\">Monster.com</a>&nbsp;&nbsp;<!-- <img src=\"http://www.lduhtrp.net/image-1764479-10364410\" width=\"1\" height=\"1\" border=\"0\"> -->";
bdyStr += "A great source for jobs under $100k<br>&nbsp;<a href=\"http://www.jdoqocy.com/click-1764479-10410010\" target=\"_top\"><img src=\"" + dynStaticBase + "images/SalesLadder/guest/75kblocker_hj.gif\" width=\"20\" height=\"15\" alt=\"HotJobs.com\" border=\"0\" style=\"text-decoration:none;padding-right:5px;\">";
bdyStr += "HotJobs.com</a><!-- <img src=\"https://www.lduhtrp.net/image-1764479-1633474\" width=\"1\" height=\"1\" border=\"0\"> -->&nbsp;&nbsp;Another great source, brought to you by Yahoo!</p><p>Good luck with your job hunt!</p><p><strong>If you earn more than $75k or have in the past, <a href=\"javascript:revert()\">click here</a></strong>.</p></div>";
document.write('<div id="barrier" style="left:'+left+'px;top:'+top+'px;"><div id="headlineBlocker">TheLadders.com lists exclusively senior-level positions paying $100,000 USD or more.</div><br>');
document.write(bdyStr);
document.write('<div id="shadow" style="left:'+shadowLeftOffset+'px;top:'+shadowTopOffset+'px;"></div></div>');
}