
		
		var closeDisabled=false;
		var popup_width=422;
		var popup_bordercolor='#000000';
		var popup_bgTitle='#71B8FF';
		//var popup_htmlfile='popup.html';
		var popup_overlayurl='/images/lightbox/black-70.png';
		var popup_timeout=0;
		var popup_disable_scrollbar=false;
		var myWidth=0;
		var myHeight=0;
		var seen_once=false;
		var opened=false;
		var is_in=false;
		var egwind=null;
		var popup_overlay=null;
		var popup_x=100;
		var popup_y=100;
		var nrp=-1;
		var nrp_show=1;
		var autoclose=null;
		var popup_size_array=null;
		var popup_location_array=null;
		var proof_swf_path='Main.swf';
		
		//pledge only
		/*var lb_v=2;
		var popup_height=430;
		 var ty_text='<p>Your support allows us to continue the fight against the brutal practice of aerial wolf killing. We will keep you updated with timely alerts on exciting new ways to protect wolves and other wildlife.</p>';
		var popup_code='<div id="lb_content" style="width: 422px; height: 91px; background: #fdf9f3 url(/images/lightbox/bg_top.jpg) no-repeat; font-family: Arial; font-size: 13px; color:#333333;"><div style="float: right; margin: 6px 6px 0 0; font-weight: bold; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; height: 10px"><a href="#" onclick="closeFSLB()" style="color: #FFFFFF;display: inline;">Close Window [X]</a></div><div style="float: right; display: inline; margin: 50px 10px 0 0px; clear:both; width: 190px" id="lb_header"><h1 style="font-size:17px;color:#7e3e0c;font-weight:bold; margin-bottom: 0px">Help Save Wolves</h1></div></div><div id="lb_text" style="float: right; clear: both; margin: 0px 10px 0 0; width: 190px;  display: inline; font-size: 13px; font-family: Arial;"><p>I pledge to help Defenders of Wildlife end aerial wolf killing, a terrible practice that has claimed the lives of over 1000 wolves since 2003.</p><input id="fnameLB" name="fnameLB" type="text" style="margin-top: 10px;font-size:12px;border:solid 1px #333333;width:150px;padding: 4px 10px 4px 2px; float: left; font-weight: bold;" value="First Name" onFocus="if(this.value==\'First Name\'){this.value=\'\';}" onBlur="if(this.value.replace(/^\s+|\s+$/g, \'\')==\'\'){this.value=\'First Name\';}"/><input id="lnameLB" name="lnameLB" type="text" style="margin-top: 10px;font-size:12px;border:solid 1px #333333;width:150px;padding: 4px 10px 4px 2px; float: left; font-weight: bold;" value="Last Name" onFocus="if(this.value==\'Last Name\'){this.value=\'\';}" onBlur="if(this.value.replace(/^\s+|\s+$/g, \'\')==\'\'){this.value=\'Last Name\';}" /><br><input id="emailLB" name="emailLB" type="text" style="margin-top: 10px;font-size:12px;border:solid 1px #333333;width:150px;padding: 4px 10px 4px 2px; float: left; font-weight: bold;" value="Email" onFocus="if(this.value==\'Email\'){this.value=\'\';}" onBlur="if(this.value.replace(/^\s+|\s+$/g, \'\')==\'\'){this.value=\'Email\';}"/><br><input id="zipLB" name="zipLB" type="text" style="margin-top: 10px;font-size:12px;border:solid 1px #333333;width:150px;padding: 4px 10px 4px 2px; float: left; font-weight: bold;" value="Zip Code" onFocus="if(this.value==\'Zip Code\'){this.value=\'\';}" onBlur="if(this.value.replace(/^\s+|\s+$/g, \'\')==\'\'){this.value=\'Zip Code\';}" /></div><div style="float: left; width: 177px; height: 243px; background: url(/images/lightbox/wolves.jpg) no-repeat; display: inline; margin: 3px 0 0 20px;"></div><div style="float: left; width: 414px; background: url(/images/lightbox/bot_background.jpg) no-repeat; margin-top: 0px; padding-top: 0px; margin-left: 4px; display: inline; padding-bottom: 4px"><div style="float: left; margin: 0 0 0 13px; display: inline;"><img src="/images/lightbox/rocks.jpg" style="border-left: 3px solid #FFFFFF; border-bottom: 3px solid #FFFFFF; border-right: 3px solid #FFFFFF; display: inline;"></div><div style="float: left; margin: 10px 0 0 20px; display: inline;"><a href="#" onclick="submitFormFLSB();" ><img src="/images/lightbox/pledge.png" border=0 style="float: left;"></a><span id="processing" style="float: left; margin-top: 3px; margin-left: 3px"></span></div><div style="margin-top: 5px; margin-left: 4px; float: left; font-weight: bold; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px;display: inline; clear: both; width: 100px;"><a href="#" onclick="closeFSLB()">Close Window [X]</a></div><div style="margin-top: 5px; margin-right: 30px; float: right; font-weight: bold; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; display: inline;"><a href="http://action.defenders.org/privacypolicy" target="_blank" style="color: #BE3700;">Privacy Policy</a></div></div><div style="float: left; width: 422px; height: 4px; background-color: #7D3D0D; overflow: hidden;"></div>';
		 var form_url='/Assets/js/pledge/process_api.php';
		var ty_header="Thank You!";
		
		*/
		
		function createIFrame2(target2) 
		{
			var tgt2 = 'the_iframe';
			var fnameLB="", lnameLB="", zipLB="";
			var emailAdd=document.getElementById("emailLB").value;
			if(lb_v==2)
			{
				fnameLB=document.getElementById("fnameLB").value;
				lnameLB=document.getElementById("lnameLB").value;
				zipLB=document.getElementById("zipLB").value;
			}
			var d2 = document.createElement("div");
			d2.innerHTML = '<iframe id="' + tgt2 + '" name="' + tgt2 + '" src="'+form_url+'?lb_v='+lb_v+'&e='+encodeURIComponent(emailAdd)+'&f='+encodeURIComponent(fnameLB)+'&l='+encodeURIComponent(lnameLB)+'&z='+encodeURIComponent(zipLB)+'" width=0 height=0 style="border: none"></iframe>';
			target2.appendChild(d2);
			var ifr2 = d2.firstChild;
			//ifr2.onload = function(){submissionCompleteFLSB(); return;};
			ifr2.onreadystatechange = ifr2.onload = function(){
			submissionCompleteFLSB();
			};
			return tgt2;
		}
		function submitFormFLSB()
		{
			var error_msg="";
			var filter = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			if(document.getElementById("emailLB").value=="" || !filter.test(document.getElementById("emailLB").value))
			{
				error_msg=error_msg+"A valid email address is required\n";
			}
			try{
				if(document.getElementById("zipLB").value=="Zip Code")
				{
					error_msg=error_msg+"Zip code is required\n";
					
				}
			}
			catch(err){}
			if(error_msg=="") 
			{ 
				var formSubmission;
				document.getElementById("processing").innerHTML="<img src='/images/lightbox/indicator_small.gif' width=16 height=16>";
				formSubmission=createIFrame2(document.getElementById("egwind"));
			}
			else
			{
				alert(error_msg);
			}

			
			
		}
		
		function submissionCompleteFLSB()
		{
			document.getElementById("processing").innerHTML="<img src='/images/lightbox/correct.png' width=16 height=16>";
			document.getElementById("lb_text").innerHTML=ty_text;
			if(lb_v==2)
			{
				document.getElementById("lb_header").innerHTML='<h1 style="font-size:17px;color:#7e3e0c;font-weight:bold; margin-bottom: 0px">'+ty_header+'</h1>';
			}
			else
			{
				document.getElementById("lb_signup_input").innerHTML='';
			}
		}
		
		function initFSLB()
		{
			if (gupFSLB("splash")=='0')
			{
				activateFSLBMap();
				return false;
			}
			if(typeof(window.innerWidth)=='number')
			{
				myWidth=window.innerWidth;
				myHeight=window.innerHeight;
			}
			else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
			{
				myWidth=document.documentElement.clientWidth;
				myHeight=document.documentElement.clientHeight;
			}
			else if(document.body && (document.body.clientWidth || document.body.clientHeight))
			{
				myWidth=document.body.clientWidth;
				myHeight=document.body.clientHeight;
			}
			popup_x=myWidth/2-popup_width/2;
			popup_y=myHeight/2-popup_height/2+document.body.scrollTop;
			
			if(popup_x<0) popup_x=0;
			if(popup_y<0) popup_y=0;
			
			var y=document.createElement('div');
			y.setAttribute('id','popup_overlay');
			document.body.appendChild(y);
			var x=document.createElement('div');
			x.setAttribute('id','egwind');
			y.appendChild(x);
			x.style.position='absolute';
			x.style.top='-1000px';
			x.style.left='-1000px';
			x.style.background='#fdf9f3 url(/images/lightbox/bg_middle.jpg) repeat-y';
			//x.style.border='1px solid '+popup_bordercolor;
			x.style.width=popup_width+'px';
			//x.style.height=popup_height+'px';
			x.style.display='block';
			var xtext="";//"<div style='text-align:right !important; background: url(/Shared/Images/close_bar.jpg) no-repeat !important; height: 20px !important;'><a href='#' class='close_button' onClick='closeFSLB(); return false;'></a></div>";
			xtext+=popup_code;
			x.innerHTML=xtext;
			egwind=x;
			popup_overlay=document.getElementById('popup_overlay');
			launchFSLB();
		}
		
		
	
		function launchFSLB()
		{
			/*  disable cookies for testing */
			//if((getFSLBCookie("PledgeSeen")=="yes")  && (getFSLBCookie("LightboxSeen")=="yes"))
			if(getFSLBCookie("PledgeSeen")=="yes")
			{
				activateFSLBMap();
				return false;
			}
			setFSLBCookie("PledgeSeen","yes",365, "/", "defenders.org", 0);
		
			if(popup_disable_scrollbar && document.all)
			{
				document.documentElement.style.overflow='hidden';
			}
			else if(popup_disable_scrollbar)
			{
				document.body.style.overflow='hidden';
			}
			//popup_location_array=getUpperLeftCorner();
			opened=true;
			seen_once=true;
			scroll(0,0);
			var x=egwind;
			x.style.top=popup_y+'px';
			x.style.left=popup_x+'px';
			x.style.display='block';
			var y=popup_overlay;
			y.style.position='absolute';
			y.style.top='0px';
			y.style.left='0px';
			
			popup_size_array=getPopupPageSize();
			y.style.width='100%';//document.body.scrollWidth+'px';//popup_size_array[0]+'px';
			y.style.height=popup_size_array[1]+'px';
			y.style.zIndex='999';
			y.style.display='block';
			y.style.background="url('"+popup_overlayurl+"')";
			if(popup_timeout>0){autoclose=setTimeout("closeFSLB()",popup_timeout)}return false
		};

		function closeFSLB()
		{
			if(closeDisabled==true) return;
			opened=false;
			egwind.style.display='none';
			popup_overlay.style.display='none';
			if(popup_disable_scrollbar && document.all)
			{
				document.documentElement.style.overflow='auto';
			}
			else if(popup_disable_scrollbar)
			{
				document.body.style.overflow='auto';
			}
			if(autoclose)clearTimeout(autoclose);
			return false;
		};