// rules section
var wizardType=2;
var isMetaWizard = false;
var nextMetaWizURI ="wizPass.html";
function setWizardType(type) { wizardType = type; }
function getWizardType()     { return wizardType; } 
function writeRulesValues() {
	if (!document.ruleWizardDataForm.useRuleWizard) {
		var ruleValue;
		if ("" == "CHECKED")
			ruleValue = "on";
		else
			ruleValue = "off";
		document.write('<input type="hidden" name="useRuleWizard" value="' + ruleValue + '">') 
		document.write('<input type="hidden" name="cbox_useRuleWizard" value="">')
	}
}
 
function metaWizard() {
	var w = window.top.frames["dataFrame"].wizWindow;
	var l = "metaWizIntro.html";
	if (w) {
		if(!w.closed) {
			w.focus();
			if(w.location != l) {
				w.location = l;
			}
			return;
		}
	}
	window.top.frames["dataFrame"].clearSaSettings();
	window.top.frames["dataFrame"].clearRulesSettings();
	nextMetaWizURI ="wizPass.html";
	isMetaWizard = true;
	wizPopup(l, 'wizard', '700', '520');
	return;
}
function setupWizard() {
	var w = parent.frames["dataFrame"].wizWindow;
	var l = "wizIntro.html";
	isMetaWizard = false;
	if (w) {
		if(!w.closed) {
	        	w.focus();
	        	if(w.location != l)
	        	{
	        	        w.location = l;
	        	}
	        	return;
		}
	}
	wizPopup(l, 'wizard', '700', '520');
}
function accessRulesWizard(redirect) {
	window.top.frames["dataFrame"].clearRulesSettings();
	var w = window.top.frames["dataFrame"].wizWindow;
	var l = "ruleWizardWelcome.html";
	if (redirect == true) {
		parent.frames[1].o.showPage("firewallAccessRulesView.html");
	}
	if (w) {
		if(!w.closed) {
        		w.focus();
        		if(w.location != l)
        		{
        		        w.location = l;
        		}
        		return;
		}
	}
	isMetaWizard = false;
	wizPopup(l, 'wizard', '700', '520');
}
function vpnSaWizard(redirect) {
	var w = window.top.frames["dataFrame"].wizWindow;
	var l = "saWizardWelcome.html";


	if ("1" == "0") {
		alert("No more VPN policies can be added - the maximum number has already been reached");
		return;
	}
	if (redirect == true) {
		parent.frames[1].o.showPage("vpnSettingsView.html");
	}
	if (w) {
		if(!w.closed) {
        		w.focus();
        		if(w.location != l)
        		{
                		w.location = l;
       	 		}
       	 		return;
		}
	}
	window.top.frames["dataFrame"].clearSaSettings();
	isMetaWizard = false;
	wizPopup(l, 'wizard', '700', '520');
}
function wirelessWizard() {	
	var w = window.top.frames["dataFrame"].wizWindow;
	var l = "wizWlanIntro.html";
	isMetaWizard = false;
	if (w) {
		if(!w.closed) {
	        	w.focus();
	        	if(w.location != l)
	        	{
	        	        w.location = l;
	        	}
	        	return;
		}
	}
	wizPopup(l, 'wizard', '700', '520');
}


