//the functions below help us open windows real quick
var DefaultWindowOptions = 'status=no,scrollbars=yes,resizable=yes,width=920,height=500';

//-----------------------------------------------------------------//
//front end windows


//-----------------------------------------------------------------//
//back end windows

	//admin/master
	function OpenUser(user_id) {
		window.open('/admin/master/users.aspx?r=add_edit&user_id='+ user_id, 'User', DefaultWindowOptions);
	}
	function OpenUserGroup(group_id) {
		window.open('/admin/master/user_groups.aspx?r=add_edit&group_id='+ group_id, 'UserGroup', DefaultWindowOptions);
	}
	function OpenSecuritySetting(security_id, p_security_id) {
		window.open('/admin/master/security_settings.aspx?r=add_edit&security_id='+ security_id +'&p_security_id='+ p_security_id, 'SecuritySetting', DefaultWindowOptions);
	}
	function OpenAllowedIP(allowed_ip_id) {
		window.open('/admin/master/allowed_ips.aspx?r=add_edit&allowed_ip_id='+ allowed_ip_id, 'AllowedIP', DefaultWindowOptions);
	}
	function OpenError(error_id) {
		window.open('/admin/master/error_snitch.aspx?r=details&error_id='+ error_id, 'ErrorSnitch', DefaultWindowOptions.replace("width=820,height=400","width=920,height=500"));
	}
	
	//admin
	function OpenAddEdit(page, id) {
	    //window.open('/admin/' + page + ".aspx?r=add_edit&id="+ id, page, DefaultWindowOptions);
		window.open('/admin/' + page + ".aspx?r=add_edit&id="+ id, page, DefaultWindowOptions.replace("width=920,height=500","width=500,height=375"));
	}
	function OpenProductAdmin(pivot, id) {
		window.open('/admin/' + "product" + ".aspx?r=" + pivot + "&id="+ id, "product", DefaultWindowOptions.replace("width=920,height=500","width=800,height=450"));
	}
	function OpenFAQ(id) {
		window.open('/admin/' + "faq" + ".aspx?" + "&id=" + id, "faq", DefaultWindowOptions.replace("width=920,height=500","width=800,height=450"));
		//window.open('/admin/faq.aspx?r=add_edit&id='" + id, "product", DefaultWindowOptions.replace("width=920,height=500","width=800,height=450"));
	}
	function OpenCCHistory(id) {
		window.open('/admin/' + "order" + ".aspx?" + "&r=history_detail&id=" + id, "cc_history", DefaultWindowOptions.replace("width=920,height=500","width=800,height=450"));
		//window.open('/admin/faq.aspx?r=add_edit&id='" + id, "product", DefaultWindowOptions.replace("width=920,height=500","width=800,height=450"));
	}
//-----------------------------------------------------------------//
