// JavaScript Document

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}
function registerForBootCamp(){
	var boot_camp = false;
}
function abandonWin(){
	 if (get_cookie('referralcoach')==''){
		if (boot_camp === true){	
			var target = "_blank";		
			var url = "/individuals/boot-camp/boot-camp-in-a-box.php";
			var winWidth = 600; var winHeight = 450;
			var options = "resizable=0,scrollbars=1,status=0,location=0,menubar=0,toolbar=0,width=" + winWidth + ",height=" + winHeight + ",top=" + ((screen.availHeight - winHeight) /2) + ",left=" + ((screen.availWidth - winWidth) /2) + ",screenX=" + ((screen.availWidth - winWidth) /2) + ",screenY=" + ((screen.availHeight - winHeight) /2) + ",";
			var win = window.open(url,target,options);

			// window.focus();
		}
		
		/*
		// var days = 7;
        // Calculate the expiration date
        // var expires = new Date ();
        // expires.setTime(expires.getTime() + days * (24 * 60 * 60 * 1000)); 
		
		document.cookie="referralcoach=yes;expires=" + expires.toGMTString();
		*/
	// }
}