	var frameBreakMsg = "The website you are about to see in the new window is incompatible with Webstakk.  Please replace the URL in Webstakk with another website URL.  \nThank You.";
    function showFrameBreakMsg() {
		alert(frameBreakMsg);
		
		
	}
	
	var beforeUnloadEnabled = true;
	var timer = null;
	
	
	function viewLoad() {
		beforeUnloadEnabled = true;
		timer = setTimeout("disableOnBeforeUnload()", 3000);
	}
	
	
	
	function disableOnBeforeUnload() {
		beforeUnloadEnabled = false;
		clearTimeout(timer);
	}
	

	
	function beforeUnload(e) {
		//alert("In beforeUnload");
		if (beforeUnloadEnabled == false) {
			return;
		}
		saveWebstakkFramebreak();
		showFrameBreakMsg();
		return;
		
	}
	

	var viewTimer;
	function endViewTimeout() {
		clearTimeout(viewTimer);
		document.getElementById("msg").childNodes[0].nodeValue = "Congratulations.  Your webstakk has passed the preview test.  You may now click the 'Get Webstakk Link' button.";
		viewTimer = setTimeout("hideDialog()", 2000);
		
	}
	
	function hideDialog(){
		clearTimeout(viewTimer);
		var dlgProg = dojo.widget.byId("dialogNode");
		dlgProg.hide();
	}
	
	
	
	
	
