
var qmv = new Object();
if (!window.qmad) qmad = new Object();

qmv.track = new Object();
qmv.preview_mode = true;
qmv.id = -1;
qmv.base_zindex = 999999;
qmv.texturl_state = "text";
qmv.ms_hide_timer = 500;
qmv.ms_show_timer = 0;
qmv.color_dispaly_type = "HEX";
qmv.color_apply_type = "HEX";
qmv.tree_collapse = false;
qmv.interface_hide_selected_box = false;
qmv.pointer = new Object();
qmv.skins = new Object();
qmv.cursor = "hand";
qmv.cursorfix = "";
qmv.is101 = false;
qmv.pure = true;
qmv.report = new Object();
qmv.report.tab = "all";
qmv.report.height = 100;
qmv.csshtml_padding_top = 15;
qmv.csshtml_padding_left = 10;
qmv.csshtml_padding_right = 10;
qmv.vdesign_tab = "design"
qmv.globaldividers_sub = true;
qmv.globaldividers_main = false;
qmv.globaldividers_above = false;
qmv.globaldividers_below = false;



qmv.base = "http://www.opencube.com/qmv6/";
qmv.base_ajax = "http://www.opencube.com/qmv6/qmajax/";
qmv.tval = (window.location+"").toLowerCase();


if (qmv.tval.indexOf("qmv_vdesign6")+1) //run from opencube website
{
	qmu = false;
	qmv.base = "";
	qmv.is_online = true;
	//qmv.unlock_type = "eval";
}

if (qmv.tval.indexOf("qmvis")+1) //run from install
{
	qmv.base = "";
}

if (qmv.tval.indexOf("qm6dev")+1)  //local dev
{
	qmv.base = "";
	qmv.is_developer=1;
	
}






/*
if (window.qm_evalsave)
{
	qmv.unlock_string = "qm_evalsave=1";
	qmv.unlock_type = "eval";
}
*/

//if (window.qm_install || window.name == "qmeval" || window.qm_evalrun || window.qm_evalsave || qmv.is_installed_version)
	//qmv.no_login = true;



qmad.br_ie = window.showHelp;
qmad.br_navigator = navigator.userAgent.indexOf("Netscape")+1;
qmad.br_version = parseFloat(navigator.vendorSub);
qmad.br_oldnav = qmad.br_navigator && qmad.br_version<7.1;
qmad.br_strict = (dcm = document.compatMode) && dcm=="CSS1Compat";
qmad.br_fox = navigator.userAgent.indexOf("irefox")+1 || navigator.userAgent.indexOf("prism/")+1;
qmad.br_ie7 = navigator.userAgent.indexOf("MSIE 7")+1;
qmad.br_safari = navigator.userAgent.indexOf("afari")+1;
qmad.br_s3 = qmad.br_safari && navigator.userAgent.indexOf("ersion/3")+1;

if (qmad.br_fox)
	qmv.cursorfix = "overflow:auto;"

if (qmad.br_s3) qmad.br_fox = true;
if (qmad.br_fox) qmv.cursor = "pointer";

qmv.resize_off_css = "";
if (qmad.br_s3) qmv.resize_off_css = "resize:none;"

if ((qmad.br_ie || qmad.br_fox) && window.name!="qmvtemplateiframe")
{

	if (window.attachEvent)
		window.attachEvent("onload",qmv_load);
	else if (window.addEventListener)
		window.addEventListener("load",qmv_load,true);

	if (window.attachEvent)
		window.attachEvent("onresize",qmv_auto_size_interface_height);
	else if (window.addEventListener)
		window.addEventListener("resize",qmv_auto_size_interface_height,true);


	if (!qmad.br_ie && document.addEventListener)
		document.addEventListener("mousemove",qmv_evt_move_fixcapture,true);
	

	if (window.attachEvent)
		document.attachEvent("onmouseup",qmv_evt_fix_mouse_up);
	else if (window.addEventListener)
		document.addEventListener("mouseup",qmv_evt_fix_mouse_up,true);

	window.onerror = qmv_log_errors;
	qmv_init();


}
else
{
	qmv = null;

	if (window.name!="qmvtemplateiframe")
		alert("To use the QuickMenu Visual interface load this page using Firefox or Internet Explorer.");
}

	


function qmv_init_unlock()
{
	qmv.unlock_orig = "";
	if (window.qmv6 && !qmv.is_online)
		qmv.unlock_orig = "qmv6=true";
	else if (window.qm_single)
	{
		qmv.unlock_orig = qm_single;
		if (qmv.unlock_orig.length>1)
			qmv.unlock_orig = qmv.unlock_orig.substring(0,qmv.unlock_orig.length-1);

	}
}



function qmv_init()
{
	
	var wt = "";

	qmv_init_unlock();
	qmv_init_addons();

	if (!qmad.bvis) qmad.bvis = "";
	if (!qmad.bhide) qmad.bhide = "";
	if (!qmad.bhover) qmad.bhover = "";
	//qmad.bhover += "qm_evt_menu_item_click(o);"


	//save the initial hide timer setting
	if (window.qm_th)
		qmv.ms_hide_timer = qm_th;
	
	
	

	if (!window.qm_create)
	{
		wt += '<style type="text/css">';
		wt += qmv_pubgen_get_core_css();
		wt += '</style>';
		
		qmv.is_blank = true;
	}

	wt += '<sc'+'ript type="text/javascript" src="'+qmv.base+'qmajax/ajax.js"></sc'+'ript>';
	wt += '<sc'+'ript type="text/javascript" src="'+qmv.base+'qmajax/login.js"></sc'+'ript>';
	wt += '<sc'+'ript type="text/javascript">'+qmv_get_source_code_core_visual_iface()+'function qm_kille(e,skip_default){if (!e) e = event;e.cancelBubble = true;if (e.stopPropagation)e.stopPropagation();if (!skip_default){if (e.preventDefault)e.preventDefault();e.returnValue = false;}}</scr'+'ipt>';

	wt += '<style type="text/css">.qmvistreestyles{}</style>';
	wt += '<style type="text/css">.qmvibcssstyles{}</style>';
	wt += '<style type="text/css">.qmfv{visibility:inherit !important;}.qmfh{visibility:hidden !important;}';


	//these settings are in case a user is using old core css
	wt += '.qmmc a{position:relative;z-index:1;}'
	wt += '.qmmc .qmdivider{position:relative;z-index:1;}'
	wt += '.qmmc .qmtitle{position:relative;z-index:1;}'

	wt += '.qmvi-report-tabs {font-size:11px;color:#111111;text-align:center;padding:2px 0px 0px 0px;}';
	wt += '.qmvi-report-lines {font-size:12px;color:#222222;text-align:left;padding:1px 7px 2px 6px;}';

	wt += '.qmvi-dialog-container {z-index:'+(qmv.base_zindex+100)+';background-color:#eeeeee;visibility:hidden;position:absolute;font-size:13px;border-width:1px;border-style:solid;border-color:#828EA2;}';
	wt += '.qmvi-dialog-content-container {padding:10px;color:#222222;}';
	wt += '.qmvi-dialog-button {margin-left:5px;font-size:12px;padding:0px 6px 0px 6px;}';
	wt += '.qmvi-dialog-input-title {font-size:12px;color:#222222;}';
	
	wt += '.qmvi-container {z-index:'+qmv.base_zindex+';background-color:#FBFBFF;visibility:hidden;position:absolute;font-size:13px;border-width:1px;border-style:solid;border-color:#828EA2;}';
	wt += '.qmvi-common {font-family:Arial;text-decoration:none;}';
	
	wt += '.qmvi-title {color:#ffffff;background-image:url('+qmv.base+'images/title_bg.gif);cursor:default;font-size:1em;font-weight:normal;padding:4px 0px 4px 4px;background-color:#3e4d67;border-width:0px 0px 1px 0px;border-style:solid;border-color:#828EA2}';
	wt += '.qmvi-menu {font-size:1em;padding:1px 0px 1px 2px;background-color:#DFE7EF;border-width:0px 0px 1px 0px;border-style:solid;border-color:#828EA2}';
	wt += '.qmvi-menu-item {font-size:.9em;padding:1px 4px 1px 3px;display:inline;color:#333333;border-color:#DFE7EF;border-style:solid;border-width:1px 1px 1px 1px;}';
	wt += '.qmvi-menu-item:hover {border-color:#999999;border-top-color:#ffffff;border-left-color:#ffffff;background-color:#DaE1Eb;color:#111111;}';
	wt += '.qmvi-buttons {font-size:.9em;padding:6px 0px 0px 4px;background-color:transparent;border-width:0px 0px 0px 0px;border-style:solid;border-color:#828EA2}';
	wt += '.qmvi-texturl {font-size:.9em;padding:4px 0px 6px 4px;background-color:transparent;border-width:0px 0px 0px 0px;border-style:solid;border-color:#828EA2}';
	wt += '.qmvi-colordialog-border {border-width:1px;border-color:#888888;border-style:solid;}';
	wt += '.qmvi-colordialog-inputs {border-width:1px;border-color:#888888;border-style:solid;font-size:12px;text-align:right;padding-right:4px;}';
	wt += '.qmvi-colordialog-titles {font-size:12px;color:#222222;}';
	wt += '.qmvi-colordialog-brightbar-parts {height:11px;font-size:1px;}';
	wt += '.qmvi-publish-title {padding-bottom:3px;color:#222222;font-size:13px;border-color:#888888;border-width:0px 0px 1px 0px;border-style:solid;}';
	wt += '.qmvi-no-focus:focus {outline:none;}';	

	wt += '#qm99, #qm98 div {background-color:#f6f6f6;border-color:#828EA2;border-style:solid;border-width:1px;padding:5px 0px 5px 0px;}';
	wt += '#qm99 a, #qm98 div a {font-family:Arial;font-size:12px;color:#333333;text-decoration:none;padding:2px 30px 2px 5px;margin:0px 5px 0px 5px;}';
	wt += '#qm99 a:hover, #qm98 div a:hover {background-color:#828EA2;color:#ffffff;}';


	wt += '#qm98 {}';
	wt += '#qm98 a {text-decoration:none;font-size:12px;padding:3px 6px 3px 5px;color:#333333;border-style:none;}';
	wt += '#qm98 a:hover {background-color:#828EA2;color:#ffffff}';
	wt += 'body #qm98 .qmactive {background-color:#828EA2;color:#ffffff}';
	wt += '#qm98 div a{border-style:none;padding-left:14px;}';
	wt += '#qm98 div .qmparent{background-image:url('+qmv.base+'images/arrow_4.gif);background-repeat:no-repeat;background-position:95% 50%;}';
	wt += '#qm98 div .qmactive{background-image:url('+qmv.base+'images/arrow_5.gif);}';




	wt += '#qm98 div{}';
	wt += '#qm98 a:hover.qmdisabled,#qm99 a:hover.qmdisabled{background-color:transparent;color:#888888;}';
	wt += '#qm98 a.qmdisabled,#qm99 a.qmdisabled{color:#888888;font-style:italic;}';

	wt += '.qmvi-tree-container {font-size:1em;padding:0px;background-color:transparent;}';
		

	wt += '#qmvtree {width:auto !important;height:auto !important;background-color:#f4f4f4;border-width:0px 1px 1px 0px;border-style:solid;border-color:#828EA2;}';
	wt += '#qmvtree a {background-repeat:repeat-x;background-position:bottom;background-image:url('+qmv.base+'images/tree_bg.gif);border-width:1px 0px 0px 0px;border-style:solid;border-color:#828EA2;color:#333333;padding:5px 0px 5px 4px;font-size:1em;text-decoration:none;}';
	wt += '#qmvtree a:hover {color:#dd3300;}';

	wt += '#qmvtree a {position:static;}';	
	wt += '#qmvtree div a {background-image:none;border-style:none;padding:0px 0px 0px 0px;margin-left:5px;}';
	wt += '#qmvtree .qmactive {background-image:url('+qmv.base+'images/tree_bg_hl.gif);text-decoration:none;}';
	wt += '#qmvtree div .qmactive {background-image:none;}';
	

	wt += '#qmvt2 {width:auto !important;height:auto !important;background-color:#f6f6f6;padding:10px 0px 0px 20px;}';
	wt += '#qmvt2 a {outline:none;font-family:Arial;background-repeat:repeat-x;background-position:bottom;color:#333333;padding:1px 0px 1px 0px;font-size:13px;text-decoration:none;}';
	wt += '#qmvt2 a:hover {color:#dd3300;}';
	wt += '#qmvt2 div {padding-left:8px;}';

	wt += '#qmvt2 a {position:static;}';	
	wt += '#qmvt2 div a {border-style:none;padding:1px 0px 1px 0px;color:#333333;}';
	wt += '#qmvt2 .qmactive {text-decoration:none;}';
	wt += 'body #qmvt2 .qmcur {color:#0033dd;}';
	wt += '#qmvt2 .qmttcheck {margin-right:5px;}';
	wt += '#qmvt2 .ttinputdesc {color:#50597D;}';
	wt += '#qmvt2 .ttinputtitle {color:#50597D;text-decoration:underline;}';


	wt += '#qmsetbox {margin-left:10px;}';
	wt += '#qmsetbox a {color:#222222;font-size:1em;text-decoration:none;position:static;}';
	

	wt += '.qmvtree-col1 {font-size:12px;color:#00224A;text-align:right;white-space:nowrap;width:90px;}';
	wt += '.qmvtree-col2 {}';
	wt += '.qmvtree-col3 {color:#888888;font-weight:bold;}';
	wt += '.qmvtree-col4 {padding-right:5px;}';

	var tv2 = "width:100%;";
	var tv1 = "display:block;";
	if (qmad.br_ie) tv1 = "position:absolute;"
	if (qmad.br_ie7) tv2 = "width:95%;";

	if (qmad.br_ie)
	{
		wt += '.qmvtree-radio{margin-bottom:-1px;}';	
		wt += '.qmvtree-checkbox{margin-bottom:0px;}';	
	}
	else
	{
		wt += '.qmvtree-radio{margin-bottom:-2px;margin-left:4px;margin-right:4px;}';
		wt += '.qmvtree-checkbox{margin-bottom:1px;margin-left:4px;margin-right:4px;}';
	}
	
	
	wt += '.qmvtree-style-name{cursor:help;}';
	wt += '.qmvtree-custlegend{border-width:1px 1px 1px 1px;border-style:solid;border-color:#999999;font-size:12px;display:block;position:absolute;padding:0px 4px 1px 4px;background-color:#ffffff;color:#003366;margin-top:-23px;margin-left:0px;width:60px;}';
	wt += '.qmvtree-custfieldset{border-width:1px 0px 0px 0px;border-style:solid;border-color:#999999;padding:13px 5px 5px 5px;}';
	wt += '.qmvtree-input {'+tv1+tv2+'font-family:Arial;padding:0px;margin:0px;border-width:0px;background-color:transparent;font-size:12px;'+qmv.resize_off_css+'}';
	wt += '.qmvtree-input-dialog{position:relative;width:100%;}';
	wt += '.qmvtree-input-container-dialog {'+qmv.cursorfix+'display:block;position:relative;padding:3px;border-width:1px;border-color:#888888;border-style:solid;background-color:#ffffff;}';
	wt += '.qmvtree-input-container {'+qmv.cursorfix+'margin-bottom:0px;height:15px;display:block;position:relative;padding:1px 0px 1px 3px;border-width:1px;border-color:#888888;border-style:solid;background-color:#ffffff;}';
	


	if (qmad.br_ie && !qmad.br_strict)
	{
		
		wt += '.qmvtree-input-container-dialog {height:24px !important;}';
		wt += '.qmvtree-input-container {height:18px !important;}';
	}

	wt += '.qmvtree-colon{color:#888888;font-weight:bold;}';
	wt += '.qmvtree-button{cursor:default;display:block;text-align:center;background-color:#e6e6e6;color:#222222;font-family:Arial;font-size:13px;font-weight:normal;border-width:1px; border-color:#888888; border-top-color:#cccccc;border-left-color:#cccccc;border-style:solid; width:16px; height:16px;}';
	wt += '.qmvtree-button-apply{display:block;margin-left:10px;font-size:11px;width:60px;text-align:center;line-height:16px;}';
	
	if (!qmad.br_ie)
	{	
		var tipos = "3px 2px";
		var bipos = "3px 1px";
		wt += '.qmvtree-button-up{height:8px;font-size:1px;display:block;background-image:url('+qmv.base+'images/spinner_up.gif);background-position:'+tipos+';background-repeat:no-repeat;border-bottom-width:0px;}';
		wt += '.qmvtree-button-down{height:8px;font-size:1px;display:block;background-image:url('+qmv.base+'images/spinner_down.gif);background-position:'+bipos+';background-repeat:no-repeat;border-top-width:0px;}';
	}
	else
	{
		wt += '.qmvtree-button-up{height:8px;font-size:1px;display:block;border-bottom-width:0px;}';
		wt += '.qmvtree-button-up img{margin-left:1px;margin-top:2px;}';
		wt += '.qmvtree-button-down{height:8px;font-size:1px;display:block;border-top-width:0px;}';
		wt += '.qmvtree-button-down img{margin-left:1px;margin-top:1px;}';
	}

	wt += '.qmvtree-bracket{display:block;margin-left:-10px;color:#888888;}';
	wt += '.qmvtree-rule{color:#888888;}';
	wt += '.qmvtree-close-show{margin-bottom:10px;}';
	wt += '.qmv-icon-buttons{border-width:1px;border-color:#888888;border-style:solid;margin-left:1px;display:block;}';

	wt += '</style>';



	//add the add on code
	
	wt += '<scr'+'ipt type="text/javascript">';
	wt +=  qmv_get_add_on_code("all");
	wt += '</scr'+'ipt>';

	
	/*			
	wt += '<scr'+'ipt type="text/javascript" src="qm_keyboard_access.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_images.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_tree_menu.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_slide_effect.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_bump_effect.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_merge_effect.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_drop_shadow.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_round_corners.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_match_widths.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_tabs.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_tabs_css.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_item_bullets.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_item_bullets_css.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_over_select.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_auto_position_subs.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_pointer.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_box_effect.js">';
	wt += '</scr'+'ipt>';
	
	wt += '<scr'+'ipt type="text/javascript" src="qm_round_items.js">';
	wt += '</scr'+'ipt>';

	wt += '<scr'+'ipt type="text/javascript" src="qm_hover_fill.js">';
	wt += '</scr'+'ipt>';
	*/		
	

	
	qmad.qmsetbox = new Object();	
	qmad.qmsetbox.tree_hide_focus_box = true;
	qmad.qmsetbox.tree_auto_collapse = true;			
	qmad.qmsetbox.tree_expand_step_size = 15;
	qmad.qmsetbox.tree_collapse_step_size = 20;
	qmad.qmsetbox.tree_expand_animation = 0
	qmad.qmsetbox.tree_collapse_animation = 0
	qmad.qmsetbox.tree_width = "100%";
	qmad.qmsetbox.tree_sub_indent = 10; 
	qmad.qmsetbox.tree_sub_top_padding = 5;
	qmad.qmsetbox.tree_sub_bottom_padding = 5;

	qmad.qmsetbox.ibullets_main_image = qmv.base+"images/sub_plus.gif";
	qmad.qmsetbox.ibullets_main_image_active = qmv.base+"images/sub_plus_active.gif";
	qmad.qmsetbox.ibullets_main_image_hover = qmv.base+"images/sub_plus_hover.gif";
	qmad.qmsetbox.ibullets_main_image_width_height = "5,5";
	qmad.qmsetbox.ibullets_main_image_margin = "0px 20px 0px 0px";	//top, right, bottom, left
	qmad.qmsetbox.ibullets_main_position = "-8,5";			//left, top

	qmad.qmsetbox.ibullets_sub_image = qmv.base+"images/sub_plus.gif";
	qmad.qmsetbox.ibullets_sub_image_active = qmv.base+"images/sub_plus_active.gif";
	qmad.qmsetbox.ibullets_sub_image_hover = qmv.base+"images/sub_plus_hover.gif";
	qmad.qmsetbox.ibullets_sub_image_width_height = "5,5";
	qmad.qmsetbox.ibullets_sub_image_margin = "0px 20px 0px 0px";	//top, right, bottom, left
	qmad.qmsetbox.ibullets_sub_position = "-8,5";			//left, top



	//visual tree menu settings
	qmad.qmvtree = new Object();	
	qmad.qmvtree.tree_hide_focus_box = true;
	qmad.qmvtree.tree_auto_collapse = true;			
	qmad.qmvtree.tree_expand_step_size = 15;
	qmad.qmvtree.tree_collapse_step_size = 20;
	qmad.qmvtree.tree_expand_animation = 0
	qmad.qmvtree.tree_collapse_animation = 0
	qmad.qmvtree.tree_width = "100%";
	qmad.qmvtree.tree_sub_indent = 10; 
	qmad.qmvtree.tree_sub_top_padding = 5;
	qmad.qmvtree.tree_sub_bottom_padding = 5;

	qmad.qmvtree.ibullets_apply_to = "parent"  //parent, non-parent, all

	qmad.qmvtree.ibullets_main_image = qmv.base+"images/main_plus.gif";
	qmad.qmvtree.ibullets_main_image_active = qmv.base+"images/main_plus_active.gif";
	qmad.qmvtree.ibullets_main_image_hover = qmv.base+"images/main_plus_hover.gif";
	qmad.qmvtree.ibullets_main_image_width_height = "13,13";
	qmad.qmvtree.ibullets_main_image_margin = "0px 5px 0px 0px";	//top, right, bottom, left
	qmad.qmvtree.ibullets_main_position = "-12,7"; 			//left, top

	if (qmad.br_ie)
		qmad.qmvtree.ibullets_main_right = "90%";
	else
		qmad.qmvtree.ibullets_main_right = "92%";

	qmad.qmvtree.ibullets_sub_image = qmv.base+"images/sub_plus.gif";
	qmad.qmvtree.ibullets_sub_image_active = qmv.base+"images/sub_plus_active.gif";
	qmad.qmvtree.ibullets_sub_image_hover = qmv.base+"images/sub_plus_hover.gif";
	qmad.qmvtree.ibullets_sub_image_width_height = "5,5";
	qmad.qmvtree.ibullets_sub_image_margin = "0px 20px 0px 0px";	//top, right, bottom, left
	qmad.qmvtree.ibullets_sub_position = "-8,5";			//left, top
	
	
	qmad.qmvt2 = new Object();
	for (i in qmad.qmvtree)
		qmad.qmvt2[i] = qmad.qmvtree[i];

	qmad.qmvt2.tree_auto_collapse = true;
	qmad.qmvt2.tree_sub_top_padding = 0;
	qmad.qmvt2.tree_sub_bottom_padding = 0;
	qmad.qmvt2.ibullets_main_right = "-10px";
	qmad.qmvt2.ibullets_main_image = qmv.base+"images/sub_plus.gif";
	qmad.qmvt2.ibullets_main_image_active = qmv.base+"images/sub_plus_active.gif";
	qmad.qmvt2.ibullets_main_image_hover = qmv.base+"images/sub_plus_hover.gif";
	qmad.qmvt2.ibullets_main_image_width_height = "5,5";
	qmad.qmvt2.ibullets_main_position = "0,7";

	document.write(wt);


	//this could be combined by setting a similar class name on the main tree, setbox and template tree
	qm_vtree_init_styles();
	qm_vtree_init_styles(true);
	qm_vtree_init_styles(false,true);

	
	
}


function qmvi_kill_select(e)
{
	
	if (qmad.br_fox)
		return;	

	e = e || window.event;
	var targ = e.srcElement || e.target;

	if (targ.tagName=="INPUT" || targ.tagName=="TEXTAREA")
		return;

	qm_kille(e);
	return false;
	

}


function qmv_init_context()
{

	var wt = "";

	var fil = "filter:alpha(opacity=50);"
	if (!qmad.br_ie) fil = "opacity:.5;";

	wt += '<div id="qmvi_context" style="z-index:'+(qmv.base_zindex+200)+';position:absolute;visibility:hidden;top:10px;left:10px;">'
	wt += '<div id="qmvi_context_shadow" style="background-color:#555555;position:absolute;'+fil+'"></div>';
	wt += '<table cellpadding=0 cellspacing=0><tr><td><div id="qm99" class="qmmc">';
	wt += '</div></table></tr></td></div>';


	return wt;

}


function qmv_init_interface()
{


	var wt = "";

	var dbl = "";
	if (qmad.br_ie) dbl = 'ondblclick="this.click()"';

	wt += '<input type="text" id="qmvi_kb_focus_menu" onkeydown="qmvi_design_view_keypress_event(event)" style="position:absolute;left:-1000px;width:10px;top:0px;"></input>';
	wt += '<div id="qmvi" onselectstart="qmvi_kill_select(event)" onclick="qmv_hide_context();qmv_evt_kill_click(event)" class="qmvi-container" style="width:286px;background-color:#dddddd;">'
	

		wt += '<div id="qmvi_title" class="qmvi-common qmvi-title" oncontextmenu="qm_kille(event)" onmouseup="qmv_evt_title_mouseup(event,this)" onmousemove="qmv_evt_title_mousemove(event,this)" onmousedown="qmv_evt_title_mousedown(event,this)" style="">Visual CSS QuickMenu</div>'

		wt += '<div class="qmvi-common qmvi-menu" style="">'
			wt += '<div id="qm98" class="qmmc" oncontextmenu="qm_kille(event)">';

			wt += '<a href="javascript:void(0);"  onclick="qmv_hide_context();qmv_update_all_main_checks();qmv.context_clicked=true;qmc_oo(event,this)">File</a>';


				wt += '<div>';
				wt += '<a href="javascript:void(0)" onclick="qmv_evt_menu_item_click(\'new\')" onfocus="this.blur()">New</a>';
				wt += '<a onclick="qmv_evt_menu_item_click(\'open\')" onfocus="this.blur()" href="javascript:void(0);">Open</a>';
				wt += '<a onclick="qmv_evt_menu_item_click(\'save\')" onfocus="this.blur()" href="javascript:void(0);">Save</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'import\');">Import Structure</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a onclick="qmv_evt_menu_item_click(\'publish\')" onfocus="this.blur()" href="javascript:void(0);">Custom Publish</a>';
				wt += '<a onclick="qmv_evt_menu_item_click(\'quick_publish\')" onfocus="this.blur()" href="javascript:void(0);">Quick Publish (external)</a>';
				wt += '<a onclick="qmv_evt_menu_item_click(\'quick_publish_inline\')" onfocus="this.blur()" href="javascript:void(0);">Quick Publish (inline)</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a onclick="qmv_evt_menu_item_click(\'save_images\')" onfocus="this.blur()" href="javascript:void(0);">Publish Images</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a onclick="qmv_evt_menu_item_click(\'create_component\')" onfocus="this.blur()" href="javascript:void(0);">Create Component</a>';



				if (qmv.is_developer)
				{
					wt += qmv_show_context_build_divider();
					wt += '<a onclick="qmv_evt_menu_item_click(\'dev_tplate_css\')" onfocus="this.blur()" href="javascript:void(0);">Pub Template CSS</a>';
				}

				wt += '</div>';

			wt += '<a href="javascript:void(0);"  onclick="qmv_hide_context();qmv_update_all_main_checks();qmv.context_clicked=true;qmc_oo(event,this)">View</a>';


				wt += '<div ischecks=1>';
				wt += '<a onclick="qmv_evt_menu_item_click(\'preview\')" onfocus="this.blur()" href="javascript:void(0);">Preview</a>';
				wt += '<a onclick="qmv_evt_menu_item_click(\'html_page\')" onfocus="this.blur()" href="javascript:void(0);">HTML Page</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'specs\');">Menu Specs</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a ctype="view" ccat="full" onclick="qmv_evt_menu_item_click(\'iface_switch_full\')" onfocus="this.blur()" href="javascript:void(0);">Full Interface</a>';
				wt += '<a ctype="view" ccat="inpage" onclick="qmv_evt_menu_item_click(\'iface_switch_inpage\')" onfocus="this.blur()" href="javascript:void(0);">In-Page Design</a>';
				wt += '</div>';


			wt += '<a href="javascript:void(0);"  onclick="qmv_hide_context();qmv_update_all_main_checks();qmv.context_clicked=true;qmc_oo(event,this)">Modify</a>';


				wt += '<div>';
				wt += '<a id="qmvmm_undo" class="qmdisabled" href="javascript:void(0)" onclick="qmv_context_cmd(event,\'undo\',this);">Undo</a>';
				wt += '<a id="qmvmm_redo" class="qmdisabled" href="javascript:void(0)" onclick="qmv_context_cmd(event,\'redo\',this);">Redo</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'edit texturl\');">Edit Text / URL</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'item_image\');">Item Images</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'create_rule\')">Create Rule</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'apply_custom_class\')">Custom Classes</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add item\')">Add Item</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert item\')">Insert Item</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'delete item\')">Delete Item</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add sub menu\')">Add Sub Menu</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'copy item\')">Copy Item</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'paste item\')">Paste Item</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move up\')">Move Item Up</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move down\')">Move Item Down</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add menu\')">Add Menu</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'delete menu\')">Delete Menu</a>';
				wt += '</div>';


			wt += '<a href="javascript:void(0);"  onclick="qmv_hide_context();qmv_update_all_main_checks();qmv.context_clicked=true;qmc_oo(event,this);">Add-Ons</a>';
		

				wt += '<div ischecks=1>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="box_effect" onclick="qmv_context_cmd(event,\'addon_box_effect\');">Box Animation</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="fade" onclick="qmv_context_cmd(event,\'addon_fade\');">Fade Effect</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="bump_effect" onclick="qmv_context_cmd(event,\'addon_bump_effect\');">Bump Effect</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="slide_effect" onclick="qmv_context_cmd(event,\'addon_slide_effect\');">Slide Effect</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="merge_effect" onclick="qmv_context_cmd(event,\'addon_merge_effect\');">Merge Effect</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="hoverfill" onclick="qmv_context_cmd(event,\'addon_hoverfill\');">Hover Fill</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="ibcss" onclick="qmv_context_cmd(event,\'addon_ibcss\');">Item Bullets (CSS)</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="tabscss" onclick="qmv_context_cmd(event,\'addon_tabscss\');">Main Tabs (CSS)</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="round_corners" onclick="qmv_context_cmd(event,\'addon_round_corners\');">Rounded Subs</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="ritem" onclick="qmv_context_cmd(event,\'addon_ritem\');">Rounded Items</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="drop_shadow" onclick="qmv_context_cmd(event,\'addon_drop_shadow\');">Drop Shadows</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="match_widths" onclick="qmv_context_cmd(event,\'addon_match_widths\');">Match Widths</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="item_bullets" onclick="qmv_context_cmd(event,\'addon_item_bullets\');">Item Bullets (images)</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="tabs" onclick="qmv_context_cmd(event,\'addon_tabs\');">Main Tabs (images)</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="pointer" onclick="qmv_context_cmd(event,\'addon_pointer\');">Pointer (images)</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="tree_menu" onclick="qmv_context_cmd(event,\'addon_tree_menu\');">Tree Style</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="apsubs" onclick="qmv_context_cmd(event,\'addon_apsubs\');">Keep Subs in Window</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="sopen_auto" onclick="qmv_context_cmd(event,\'addon_sopen_auto\');">Persistent State</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="keyboard" onclick="qmv_context_cmd(event,\'addon_keyboard\');">Keyboard Control</a>';
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="sopen" onclick="qmv_context_cmd(event,\'addon_sopen\');">Show Subs Onload</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="addon" ccat="over_select" onclick="qmv_context_cmd(event,\'addon_over_select\');">Select Tag Fix (IE)</a>';
				wt += '</div>';


			wt += '<a href="javascript:void(0);"  onclick="qmv_hide_context();qmv_update_all_main_checks();qmv.context_clicked=true;qmc_oo(event,this)">Settings</a>';

				wt += '<div ischecks=1>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'options\');">Options</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'structure\');">HTML Structure</a>';
				wt += qmv_show_context_build_divider();


				
				wt += '<a href="javascript:void(0)">Titles</a>';
					wt += '<div>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'title_styles\');">Properties...</a>';
					wt += qmv_show_context_build_divider();
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_title_before\');">Insert Before Item</a>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_title_after\');">Insert After Item</a>';
					wt += '</div>';	


				wt += '<a href="javascript:void(0)">Dividers</a>';
					wt += '<div>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'divider_styles\');">Properties...</a>';
					wt += qmv_show_context_build_divider();
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_divider_before\');">Insert Before Item</a>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_divider_after\');">Insert After Item</a>';
					wt += qmv_show_context_build_divider();
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'global_dividers\');">Apply Globally</a>';
					wt += '</div>';	


				wt += '<a href="javascript:void(0)">Content Boxes</a>';
					wt += '<div>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'cbox_styles\');">Properties...</a>';
					wt += qmv_show_context_build_divider();
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_cbox_before\');">Insert Before Item</a>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_cbox_after\');">Insert After Item</a>';
					wt += '</div>';	



				wt += '<a href="javascript:void(0)">Striping</a>';
					wt += '<div>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'stripe_styles\');">Properties...</a>';
					wt += qmv_show_context_build_divider();
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'global_stripes\');">Apply globally</a>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'apply_stripe_current_item\');">Apply to Item</a>';
					wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'remove_stripe_current_item\');">Remove from Item</a>';
					wt += '</div>';	





				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'quick_color_edits\');">Quick Color Edits</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'color_schemes\');">Color Schemes</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="settings" ccat="main_horizontal" onclick="qmv_context_cmd(event,\'set_main_horizontal\');">Horizontal Mains</a>';
				wt += '<a href="javascript:void(0)" ctype="settings" ccat="main_vertical" onclick="qmv_context_cmd(event,\'set_main_vertical\');">Vertical Mains</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="settings" ccat="sub_horizontal" onclick="qmv_context_cmd(event,\'set_sub_horizontal\');">Horizontal Subs</a>';
				wt += '<a href="javascript:void(0)" ctype="settings" ccat="sub_vertical" onclick="qmv_context_cmd(event,\'set_sub_vertical\');">Vertical Subs</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'show_delay\');">Show Delay</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'hide_delay\');">Hide Delay</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" ctype="settings" ccat="onclick" onclick="qmv_context_cmd(event,\'on_click\');">On Click</a>';
				wt += '<a href="javascript:void(0)" ctype="settings" ccat="onmouseover" onclick="qmv_context_cmd(event,\'on_mouse_over\');">On Mouse Over</a>';



				//wt += qmv_show_context_build_divider();
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'divider_styles\');">Divider Styles</a>';
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_divider\');">Insert Divider</a>';
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'global_dividers\');">Apply Globally</a>';
				//wt += qmv_show_context_build_divider();
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'title_styles\');">Title Styles</a>';
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_title\');">Insert Title</a>';
				//wt += qmv_show_context_build_divider();
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'cbox_styles\');">Content Box Styles</a>';
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_cbox\');">Insert Content Box</a>';
				//wt += qmv_show_context_build_divider();
				//wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'stripe_styles\');">Striping Styles</a>';
				

				


				wt += '</div>';	

		
			wt += '<a href="javascript:void(0);"  onclick="qmv_hide_context();qmv_update_all_main_checks();qmv.context_clicked=true;qmc_oo(event,this)">Help</a>';	

				wt += '<div>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'help_index\');">Index</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'help_tips\');">Tips</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'forums\');">Forums</a>';
				wt += qmv_show_context_build_divider();
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'options\');">Unlock</a>';
				wt += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'help_about\');">About</a>';

				wt += '</div>';	

			wt += '<span class="qmclear">&nbsp;</span></div>';

		wt += '</div>'


		wt += '<div class="qmvi-common qmvi-buttons" oncontextmenu="qm_kille(event)" style="">'
			wt+='<table border=0 cellspacing=0 cellpadding=0><tr>';


			wt+='<td id="qmvbb_hide_button1" style="vertical-align:top;"><img title="Save Menu(s)" '+dbl+'  onclick="qmv_evt_bb_click(\'save\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_save.gif" width=18 height=18 style="margin-left:0px;"></td>';
			wt+='<td id="qmvbb_hide_button2" style="vertical-align:top;padding-right:5px;"><img title="Quick Publish Menu(s)" '+dbl+' onclick="qmv_evt_bb_click(\'publish\')"class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_publish.gif" width=18 height=18 style=""></td>';

			
			wt+='<td id="qmvbb_hide_button3" style="vertical-align:top;"><img title="Copy Item" onclick="qmv_evt_bb_click(\'copyitem\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_copy_item.gif" width=18 height=18 style=""></td>';
			wt+='<td id="qmvbb_hide_button4" style="vertical-align:top;padding-right:5px;"><img title="Paste Item" onclick="qmv_evt_bb_click(\'pasteitem\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_paste_item.gif" width=18 height=18 style=""></td>';
	
			wt+='<td id="qmvbb_hide_button5" style="vertical-align:top;"><img title="Add Menu" onclick="qmv_evt_bb_click(\'addmenu\')" class="qmv-icon-buttons" src="'+qmv.base+'images/add_menu.gif" width=18 height=18 style=""></td>';
			wt+='<td id="qmvbb_hide_button6" style="vertical-align:top;padding-right:5px;"><img title="Delete Menu" onclick="qmv_evt_bb_click(\'deletemenu\')" class="qmv-icon-buttons" src="'+qmv.base+'images/delete_menu.gif" width=18 height=18 style=""></td>';


			wt+='<td style="vertical-align:top;"><img title="Preview Menu" onclick="qmv_evt_bb_click(\'preview\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_preview.gif" width=18 height=18 style=""></td>';
			wt+='<td id="qmvbb_hide_button3" style="vertical-align:top;padding-right:5px;"><img title="Menu Specs" onclick="qmv_evt_bb_click(\'specs\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_specs.gif" width=18 height=18 style=""></td>';


			wt+='<td id="qmvbb_hide_button8" style="vertical-align:top;"><img title="Quick Color Editor" onclick="qmv_evt_bb_click(\'quickcolors\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_quickcolors.gif" width=18 height=18 style=""></td>';
			wt+='<td style="vertical-align:top;padding-right:5px;"><img title="Enhanced Item Styles" onclick="qmv_show_context(event,\'enhanced_item_styles\',null,this)" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_item_styles.gif" width=26 height=18 style=""></td>';
					
			wt+='<td style="vertical-align:top;"><img title="Add Item" '+dbl+'  onclick="qmv_show_context(event,\'add_item\',null,this)" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_add2.gif" width=26 height=18 style="margin-left:0px;"></td>';
			wt+='<td style="vertical-align:top;padding-right:5px;"><img title="Insert Item" '+dbl+' onclick="qmv_show_context(event,\'insert_item\',null,this)"class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_insert2.gif" width=26 height=18 style=""></td>';
			wt+='<td style="vertical-align:top;"><img title="Delete Item" '+dbl+' onclick="qmv_evt_bb_click(\'delete\')"class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_delete.gif" width=18 height=18 style=""></td>';

			wt+='<td style="vertical-align:top;padding-right:5px;"><img title="Add Sub Menu" '+dbl+' onclick="qmv_show_context(event,\'add_sub\',null,this)" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_addsub2.gif" width=26 height=18 style=""></td>';

			wt+='<td style="vertical-align:top;"><img title="Move Item Up" '+dbl+' onclick="qmv_evt_bb_click(\'moveup\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_moveup.gif" width=18 height=18 style=""></td>';
			wt+='<td style="vertical-align:top;"><img title="Move Item Down" '+dbl+' onclick="qmv_evt_bb_click(\'movedown\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_bb_movedown.gif" width=18 height=18 style=""></td>';




			wt+='</tr></table>';
		wt += '</div>';

		wt += '<div class="qmvi-common qmvi-texturl">'
			wt+='<table width=100% border=0 cellspacing=0 cellpadding=0><tr>';
			wt+='<td style="padding-right:4px;vertical-align:top;"><img title="Item Images" onclick="qmv_context_cmd(event,\'item_image\');"  class="qmv-icon-buttons" src="'+qmv.base+'images/add_image.gif" width=18 height=18 style="margin-left:0px;"></td>';
			wt+='<td style="vertical-align:top;"><img title="Edit Url" id="qmv_texturl_url" onclick="qm_switch_texturl_state(\'url\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_url_off.gif" width=18 height=18 ></td>';
			wt+='<td style="vertical-align:top;"><img title="Edit Text / HTML" id="qmv_texturl_text" '+dbl+' onclick="qm_switch_texturl_state(\'text\')" class="qmv-icon-buttons" src="'+qmv.base+'images/qmv_text.gif" width=18 height=18 style=""></td>';

			wt += '</td>';
			wt+='<td style="width:100%;vertical-align:top;padding-right:1px;padding-left:1px;"><div class="qmvtree-input-container" style="height:16px;"><input dtype="texturl" onkeypress="qmv_evt_update_tree_value_enter(event,this)" onchange="qmv_evt_update_tree_value(this)" onfocus="this.prev_value = this.value" id="qmv_texturl_field" category="texturl" class="qmvtree-input" style="padding-top:1px;"></div></td>';
			wt+='<td style="padding-right:4px;vertical-align:top;"><span id="qmv_texturl_field_bb" onclick="if (qmv_check_texturl_build()){qmv_evt_build_button_click(this)}" class="qmvtree-button" style="height:18px;width:18px;">...</span></td>';
			wt+='</tr></table>';
		wt += '</div>';


		var uc = "pointer";
		if (qmad.br_ie) uc = "hand";

		//visual designtab bar		
		wt += '<div id="qmvi_vd_panel" oncontextmenu="qm_kille(event)" style="overflow:hidden;position:absolute;display:none;background-color:#ffffff;border-width:1px 1px 0px 1px;border-style:solid;border-color:#828EA2;">';
			wt += '<div style="height:24px;background-image:url('+qmv.base+'images/qmv_v_topbg.gif);">';
				wt += '<table cellpadding=0 cellspacing=0 style="width:100%;border-width:0px;"><tr>';
				
				var ts = ""
				if (!qmad.br_ie) ts = "-moz-user-select:none;"

				wt += '<td style="padding:2px 0px 0px 2px;'+ts+';"><div id="qmvi_vd_tab_design" onclick="qmvi_vd_tab_switch(event,this)" style="cursor:default;width:55px;height:17px;background-image:url('+qmv.base+'images/qmv_v_tab_design_on.gif)"><div class="qmvi-common qmvi-report-tabs">Design</div></div></td>';
				wt += '<td style="padding:2px 0px 0px 0px;'+ts+'"><div id="qmvi_vd_tab_css" onclick="qmvi_vd_tab_switch(event,this)" style="cursor:'+uc+';width:54px;height:17px;background-image:url('+qmv.base+'images/qmv_v_tab_css.gif)"><div class="qmvi-common qmvi-report-tabs">CSS</div></div></td>';
				wt += '<td style="padding:2px 0px 0px 0px;'+ts+'"><div id="qmvi_vd_tab_html" onclick="qmvi_vd_tab_switch(event,this)" style="cursor:'+uc+';width:54px;height:17px;background-image:url('+qmv.base+'images/qmv_v_tab_html.gif)"><div class="qmvi-common qmvi-report-tabs">HTML</div></div></td>';
				
				wt += '<td style="width:100%;"></td>';


				wt += '<td style="vertical-align:top;padding:0px 0px 0px 0px;"><div onclick="qmvi_indicator_on_off()" class="qmvi-common qmvi-report-tabs" style="margin:0px 0px 0px 10px;cursor:'+uc+';">Indicator:</div></td>';			
				wt += '<td style="vertical-align:top;padding:0px 0px 0px 0px;"><img onclick="qmvi_indicator_on_off()" id="qmvi_indicator_status_image" title="Hide Selected Item Indicator" src="'+qmv.base+'images/qmv_v_b_indicator_off.gif" width=16 height=12 style="margin:3px 0px 0px 4px;cursor:'+uc+';"></td>';

		
				wt += '<td style="vertical-align:top;padding:3px 15px 0px 15px;"><img src="'+qmv.base+'images/qmv_v_b_divider.gif" width=2 height=13 style=""></td>';

				wt += '<td onclick="qmv_show_context(event,\'grid\',null,this)" style="vertical-align:top;padding:0px 0px 0px 0px;white-space:nowrap;"><div class="qmvi-common qmvi-report-tabs" style="margin:0px 0px 0px 0px;cursor:'+uc+';"><img src="'+qmv.base+'images/qmv_v_b_red_arrow.gif" width=9 height=6 style="margin:0px 3px 0px 0px;cursor:'+uc+';">Grid:&nbsp;<span id="qmvi_grid_display" style="color:#0033dd;cursor:'+uc+';">none</span></div></td>';
				wt += '<td style="vertical-align:top;padding:0px 0px 0px 0px;"><div onclick="qmvi_change_design_bg_color()" class="qmvi-common qmvi-report-tabs" style="margin:0px 0px 0px 10px;cursor:'+uc+';">Design:</div></td>';
				var tbh = 10;
				if (qmad.br_ie) tbh = 10;
				wt += '<td style="vertical-align:top;padding:0px 0px 0px 0px;"><div qmdesignbg=1 id="qmvi_design_bg_div" onclick="qmvi_change_design_bg_color()" title="Design View Background Color" style="cursor:'+uc+';font-size:1px;border-width:1px;border-style:solid;border-color:#424c65;font-size:1px;width:10px;height:'+tbh+'px;background-color:#ffffff;margin:3px 0px 0px 4px;"></div></td>';
		
				wt += '<td style="vertical-align:top;padding:3px 15px 0px 15px;"><img src="'+qmv.base+'images/qmv_v_b_divider.gif" width=2 height=13 style=""></td>';

				var adddbl = "";
				if (qmad.br_ie) adddbl = 'ondblclick="qmvi_v_b_click_direction(this)" ';

				wt += '<td style="vertical-align:top;padding:2px 4px 0px 0px;"><img '+adddbl+'onclick="qmvi_v_b_click_direction(this)" onmouseover="this.src=\''+qmv.base+'images/qmv_v_b_down_hover.gif\'" onmouseout="this.src=\''+qmv.base+'images/qmv_v_b_down.gif\'" title="Move Selection Up" src="'+qmv.base+'images/qmv_v_b_down.gif" width=14 height=13 style=""></td>';
				wt += '<td style="vertical-align:top;padding:2px 6px 0px 0px;"><img '+adddbl+'onclick="qmvi_v_b_click_direction(this)" onmouseover="this.src=\''+qmv.base+'images/qmv_v_b_up_hover.gif\'" onmouseout="this.src=\''+qmv.base+'images/qmv_v_b_up.gif\'" title="Move Selection Down" src="'+qmv.base+'images/qmv_v_b_up.gif" width=14 height=13 style=""></td>';
				wt += '<td style="vertical-align:top;padding:2px 4px 0px 0px;"><img '+adddbl+'onclick="qmvi_v_b_click_direction(this)" onmouseover="this.src=\''+qmv.base+'images/qmv_v_b_left_hover.gif\'" onmouseout="this.src=\''+qmv.base+'images/qmv_v_b_left.gif\'" title="Move Selection Left" src="'+qmv.base+'images/qmv_v_b_left.gif" width=13 height=14 style=""></td>';
				wt += '<td style="vertical-align:top;padding:2px 0px 0px 0px;"><img '+adddbl+'onclick="qmvi_v_b_click_direction(this)" onmouseover="this.src=\''+qmv.base+'images/qmv_v_b_right_hover.gif\'" onmouseout="this.src=\''+qmv.base+'images/qmv_v_b_right.gif\'" title="Move Selection Right" src="'+qmv.base+'images/qmv_v_b_right.gif" width=13 height=14 style=""></td>';

				wt += '<td style=""><div style="font-size:1px;width:7px;"></div></td>';
				wt += '</tr></table>';
			wt += '</div>';
			
		wt += '</div>';

		//visual design window
		wt += '<div id="qmvi_menu_panel"  ondblclick="qmv_preview_menu();qm_kille(event);" onkeydown="qmvi_design_view_keypress_event(event)"  oncontextmenu="qmv_show_context(event,\'design_pad\',null,this)" onselectstart="qm_kille(event);" onclick="qmv_click_document_element(event)" style="-moz-user-select:none;z-index:0;overflow:scroll;position:absolute;display:none;background-color:#ffffff;border-width:0px 1px 1px 1px;border-style:solid;border-color:#828EA2;">&nbsp;</div>';
		wt += '<div id="qmvi_csshtml_panel" style="display:none;overflow:hidden;position:absolute;background-color:#ffffff;border-width:0px 1px 1px 1px;border-style:solid;border-color:#828EA2;"><textarea  readonly id="qmvi_csshtml_panel_data" class="qmvi-common" style="padding:15px 0px 0px 15px;font-size:12px;color:#222222;background-color:#ffffff;border-style:none;border-width:0px;position:relative;width:100%;'+qmv.resize_off_css+'"></textarea></div>';
		

		//event log reporting bar and window
		wt += '<div id="qmvi_report_panel" oncontextmenu="qm_kille(event)" style="overflow:hidden;position:absolute;display:none;background-color:#ffffff;border-width:1px 1px 1px 1px;border-style:solid;border-color:#828EA2;">';
			wt += '<div style="height:24px;background-image:url('+qmv.base+'images/qmv_r_topbg.gif);">';
				wt += '<table cellpadding=0 cellspacing=0 style="width:100%;border-width:0px;"><tr>';
				
				var ts = ""
				if (!qmad.br_ie) ts = "-moz-user-select:none;"

				wt += '<td style="padding:2px 0px 0px 2px;'+ts+'"><div id="qmvi_report_tab_all" onclick="qmvi_report_tab_switch(event,this)" style="cursor:default;width:69px;height:17px;background-image:url('+qmv.base+'images/qmv_r_tab_all_on.gif)"><div class="qmvi-common qmvi-report-tabs">All - <span id="qmvi_report_tabinfo_all" style="color:#0042cb;">0</span></div></div></td>';
				wt += '<td style="padding:2px 0px 0px 0px;'+ts+'"><div id="qmvi_report_tab_edits" onclick="qmvi_report_tab_switch(event,this)" style="cursor:'+uc+';width:83px;height:17px;background-image:url('+qmv.base+'images/qmv_r_tab_edits.gif)"><div class="qmvi-common qmvi-report-tabs"><img src="'+qmv.base+'images/qmv_r_icon_edits.gif" width=9 height=9 style="margin:-1px 4px 0px 0px;">Edits - <span id="qmvi_report_tabinfo_edits" style="color:#dd3300;">0</span></div></div></td>';
				wt += '<td style="padding:2px 0px 0px 0px;'+ts+'"><div id="qmvi_report_tab_warnings" onclick="qmvi_report_tab_switch(event,this)" style="cursor:'+uc+';width:101px;height:17px;background-image:url('+qmv.base+'images/qmv_r_tab_warnings.gif)"><div class="qmvi-common qmvi-report-tabs"><img src="'+qmv.base+'images/qmv_r_icon_warnings.gif" width=9 height=9 style="margin:-1px 4px 0px 0px;">Warnings - <span id="qmvi_report_tabinfo_warnings" style="color:#dd3300;">0</span></div></div></td>';
				wt += '<td style="padding:2px 0px 0px 0px;'+ts+'"><div id="qmvi_report_tab_info" onclick="qmvi_report_tab_switch(event,this)" style="cursor:'+uc+';width:81px;height:17px;background-image:url('+qmv.base+'images/qmv_r_tab_info.gif)"><div class="qmvi-common qmvi-report-tabs"><img src="'+qmv.base+'images/qmv_r_icon_info.gif" width=9 height=9 style="margin:-1px 4px 0px 0px;">Info. - <span id="qmvi_report_tabinfo_info" style="color:#dd3300;">0</span></div></div></td>';


				var adrub = "";
				if (qmad.br_ie)
					var adrub = 'ondblclick="qmvi_report_undo_redo_button(event,this)"';

				wt += '<td><div style="font-size:1px;width:14px;"></div></td>';
				wt += '<td style="vertical-align:top;padding:2px 0px 0px 0px;"><img id="qmvi_report_button_undo" '+adrub+' onclick="qmvi_report_undo_redo_button(event,this)" title="Undo" bname="undo" onmouseover="qmvi_report_button_hover(this,true)" onmouseout="qmvi_report_button_hover(this)" src="'+qmv.base+'images/qmv_r_button_undo_disabled.gif" width=18 height=14 style=""></td>';
				wt += '<td><div style="font-size:1px;width:4px;"></div></td>';
				wt += '<td style="vertical-align:top;padding:2px 0px 0px 0px;"><img id="qmvi_report_button_redo" '+adrub+' onclick="qmvi_report_undo_redo_button(event,this)" title="Redo" bname="redo" onmouseover="qmvi_report_button_hover(this,true)" onmouseout="qmvi_report_button_hover(this)"  src="'+qmv.base+'images/qmv_r_button_redo_disabled.gif" width=18 height=14 style=""></td>';
				wt += '<td><div style="font-size:1px;width:4px;"></div></td>';
				wt += '<td style="vertical-align:top;padding:2px 0px 0px 0px;"><img onclick="qmvi_report_delete()" title="Delete Event Log Items" src="'+qmv.base+'images/qmv_r_button_delete.gif" width=18 height=14 style="cursor:'+uc+';"></td>';


				wt += '<td style="width:100%;"></td>';

				wt += '<td style="white-space:nowrap;"><div class="qmvi-common" style="white-space:nowrap;font-size:11px;font-weight:normal;color:#444444;margin:-1px 15px 0px 0px;">Event Log:&nbsp;&nbsp;<span id="qmvr_menu_id" style="color:#0033dd;">Menu 0</span></div></td>';
				wt += '<td style=""><img onclick="qmvi_expand_collapse_report_window(event,this)" src="'+qmv.base+'images/qmv_r_collapse.gif" width=11 height=11 title="Collapse Event Log Window" style="margin:0px 0px -1px 0px;cursor:'+uc+';"></td>';
				wt += '<td style=""><div style="font-size:1px;width:5px;"></div></td>';
				wt += '</tr></table>';
			wt += '</div>';
			wt += '<div id="qmvi_report_panel_data" style="overflow-y:scroll;background-color:#f7f7f7;padding:5px 0px 0px 0px;"><div id="qmvi_report_panel_data_inner">';
			wt += '</div></div>';
		wt += '</div>';


		wt += '<div  id="qmvi_tree_menu_container" class="qmvi-common qmvi-tree-container" style="background-color:#f4f4f4;position:relative;z-index:0;border-width:1px 1px 1px 1px;border-style:solid;border-color:#828EA2;padding:0px;margin:0px 4px 4px 4px;overflow-y:scroll;height:300px;">';
		wt += qmv_init_interface_tree();
		wt += '</div>';

	wt += '</div>'

	return wt;


}


function qmv_init_dialog()
{

	var wt = "";
	

	var op = "opacity:.5;";
	if (qmad.br_ie)
		op = "filter:alpha(opacity=50);";
	

	wt += '<div id="qmvi_setbox_shadow" onselectstart="qmvi_kill_select(event)"  style="'+op+'z-index:'+(qmv.base_zindex+100)+';background-color:#888888;position:absolute;"></div>'
	wt += '<div id="qmvi_setbox" onselectstart="qmvi_kill_select(event)"   onclick="qmv_evt_kill_click(event)" class="qmvi-dialog-container" style="width:270px;">'

		var z = "";
		if (qmad.br_ie)
			z = "zoom:1;";

		wt += '<div style="font-size:1px;height:0px;width:0px;position:absolute;text-align:right;margin-left:100%;"><img onclick="qmv_hide_dialog(false,false,true)" src="'+qmv.base+'images/close_button.gif" width=14 height=14 style="position:absolute;display:block;left:-20px;top:5px;"></div>'
		wt += '<div id="qmvi_setbox_dialog_title" style="'+z+'" class="qmvi-common qmvi-title" onmouseup="qmv_evt_title_mouseup(event,this)" onmousemove="qmv_evt_title_mousemove(event,this)" onmousedown="qmv_evt_title_mousedown(event,this,4)" style="">Menu Properties</div>'
		wt += '<div id ="qmvi_setbox_content" class="qmvi-common qmvi-dialog-content-container"><div id="qmsetbox" class="qmmc"></div></div>';


	wt += '</div>';
	
	
	wt += '<div id="qmvi_dialog_shadow" onselectstart="qmvi_kill_select(event)" style="'+op+'z-index:'+(qmv.base_zindex+100)+';background-color:#888888;position:absolute;"></div>'
	wt += '<div id="qmvi_dialog"  onselectstart="qmvi_kill_select(event)"  onkeypress="qmv_dialog_onkeypress(event)" onclick="qmv_evt_kill_click(event)" class="qmvi-dialog-container" style="width:260px;">'

		var z = "";
		if (qmad.br_ie)
			z = "zoom:1;";

		wt += '<div style="font-size:1px;height:0px;width:0px;position:absolute;text-align:right;margin-left:100%;"><img onclick="qmv_hide_dialog()" src="'+qmv.base+'images/close_button.gif" width=14 height=14 style="position:absolute;display:block;left:-20px;top:5px;"></div>'
		wt += '<div id="qmvi_dialog_title" style="'+z+'" class="qmvi-common qmvi-title" onmouseup="qmv_evt_title_mouseup(event,this)" onmousemove="qmv_evt_title_mousemove(event,this)" onmousedown="qmv_evt_title_mousedown(event,this,1)" style="">Visual QuickMenu</div>'
		wt += '<div id ="qmvi_dialog_content" class="qmvi-common qmvi-dialog-content-container">asdfasdf</div>';
		wt += '<div id ="qmvi_dialog_buttons" class="qmvi-common" style="padding:0px 10px 7px 10px;text-align:right;"></div>';


	wt += '</div>';


	wt += '<div id="qmvi_msg_dialog_shadow" onselectstart="qmvi_kill_select(event)" style="'+op+'z-index:'+(qmv.base_zindex+100)+';background-color:#888888;position:absolute;"></div>'
	wt += '<div id="qmvi_msg_dialog" onselectstart="qmvi_kill_select(event)"  onkeypress="qmv_dialog_onkeypress(event)" onclick="qmv_evt_kill_click(event)" class="qmvi-dialog-container" style="width:260px;">'

		var z = "";
		if (qmad.br_ie)
			z = "zoom:1;";

		wt += '<div style="font-size:1px;height:0px;width:0px;position:absolute;text-align:right;margin-left:100%;"><img onclick="qmv_hide_dialog(true)" src="'+qmv.base+'images/close_button.gif" width=14 height=14 style="position:absolute;display:block;left:-20px;top:5px;"></div>'
		wt += '<div id="qmvi_msg_dialog_title" style="'+z+'" class="qmvi-common qmvi-title" onmouseup="qmv_evt_title_mouseup(event,this)" onmousemove="qmv_evt_title_mousemove(event,this)" onmousedown="qmv_evt_title_mousedown(event,this,2)" style="">Visual QuickMenu</div>'
		wt += '<div id ="qmvi_msg_dialog_content" class="qmvi-common qmvi-dialog-content-container" style="padding:15px;">asdfasdf</div>';
		wt += '<div id ="qmvi_msg_dialog_buttons" class="qmvi-common" style="padding:0px 10px 7px 10px;text-align:right;"></div>';


	wt += '</div>';

	wt += '<div id="qmvi_help_dialog_shadow" onselectstart="qmvi_kill_select(event)"  style="'+op+'z-index:'+(qmv.base_zindex+100)+';background-color:#888888;position:absolute;"></div>'
	wt += '<div id="qmvi_help_dialog" onselectstart="qmvi_kill_select(event)"  onkeypress="qmv_dialog_onkeypress(event)" onclick="qmv_evt_kill_click(event)" class="qmvi-dialog-container" style="width:260px;">'

		var z = "";
		if (qmad.br_ie)
			z = "zoom:1;";

		wt += '<div style="font-size:1px;height:0px;width:0px;position:absolute;text-align:right;margin-left:100%;"><img onclick="qmv_hide_dialog(false,true)" src="'+qmv.base+'images/close_button.gif" width=14 height=14 style="position:absolute;display:block;left:-20px;top:5px;"></div>'
		wt += '<div id="qmvi_help_dialog_title" style="'+z+'" class="qmvi-common qmvi-title" onmouseup="qmv_evt_title_mouseup(event,this)" onmousemove="qmv_evt_title_mousemove(event,this)" onmousedown="qmv_evt_title_mousedown(event,this,3)" style="">Visual QuickMenu</div>'
		wt += '<div id ="qmvi_help_dialog_content" class="qmvi-common qmvi-dialog-content-container">asdfasdf</div>';
		wt += '<div id ="qmvi_help_dialog_buttons" class="qmvi-common" style="padding:0px 10px 5px 10px;text-align:right;"></div>';


	wt += '</div>';



	//this is the template dialog - different than the rest
	wt += '<div id="qmvi_template_dialog" onselectstart="qmvi_kill_select(event)" oncontextmenu="qm_kille(event)" onclick="qmv_evt_kill_click(event)" style="font-size:13px;position:absolute;visibility:hidden;top:0px;left:0px;background-color:#eeeeee;z-index:'+(qmv.base_zindex+100)+';">'
	wt += '</div>';


	//this is the logon window
	wt += '<div id="qmvi_logon_shadow" onselectstart="qmvi_kill_select(event)" onclick="qmv_evt_kill_click(event)" style="'+op+'z-index:'+(qmv.base_zindex+100)+';background-color:#888888;position:absolute;"></div>'
	wt += '<div id="qmvi_logon" onselectstart="qmvi_kill_select(event)"  onkeypress="qmv_dialog_onkeypress(event)" onclick="qmv_evt_kill_click(event)" class="qmvi-dialog-container" style="width:260px;z-index:'+(qmv.base_zindex+100)+';">'

		var z = "";
		if (qmad.br_ie)
			z = "zoom:1;";

		wt += '<div id ="qmvi_logon_close" style="font-size:1px;height:0px;width:0px;position:absolute;text-align:right;margin-left:100%;visibility:hidden;"><img onclick="qmv_hide_dialog(false,false,false,true)" src="'+qmv.base+'images/close_button.gif" width=14 height=14 style="position:absolute;display:block;left:-20px;top:5px;"></div>'		
		wt += '<div id="qmvi_logon_title" style="'+z+'" class="qmvi-common qmvi-title">Visual QuickMenu Login</div>'
		wt += '<div id ="qmvi_logon_content" class="qmvi-common qmvi-dialog-content-container" style="padding:15px 20px 10px 20px;">asdfasdf</div>';
		wt += '<div id ="qmvi_logon_buttons" class="qmvi-common" style="padding:10px 20px;text-align:right;"></div>';


	wt += '</div>';
	

		
	//this is the wait message, typically for ie
	wt += '<div id="qmvi_wait_message_shadow" onselectstart="qmvi_kill_select(event)"  style="'+op+'z-index:'+(qmv.base_zindex+101)+';background-color:#888888;position:absolute;"></div>'
	wt += '<div class="qmvi-common" id="qmvi_wait_message" onselectstart="qmvi_kill_select(event)" oncontextmenu="qm_kille(event)" onclick="qmv_evt_kill_click(event)" style="font-size:13px;position:absolute;visibility:hidden;top:0px;left:0px;background-color:#eeeeee;z-index:'+(qmv.base_zindex+101)+';">'
	wt += '</div>';
	return wt;
}



function qmv_init_interface_tree()
{
	var wt = "";
	wt += '<div id="qmvtree" class="qmmc">'


	wt += '<a href="#" initshow=1 isfilter=1 id="qmvtree_filter" style="border-top-width:0px;">CSS Styles [filtered]</a>'	

		wt += '<div id="qmvtree_menu_styles_filtered" rule="skin">'
		
			wt += '<span style="display:block;margin:18px 10px 0px 0px;">';
			wt += '<table width=100% cellspacing=0 cellpadding=0 border=0><tr>';
			wt += '<td width=50% class="qmvtree-custfieldset"><span class="qmvtree-custlegend">Values</span><span class="qmvi-common" style="font-weight:normal;font-size:12px;position:relative;display:block;text-align:left;">add<input onclick="qmv_filter_change()" id="qmvf_value0" "class="qmvtree-checkbox" type="checkbox">&nbsp;edit<input onclick="qmv_filter_change()" id="qmvf_value1" class="qmvtree-checkbox" type="checkbox"></span></td>'
			wt += '<td><span style="display:block;font-size:1px;width:15px;"</td>';
			wt += '<td width=50% class="qmvtree-custfieldset"><span class="qmvtree-custlegend">Group</span><span  class="qmvi-common" style="font-weight:normal;font-size:12px;position:relative;display:block;text-align:left;">main<input onclick="qmv_filter_change()" id="qmvf_group0" name="qmvf_group" class="qmvtree-radio" type="radio">&nbsp;sub<input onclick="qmv_filter_change()" id="qmvf_group1" name="qmvf_group" class="qmvtree-radio" type="radio"></span></td>'
			wt += '</tr></table>';
			wt += '</span>';

			wt += '<span style="display:block;margin:18px 10px 0px 0px;">';
			wt += '<table width=100% cellspacing=0 cellpadding=0 border=0><tr>';
			wt += '<td width=100% class="qmvtree-custfieldset"><span class="qmvtree-custlegend">Section</span><span  class="qmvi-common" style="font-weight:normal;font-size:12px;position:relative;display:block;text-align:left;">containers<input onclick="qmv_filter_change()" id="qmvf_section0" name="qmvf_section" class="qmvtree-radio" type="radio">&nbsp;items<input onclick="qmv_filter_change()" id="qmvf_section1" name="qmvf_section"  class="qmvtree-radio" type="radio"></span></td>'
			wt += '</tr></table>';
			wt += '</span>';

			wt += '<span style="display:block;margin:18px 10px 5px 0px;">';
			wt += '<table width=100% cellspacing=0 cellpadding=0 border=0><tr>';
			wt += '<td width=100% class="qmvtree-custfieldset"><span class="qmvtree-custlegend">Style Type</span><span  class="qmvi-common" style="font-weight:normal;font-size:12px;position:relative;display:block;text-align:left;">color<input onclick="qmv_filter_change()" id="qmvf_style0" name="qmvf_style" class="qmvtree-radio" type="radio">&nbsp;font<input onclick="qmv_filter_change()" id="qmvf_style1" name="qmvf_style" class="qmvtree-radio" type="radio">&nbsp;border<input onclick="qmv_filter_change()" id="qmvf_style2" name="qmvf_style" class="qmvtree-radio" type="radio">&nbsp;other<input onclick="qmv_filter_change()" id="qmvf_style3" name="qmvf_style" class="qmvtree-radio" type="radio"></span></td>'
			wt += '</tr></table>';
			wt += '</span>';
		
			wt += '<span style="display:block;font-size:1px;height:5px;"></span>';
			wt += '<a href="#" isfresultsa=1 initshow=1>Filter Results <span id="qmvtree_filter_results_qty"></span></a>';

				wt += '<div id="qmvtree_filter_results">'
				wt += '<a href="#">place holder</a>';
				wt += '</div>';

			wt += '<span style="display:block;font-size:1px;height:5px;"></span>';

		wt += '</div>'


		
	wt += '<a href="#" >CSS Styles [unfiltered]</a>'

		wt += '<div id="qmvtree_css_styles">'
		wt += '<a initshow=1 href="#">Main</a>'
			wt += '<div group="main">'

			wt += '<a href="#" ruledesc="Container"><span isruledesc=1></span></a>'
				wt+='<div section="container" rule="#qm[i]" inheritrule="2@#qm[i] div">';
				wt += qmv_init_interface_tree_bracket(true);
				wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item('height','height','height','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);

				wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
					wt+='<div rule="#qm[i]" inheritrule="2@#qm[i] div">';
					wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
					wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
					wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
					wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
					wt+='</div>';

				wt += '<a href="#">Border Styles</a>'
					wt+='<div rule="#qm[i]" inheritrule="2@#qm[i] div">';
					wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
					wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
					wt+='</div>';

				wt += qmv_init_interface_tree_bracket();
				wt+='</div>';

			wt += '<a href="#">Items</a>'
				wt += '<div section="item">'
				
				wt += '<a href="#" ruledesc="Static"><span isruledesc=1></span></a>'
					wt+='<div ftitle="Static" rule="#qm[i] a" inheritrule="#qm[i] div a">';
					wt += qmv_init_interface_tree_bracket(true);
					wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] a" inheritrule="#qm[i] div a|4@#qm[i] .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static" rule="#qm[i] a" inheritrule="#qm[i] div a|4@#qm[i] .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
						wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
						wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] a" inheritrule="#qm[i] div a|4@#qm[i] .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';



				wt += '<a href="#" ruledesc="Hover"><span isruledesc=1></span></a>'
					wt+='<div rule="#qm[i] a:hover" inheritrule="#qm[i] div a:hover|3@body #qm[i] .qmactive">';
					wt += qmv_init_interface_tree_bracket(true);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static Hover" rule="#qm[i] a:hover" inheritrule="#qm[i] div a:hover|3@body #qm[i] .qmactive|4@#qm[i] a:hover .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static Hover" rule="#qm[i] a:hover" inheritrule="#qm[i] div a:hover|3@body #qm[i] .qmactive|4@#qm[i] a:hover .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static Hover" rule="#qm[i] a:hover" inheritrule="#qm[i] div a:hover|3@body #qm[i] .qmactive|4@#qm[i] a:hover .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';


				wt += '<a href="#" ruledesc="Parent"><span isruledesc=1></span></a>'
					wt+='<div ftitle="Parent" rule="#qm[i] .qmparent" inheritrule="#qm[i] div .qmparent">';
					wt += qmv_init_interface_tree_bracket(true);
					wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Parent" rule="#qm[i] .qmparent" inheritrule="#qm[i] div .qmparent">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Parent" rule="#qm[i] .qmparent" inheritrule="#qm[i] div .qmparent">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Parent" rule="#qm[i] .qmparent" inheritrule="#qm[i] div .qmparent">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';


				wt += '<a href="#" ruledesc="Parent Hover"><span isruledesc=1></span></a>'
					wt+='<div rule="#qm[i] .qmparent:hover" inheritrule="#qm[i] div .qmparent:hover">';
					wt += qmv_init_interface_tree_bracket(true);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Parent Hover" rule="#qm[i] .qmparent:hover" inheritrule="#qm[i] div .qmparent:hover">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Parent Hover" rule="#qm[i] .qmparent:hover" inheritrule="#qm[i] div .qmparent:hover">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Parent Hover" rule="#qm[i] .qmparent:hover" inheritrule="#qm[i] div .qmparent:hover">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';


				wt += '<a href="#" ruledesc="Active"><span isruledesc=1></span></a>'
					wt+='<div rule="body #qm[i] .qmactive" inheritrule="body #qm[i] div .qmactive">';
					wt += qmv_init_interface_tree_bracket(true);

					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Active" rule="body #qm[i] .qmactive" inheritrule="body #qm[i] div .qmactive|4@body #qm[i] .qmactive .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';
					
					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Active" rule="body #qm[i] .qmactive" inheritrule="body #qm[i] div .qmactive|4@body #qm[i] .qmactive .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Active" rule="body #qm[i] .qmactive" inheritrule="body #qm[i] div .qmactive|4@body #qm[i] .qmactive .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';
					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';

				/*
				wt += '<a href="#" ruledesc="Active Hover"><span isruledesc=1></span></a>'
					wt+='<div rule="body #qm[i] .qmactive:hover" inheritrule="body #qm[i] div .qmactive:hover">';
					wt += qmv_init_interface_tree_bracket(true);

					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Active Hover" rule="body #qm[i] .qmactive:hover" inheritrule="body #qm[i] div .qmactive:hover">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';
					
					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Active Hover" rule="body #qm[i] .qmactive:active" inheritrule="body #qm[i] div .qmactive:hover">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Active Hover" rule="body #qm[i] .qmactive:hover" inheritrule="body #qm[i] div .qmactive:hover">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';
					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';
				*/


				wt += '<a href="#" ruledesc="Persistent"><span isruledesc=1></span></a>'
					wt+='<div rule="body #qm[i] .qmpersistent" inheritrule="body #qm[i] div .qmpersistent">';
					wt += qmv_init_interface_tree_bracket(true);

					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Persistent" rule="body #qm[i] .qmpersistent" inheritrule="body #qm[i] div .qmpersistent|4@body #qm[i] .qmpersistent .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';
					
					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Persistent" rule="body #qm[i] .qmpersistent" inheritrule="body #qm[i] div .qmpersistent|4@body #qm[i] .qmpersistent .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Persistent" rule="body #qm[i] .qmpersistent" inheritrule="body #qm[i] div .qmpersistent|4@body #qm[i] .qmpersistent .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';
					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';

				wt += '</div>'

			wt+='</div>';

		wt += '<a initshow=1  href="#">Subs</a>'

			wt += '<div group="sub">'

			wt += '<a href="#" ruledesc="Container"><span isruledesc=1></span></a>'
				wt+='<div section="container" rule="#qm[i] div">';
				wt += qmv_init_interface_tree_bracket(true);
				wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);

				wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
					wt+='<div rule="#qm[i] div" inheritrule="5@addon:round_corners">';
					wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
					wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
					wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
					wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
					wt+='</div>';

				wt += '<a href="#">Border Styles</a>'
					wt+='<div rule="#qm[i] div" inheritrule="5@addon:round_corners">';
					wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
					wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
					wt+='</div>';

				wt += qmv_init_interface_tree_bracket();
				wt+='</div>';

			wt += '<a href="#">Items</a>'
				wt += '<div section="item">'
				
				wt += '<a href="#" ruledesc="Static"><span isruledesc=1></span></a>'
					wt+='<div ftitle="Static" rule="#qm[i] div a">';
					wt += qmv_init_interface_tree_bracket(true);
					wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] div a" inheritrule="4@#qm[i] div .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static" rule="#qm[i] div a" inheritrule="4@#qm[i] div .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
						wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
						wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] div a" inheritrule="4@#qm[i] div .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';



				wt += '<a href="#" ruledesc="Hover"><span isruledesc=1></span></a>'
					wt+='<div rule="#qm[i] div a:hover" inheritrule="3@body #qm[i] div .qmactive">';
					wt += qmv_init_interface_tree_bracket(true);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static Hover" rule="#qm[i] div a:hover" inheritrule="3@body #qm[i] div .qmactive|4@#qm[i] div a:hover .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static Hover" rule="#qm[i] div a:hover" inheritrule="3@body #qm[i] div .qmactive|4@#qm[i] div a:hover .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static Hover" rule="#qm[i] div a:hover" inheritrule="3@body #qm[i] div .qmactive|4@#qm[i] div a:hover .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';


				wt += '<a href="#" ruledesc="Parent"><span isruledesc=1></span></a>'
					wt+='<div ftitle="Parent" rule="#qm[i] div .qmparent">';
					wt += qmv_init_interface_tree_bracket(true);
					wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Parent" rule="#qm[i] div .qmparent">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Parent" rule="#qm[i] div .qmparent">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Parent" rule="#qm[i] div .qmparent">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';


				wt += '<a href="#" ruledesc="Parent Hover"><span isruledesc=1></span></a>'
					wt+='<div rule="#qm[i] div .qmparent:hover">';
					wt += qmv_init_interface_tree_bracket(true);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Parent Hover" rule="#qm[i] div .qmparent:hover">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Parent Hover" rule="#qm[i] div .qmparent:hover">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Parent Hover" rule="#qm[i] div .qmparent:hover">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';

				wt += '<a href="#" ruledesc="Active"><span isruledesc=1></span></a>'
					wt+='<div rule="body #qm[i] div .qmactive">';
					wt += qmv_init_interface_tree_bracket(true);

					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Active" rule="body #qm[i] div .qmactive" inheritrule="4@body #qm[i] div .qmactive .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';
					
					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Active" rule="body #qm[i] div .qmactive" inheritrule="4@body #qm[i] div .qmactive .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Active" rule="body #qm[i] div .qmactive" inheritrule="4@body #qm[i] div .qmactive .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';
					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';

				/*
				wt += '<a href="#" ruledesc="Active Hover"><span isruledesc=1></span></a>'
					wt+='<div rule="body #qm[i] div .qmactive:hover">';
					wt += qmv_init_interface_tree_bracket(true);

					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Active Hover" rule="body #qm[i] div .qmactive:hover">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';
					
					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Active Hover" rule="body #qm[i] div .qmactive:hover">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Active Hover" rule="body #qm[i] div .qmactive:hover">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';
					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';
				*/


				wt += '<a href="#" ruledesc="Persistent"><span isruledesc=1></span></a>'
					wt+='<div rule="body #qm[i] div .qmpersistent">';
					wt += qmv_init_interface_tree_bracket(true);

					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Persistent" rule="body #qm[i] div .qmpersistent" inheritrule="4@body #qm[i] div .qmpersistent .qmritem span">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';
					
					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Persistent" rule="body #qm[i] div .qmersistent" inheritrule="4@body #qm[i] div .qmpersistent .qmritem span">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Persistent" rule="body #qm[i] div .qmpersistent" inheritrule="4@body #qm[i] div .qmpersistent .qmritem span">';
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';
					wt += qmv_init_interface_tree_bracket();
					wt+='</div>';	

				wt += '</div>'

			wt+='</div>';

		wt += '</div>'


	wt += '<a href="#">CSS Styles [custom]</a>'

		wt+='<div id="qmvtree_custom_rules">';
			wt += qmv_init_interface_tree_item(null,'Add Custom CSS Rule','custom_rule','plus');
		wt += '</div>'


	wt += '<a href="#" initshow=1>Add-Ons</a>'

		wt += '<div id="qmvtree_addon_settings">'
		wt += '<a href="#">Animation Effects</a>'


			wt += '<div>'
			wt += qmv_init_interface_tree_addon_title("Box Animation","box_effect");
			
				wt += '<div rule="addon"  id="qmvtree_box" addontype="box_effect">'
				wt += qmv_init_interface_tree_item(null,'frames','box_animation_frames','addon','int',20,"x<0 || x>200");
				wt += qmv_init_interface_tree_item(null,'accelerator','box_accelerator','addon','float',".4|none","x<0 || x>10");
				wt += qmv_init_interface_tree_item(null,'position','box_position','addon','box-position',"center|none");
				

				wt += '<a style="margin-top:10px;" href="#" ruledesc="Box Styles"><span isruledesc=1></span></a>'	
					wt += '<div rule="#qm[i] .qmbox">'

					wt += qmv_init_interface_tree_bracket(true);

					
						wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
							wt+='<div ftitle="Static" rule="#qm[i] .qmbox">';
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt+='</div>';


						wt += '<a href="#">Border Styles</a>'
							wt+='<div ftitle="Static" rule="#qm[i] .qmbox">';
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',"1px|none",'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',"solid|none",null);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',"#999999|none",null);
							wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt += '</div>'
					wt += '<span style="display:block;font-size:1px;height:10px;"></span>';

				wt += '</div>'

			
			wt += qmv_init_interface_tree_addon_title("Fade Subs","fade");
			
				wt += '<div rule="addon" addontype="fade">'
				
				wt += qmv_init_interface_tree_item(null,'frames in','fade_in_frames','addon','int','20|or',"x<0 || x>500");
				wt += qmv_init_interface_tree_item(null,'frames out','fade_out_frames','addon','int','20|or',"x<0 || x>500");
				wt += '</div>'


			wt += qmv_init_interface_tree_addon_title("Bump Subs","bump_effect");
			
				wt += '<div rule="addon" addontype="bump_effect">'
				
				wt += qmv_init_interface_tree_item(null,'frames','bump_animation_frames','addon','int',10,"x<0 || x>200");
				wt += qmv_init_interface_tree_item(null,'distance','bump_distance','addon','int','20|none',"x<0");
				wt += qmv_init_interface_tree_item(null,'main dir.','bump_main_direction','addon','bump-direction','left|none');
				wt += qmv_init_interface_tree_item(null,'sub dir.','bump_sub_direction','addon','bump-direction','left|none');
				wt += qmv_init_interface_tree_item(null,'auto mains','bump_auto_switch_main_left_right_directions','addon','bool','true|none');
				wt += '</div>'

			wt += qmv_init_interface_tree_addon_title("Slide Subs","slide_effect");
			
				wt += '<div rule="addon" addontype="slide_effect">'
				wt += qmv_init_interface_tree_item(null,'frames','slide_animation_frames','addon','int',15,"x<0 || x>200");
				wt += qmv_init_interface_tree_item(null,'accelerator','slide_accelerator','addon','float',null,"x<0 || x>10");
				wt += qmv_init_interface_tree_item(null,'main right','slide_left_right','addon','bool');
				wt += qmv_init_interface_tree_item(null,'sub right','slide_sub_subs_left_right','addon','bool');
				wt += qmv_init_interface_tree_item(null,'offset xy','slide_offxy','addon','int');
				wt += qmv_init_interface_tree_item(null,'drop subs','slide_drop_subs','addon','bool',null,null,"qmv_update_slide_drop_subs(a)");
				wt += qmv_init_interface_tree_item(null,'drop height','slide_drop_subs_height','addon','int',null,null,"qmv_update_slide_drop_subs_height(a)");
				wt += qmv_init_interface_tree_item(null,'drop hide','slide_drop_subs_disappear','addon','bool');
				wt += '</div>'


			wt += qmv_init_interface_tree_addon_title("Merge Subs","merge_effect");
			
				wt += '<div rule="addon" addontype="merge_effect">'
				wt += qmv_init_interface_tree_item(null,'frames','merge_frames','addon','int',20,"x<0 || x>20");
				wt += qmv_init_interface_tree_item(null,'main up','merge_updown','addon','bool');
				wt += qmv_init_interface_tree_item(null,'subs up','merge_sub_subs_updown','addon','bool');
				wt += qmv_init_interface_tree_item(null,'opacity','merge_opacity','addon','float',null,"x<0 || x>1");
				wt += '</div>'

			

			wt += qmv_init_interface_tree_addon_title("Hover Fill","hoverfill");

				wt += '<div rule="addon" id="qmvtree_hoverfill" addontype="hoverfill">'

				wt += qmv_init_interface_tree_item(null,'Apply To','hoverfill_apply_to','addon','hoverfill-apply','all|none');
				wt += '<span style="display:block;font-size:1px;height:10px;"></span>';
											
				

				wt += '<a href="#" initshow=1>Options</a>'
					wt += '<div>';
	
						wt += qmv_init_interface_tree_item(null,'Set Item Colors Transparent','hoverfill_trans','plus');
						wt += '<span style="display:block;font-size:1px;height:5px;"></span>';
					
					wt+='</div>';


				wt += '<a href="#">Main Hovers</a>'
					wt += '<div rule="addon" addontype="hoverfill">';


						wt += qmv_init_interface_tree_item(null,'type','hoverfill_main_type','addon','hoverfill-type','fade|or');
						wt += qmv_init_interface_tree_item(null,'direction','hoverfill_main_direction','addon','hoverfill-direction','up|none');
						wt += qmv_init_interface_tree_item(null,'step size','hoverfill_main_step_size','addon','int','1|none',"x<0 || x>10");
						wt += qmv_init_interface_tree_item(null,'fade in','hoverfill_main_fade_in','addon','bool','true|none');
						wt += qmv_init_interface_tree_item(null,'fade steps','hoverfill_main_fade_type_steps','addon','int',null,"x<0 || x>1000");
						wt += qmv_init_interface_tree_item(null,'off. width','hoverfill_main_offset_width','addon','int');
						wt += qmv_init_interface_tree_item(null,'off. height','hoverfill_main_offset_height','addon','int');
						wt += '<span style="display:block;font-size:1px;height:10px;"></span>';
		

						wt += '<a href="#">Items [Static]</a>'	
		
							wt += '<div rule="#qm[i] .qmhoverfill">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',"#91ed99|none",null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle');
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color');
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Parent]</a>'	
		
							wt += '<div rule="#qm[i] .qmhoverfill.qmhparent">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color');
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle');
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color');
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';

					
					wt+='</div>';

				wt += '<a href="#">Sub Hovers</a>'
					wt += '<div rule="addon" addontype="hoverfill">';
						
						wt += qmv_init_interface_tree_item(null,'type','hoverfill_sub_type','addon','hoverfill-type','grow|or');
						wt += qmv_init_interface_tree_item(null,'direction','hoverfill_sub_direction','addon','hoverfill-direction','up|none');
						wt += qmv_init_interface_tree_item(null,'step size','hoverfill_sub_step_size','addon','int','1|none',"x<0 || x>10");
						wt += qmv_init_interface_tree_item(null,'fade in','hoverfill_sub_fade_in','addon','bool','true|none');
						wt += qmv_init_interface_tree_item(null,'fade steps','hoverfill_sub_fade_type_steps','addon','int',null,"x<0 || x>1000");
						wt += qmv_init_interface_tree_item(null,'off. width','hoverfill_sub_offset_width','addon','int',"-2|none");
						wt += qmv_init_interface_tree_item(null,'off. height','hoverfill_sub_offset_height','addon','int',"-2|none");
						wt += '<span style="display:block;font-size:1px;height:10px;"></span>';
		

						wt += '<a href="#">Items [Static]</a>'	
		
							wt += '<div rule="#qm[i] div .qmhoverfill">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',"#91e599|none");
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',"1px|none",'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',"solid|none");
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',"#555555|none");
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Parent]</a>'	
		
							wt += '<div rule="#qm[i] div .qmhoverfill.qmhparent">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color');
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle');
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color');
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';
						

					wt+='</div>';


					wt += '<span style="display:block;font-size:1px;height:10px;"></span>';
				

				wt += '</div>'


			wt += '</div>'



		wt += '<a initshow=1  href="#" >CSS Shapes <span style="color:#dd3300;">[imageless]</span></a>'

			wt += '<div>'


			wt += qmv_init_interface_tree_addon_title("Item Bullets","ibcss");
			
				wt += '<div rule="addon" addontype="ibcss" addor="ibcss_main_type|ibcss_sub_type">'
				wt += qmv_init_interface_tree_item(null,'apply to','ibcss_apply_to','addon','ibullets-apply',"parent|none",null,null);

				wt += '<a href="JavaScript:void(0);" >Main</a>'
					wt += '<div rule="addon" addontype="ibcss">'
					wt += qmv_init_interface_tree_item(null,'type','ibcss_main_type','addon','ibcss-type',"arrow-head|or");
					wt += qmv_init_interface_tree_item(null,'direction','ibcss_main_direction','addon','ibcss-direction',"down|none");
					wt += qmv_init_interface_tree_item(null,'size','ibcss_main_size','addon','int',"5|none","x<0");


					wt += '<a href="JavaScript:void(0);" >Colors</a>'
						wt += '<div rule="addon" addontype="ibcss">'
						wt += qmv_init_interface_tree_item(null,'bg-static','ibcss_main_bg_color','addon','color');
						wt += qmv_init_interface_tree_item(null,'bg-hover','ibcss_main_bg_color_hover','addon','color');
						wt += qmv_init_interface_tree_item(null,'bg-active','ibcss_main_bg_color_active','addon','color');
						wt += qmv_init_interface_tree_item(null,'border-static','ibcss_main_border_color','addon','color');
						wt += qmv_init_interface_tree_item(null,'border-hover','ibcss_main_border_color_hover','addon','color');
						wt += qmv_init_interface_tree_item(null,'border-active','ibcss_main_border_color_active','addon','color');
						wt += '</div>';

					

					wt += '<a href="JavaScript:void(0);" >Position</a>'
						wt += '<div rule="addon" addontype="ibcss">'
						wt += qmv_init_interface_tree_item(null,'offset x','ibcss_main_position_x','addon','int',"-16|none");
						wt += qmv_init_interface_tree_item(null,'offset y','ibcss_main_position_y','addon','int',"-5|none");
						wt += qmv_init_interface_tree_item(null,'align x','ibcss_main_align_x','addon','textalign',"right|none");
						wt += qmv_init_interface_tree_item(null,'align y','ibcss_main_align_y','addon','verticalalign',"middle|none");
						wt += '</div>';

					wt += '</div>';

				wt += '<a href="JavaScript:void(0);" >Sub</a>'
					wt += '<div rule="addon" addontype="ibcss">'
					wt += qmv_init_interface_tree_item(null,'type','ibcss_sub_type','addon','ibcss-type',"arrow-head|or");
					wt += qmv_init_interface_tree_item(null,'direction','ibcss_sub_direction','addon','ibcss-direction',"right|none");
					wt += qmv_init_interface_tree_item(null,'size','ibcss_sub_size','addon','int',"5|none","x<0");


					wt += '<a href="JavaScript:void(0);" >Colors</a>'
						wt += '<div rule="addon" addontype="ibcss">'
						wt += qmv_init_interface_tree_item(null,'bg-static','ibcss_sub_bg_color','addon','color');
						wt += qmv_init_interface_tree_item(null,'bg-hover','ibcss_sub_bg_color_hover','addon','color');
						wt += qmv_init_interface_tree_item(null,'bg-active','ibcss_sub_bg_color_active','addon','color');
						wt += qmv_init_interface_tree_item(null,'border-static','ibcss_sub_border_color','addon','color');
						wt += qmv_init_interface_tree_item(null,'border-hover','ibcss_sub_border_color_hover','addon','color');
						wt += qmv_init_interface_tree_item(null,'border-active','ibcss_sub_border_color_active','addon','color');
						wt += '</div>';

					

					wt += '<a href="JavaScript:void(0);" >Position</a>'
						wt += '<div rule="addon" addontype="ibcss">'
						wt += qmv_init_interface_tree_item(null,'offset x','ibcss_sub_position_x','addon','int',"-16|none");
						wt += qmv_init_interface_tree_item(null,'offset y','ibcss_sub_position_y','addon','int',"0|none");
						wt += qmv_init_interface_tree_item(null,'align x','ibcss_sub_align_x','addon','textalign',"right|none");
						wt += qmv_init_interface_tree_item(null,'align y','ibcss_sub_align_y','addon','verticalalign',"middle|none");
						wt += '</div>';

					wt += '</div>';
				
				wt += '</div>'	



			wt += qmv_init_interface_tree_addon_title("Tabs","tabscss");
			
				wt += '<div rule="addon" addontype="tabscss">'
				wt += qmv_init_interface_tree_item(null,'type','tabscss_type','addon','tabscss-type',"angled");
				wt += qmv_init_interface_tree_item(null,'size','tabscss_size','addon','int',"5|none","x<0");
				wt += qmv_init_interface_tree_item(null,'offset x','tabscss_left_offset','addon','int');
				wt += qmv_init_interface_tree_item(null,'offset y','tabscss_top_offset','addon','int');
				wt += qmv_init_interface_tree_item(null,'left','tabscss_apply_far_left','addon','bool',"false|none");
				wt += qmv_init_interface_tree_item(null,'right','tabscss_apply_far_right','addon','bool',"false|none");
				wt += qmv_init_interface_tree_item(null,'between','tabscss_apply_middles','addon','bool',"true|none");
				wt += qmv_init_interface_tree_item(null,'bg color','tabscss_bg_color','addon','color',"#ffffff|none");
				wt += qmv_init_interface_tree_item(null,'border color','tabscss_border_color','addon','color');
				wt += '</div>'
			

			
			wt += qmv_init_interface_tree_addon_title("Rounded Subs","round_corners");
			
				wt += '<div rule="addon" addontype="round_corners">'

				wt += '<a style="margin-top:10px;" href="#">Options</a>'
					wt += '<div>';
					wt += qmv_init_interface_tree_item(null,'Blend Colors','rcorner_blend','plus');
					wt+='</div>';
				wt += '<span style="display:block;font-size:1px;height:10px;"></span>';

				wt += qmv_init_interface_tree_item(null,'size','rcorner_size','addon','int',6,"x<0");
				wt += qmv_init_interface_tree_item('border-color','border color','rcorner_border_color','addon','color');
				wt += qmv_init_interface_tree_item('bg-color','bg color','rcorner_bg_color','addon','color');
				wt += qmv_init_interface_tree_item(null,'opacity','rcorner_opacity','addon','float',null,"x<0 || x>1");
				wt += qmv_init_interface_tree_item(null,'angled','rcorner_angle_corners','addon','bool');
				wt += qmv_init_interface_tree_item(null,'apply','rcorner_apply_corners','addon','corners-bool-array');
				wt += qmv_init_interface_tree_item(null,'top inset','rcorner_top_line_auto_inset','addon','bool');
				wt += '</div>'


			wt += qmv_init_interface_tree_addon_title("Rounded Items","ritem");
			


				wt += '<div rule="addon"  id="qmvtree_ritem" addontype="ritem">'
				wt += qmv_init_interface_tree_item(null,'size','ritem_size','addon','int',4,"x<0 || x>200");
				wt += qmv_init_interface_tree_item(null,'apply','ritem_apply','addon','ritem-apply',"main|none");
				wt += qmv_init_interface_tree_item(null,'angled','ritem_angle_corners','addon','bool');
				wt += qmv_init_interface_tree_item(null,'main corners','ritem_main_apply_corners','addon','corners-bool-array');
				wt += qmv_init_interface_tree_item(null,'sub corners','ritem_sub_apply_corners','addon','corners-bool-array');
				wt += qmv_init_interface_tree_item(null,'actives only','ritem_show_on_actives','addon','bool');
				
				

				wt += '<a style="margin-top:10px;" href="#">Options</a>'
					wt += '<div>';
	
						wt += qmv_init_interface_tree_item(null,'Apply Individual','ritem_individual','plus');
						wt += qmv_init_interface_tree_item(null,'Remove Individual','ritem_individual_remove','plus');
						wt += qmv_init_interface_tree_item(null,'Underlying Main Item Styles','ritem_mitem_styles','plus');
						wt += qmv_init_interface_tree_item(null,'Underlying Sub Item Styles','ritem_sitem_styles','plus');
						wt += qmv_init_interface_tree_item(null,'Remove Main Item Borders','ritem_remove_mborders','plus');
						wt += qmv_init_interface_tree_item(null,'Remove Sub Item Borders','ritem_remove_sborders','plus');

					wt+='</div>';
				

				wt += '<a href="#">Main Styles</a>'
					wt += '<div>';
						
						wt += '<a href="#">Item Content</a>'	
		
							wt += '<div rule="#qm[i] .qmritemcontent">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',"0px 0px 0px 4px|none",'x<0');
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Static]</a>'	
		
							wt += '<div rule="#qm[i] .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',"#666666|none",null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',"#eeeeee|none",null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Hover]</a>'	
		
							wt += '<div rule="#qm[i] a:hover .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Active]</a>'	
		
							wt += '<div rule="body #qm[i] .qmactive .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Persistent]</a>'	
		
							wt += '<div rule="body #qm[i] .qmpersistent .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';

					wt+='</div>';

				wt += '<a href="#">Sub Styles</a>'
					wt += '<div>';
						
						wt += '<a href="#">Item Content</a>'	
		
							wt += '<div rule="#qm[i] div .qmritemcontent">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',"0px 0px 0px 4px|none",'x<0');
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Static]</a>'	
		
							wt += '<div rule="#qm[i] div .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',"#666666|none",null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',"#eeeeee|none",null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Hover]</a>'	
		
							wt += '<div rule="#qm[i] div a:hover .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Active]</a>'	
		
							wt += '<div rule="body #qm[i] div .qmactive .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';


						wt += '<a href="#">Items [Persistent]</a>'	
		
							wt += '<div rule="body #qm[i] div .qmpersistent .qmritem span">'
							wt += qmv_init_interface_tree_bracket(true);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_bracket();
							wt+='</div>';
						

					wt+='</div>';


					wt += '<span style="display:block;font-size:1px;height:10px;"></span>';
				

				wt += '</div>'
				

			
			wt += qmv_init_interface_tree_addon_title("Drop Shadows","drop_shadow");
			
				wt += '<div rule="addon" addontype="drop_shadow">'
				wt += qmv_init_interface_tree_item(null,'offset','shadow_offset','addon','int',3);
				wt += qmv_init_interface_tree_item(null,'color','shadow_color','addon','color');
				wt += qmv_init_interface_tree_item(null,'opacity','shadow_opacity','addon','float',null,"x<0 || x>1");
				wt += '</div>'



			wt += qmv_init_interface_tree_addon_title("Match Widths","match_widths");
			
				wt += '<div rule="addon" addontype="match_widths">'
				wt += qmv_init_interface_tree_item(null,'active','mwidths_active','addon','bool',true);
				wt += '</div>'

			
			wt += '</div>'


		wt += '<a href="#">Image Based</a>'
			wt += '<div>'
							
			wt += qmv_init_interface_tree_addon_title("Item Bullets","item_bullets");
			
				wt += '<div rule="addon" addontype="item_bullets" addor="ibullets_main_image|ibullets_sub_image">'
				wt += qmv_init_interface_tree_item(null,'apply to','ibullets_apply_to','addon','ibullets-apply',"parent|none",null,null);

				wt += '<a href="JavaScript:void(0);" >Main</a>'
					wt += '<div rule="addon" addontype="item_bullets">'
					wt += qmv_init_interface_tree_item(null,'static','ibullets_main_image','addon','image',qmv.base+"images/arrow_down.gif|or");
					wt += qmv_init_interface_tree_item(null,'hover','ibullets_main_image_hover','addon','image');
					wt += qmv_init_interface_tree_item(null,'active','ibullets_main_image_active','addon','image');
					wt += qmv_init_interface_tree_item(null,'width','ibullets_main_image_width','addon','int',"9|none","x<0");
					wt += qmv_init_interface_tree_item(null,'height','ibullets_main_image_height','addon','int',"6|none","x<0");

					wt += '<a href="JavaScript:void(0);" >Position</a>'
						wt += '<div rule="addon" addontype="item_bullets">'
						wt += qmv_init_interface_tree_item(null,'offset x','ibullets_main_position_x','addon','int',"-16|none");
						wt += qmv_init_interface_tree_item(null,'offset y','ibullets_main_position_y','addon','int',"-5|none");
						wt += qmv_init_interface_tree_item(null,'align x','ibullets_main_align_x','addon','textalign',"right|none");
						wt += qmv_init_interface_tree_item(null,'align y','ibullets_main_align_y','addon','verticalalign',"middle|none");
						wt += '</div>';

					wt += '</div>';

				wt += '<a href="JavaScript:void(0);" style="margin-bottom:6px;">Sub</a>'
					wt += '<div rule="addon" addontype="item_bullets">'
					wt += qmv_init_interface_tree_item(null,'static','ibullets_sub_image','addon','image',qmv.base+"images/arrow_right.gif|or");
					wt += qmv_init_interface_tree_item(null,'hover','ibullets_sub_image_hover','addon','image');
					wt += qmv_init_interface_tree_item(null,'active','ibullets_sub_image_active','addon','image');
					wt += qmv_init_interface_tree_item(null,'width','ibullets_sub_image_width','addon','int',"6|none","x<0");
					wt += qmv_init_interface_tree_item(null,'height','ibullets_sub_image_height','addon','int',"9|none","x<0");

					wt += '<a href="JavaScript:void(0);" >Position</a>'
						wt += '<div rule="addon" addontype="item_bullets">'
						wt += qmv_init_interface_tree_item(null,'offset x','ibullets_sub_position_x','addon','int',"-12|none");
						wt += qmv_init_interface_tree_item(null,'offset y','ibullets_sub_position_y','addon','int',"-2|none");
						wt += qmv_init_interface_tree_item(null,'align x','ibullets_sub_align_x','addon','textalign',"right|none");
						wt += qmv_init_interface_tree_item(null,'align y','ibullets_sub_align_y','addon','verticalalign',"middle|none");
						wt += '</div>';
					
					wt += '</div>';
				
				wt += '</div>'



			wt += qmv_init_interface_tree_addon_title("Tabs","tabs");
			
				wt += '<div rule="addon" addontype="tabs">'
				wt += qmv_init_interface_tree_item(null,'image','tabs_image','addon','image',qmv.base+"image_library/tab_dividers/tab_divider1.gif");
				wt += qmv_init_interface_tree_item(null,'width','tabs_width','addon','int',"15|none","x<0");
				wt += qmv_init_interface_tree_item(null,'height','tabs_height','addon','int',"8|none","x<0");
				wt += qmv_init_interface_tree_item(null,'offset y','tabs_top_offset','addon','int');
				wt += qmv_init_interface_tree_item(null,'left','tabs_apply_far_left','addon','bool');
				wt += qmv_init_interface_tree_item(null,'right','tabs_apply_far_right','addon','bool');
				wt += qmv_init_interface_tree_item(null,'between','tabs_apply_middles','addon','bool');
				wt += '</div>'



			
			wt += qmv_init_interface_tree_addon_title("Follow Pointer","pointer");
			
				wt += '<div rule="addon" addontype="pointer" addor="pointer_main_image|pointer_sub_image">'
				
				wt += '<a href="JavaScript:void(0);" >Main</a>'
					wt += '<div rule="addon" addontype="pointer">'
					wt += qmv_init_interface_tree_item(null,'image','pointer_main_image','addon','image',qmv.base+"image_library/bullets/arrows/a1_down.gif|or");
					wt += qmv_init_interface_tree_item(null,'width','pointer_main_image_width','addon','int',"8|none","x<0");
					wt += qmv_init_interface_tree_item(null,'height','pointer_main_image_height','addon','int',"6|none","x<0");
					wt += qmv_init_interface_tree_item(null,'align','pointer_main_align','addon','palign',"top-or-left|none");
					wt += qmv_init_interface_tree_item(null,'offset x','pointer_main_off_x','addon','int',"-3|none");
					wt += qmv_init_interface_tree_item(null,'offset y','pointer_main_off_y','addon','int',"-3|none");
					wt += '</div>'	
					
				wt += '<a href="JavaScript:void(0);" style="margin-bottom:6px;">Sub</a>'
					wt += '<div rule="addon" addontype="pointer">'
					wt += qmv_init_interface_tree_item(null,'image','pointer_sub_image','addon','image',qmv.base+"image_library/bullets/arrows/a1_right.gif|or");
					wt += qmv_init_interface_tree_item(null,'width','pointer_sub_image_width','addon','int',"6|none","x<0");
					wt += qmv_init_interface_tree_item(null,'height','pointer_sub_image_height','addon','int',"8|none","x<0");
					wt += qmv_init_interface_tree_item(null,'align','pointer_sub_align','addon','palign',"top-or-left|none");
					wt += qmv_init_interface_tree_item(null,'offset x','pointer_sub_off_x','addon','int',"-3|none");
					wt += qmv_init_interface_tree_item(null,'offset y','pointer_sub_off_y','addon','int',"-3|none");
					wt += '</div>'	

				wt += '</div>'	



			wt += '</div>'
	
			

		wt += '<a href="#" >Menu Control</a>'

			wt += '<div>'
			wt += qmv_init_interface_tree_addon_title("Tree Style","tree_menu");
			
				wt += '<div rule="addon" addontype="tree_menu">'
					
				wt += qmv_init_interface_tree_item(null,'Set Main Width','set_main_width','plus');
				wt += '<span style="display:block;font-size:1px;height:10px;"></span>';

				wt += qmv_init_interface_tree_item(null,'enabled','tree_enabled','addon','bool','true');
				wt += qmv_init_interface_tree_item(null,'sub2+ indent','tree_sub_sub_indent','addon','int',null,"x<0");
				wt += qmv_init_interface_tree_item(null,'hide focus','tree_hide_focus_box','addon','bool');
				wt += qmv_init_interface_tree_item(null,'auto close','tree_auto_collapse','addon','bool',"true|none");
				wt += '<span style="display:block;font-size:1px;height:5px;"></span>';

				wt += '<a href="JavaScript:void(0);" >Expand Animation</a>'
					wt += '<div rule="addon" addontype="tree_menu">'
					wt += qmv_init_interface_tree_item(null,'Type','tree_expand_animation','addon','treeanimationtype');
					wt += qmv_init_interface_tree_item(null,'Step Size','tree_expand_step_size','addon','int',null,"x<0 || x>50");
					wt += '</div>';

				wt += '<a href="JavaScript:void(0);" style="margin-bottom:6px;">Collapse Animation</a>'
					wt += '<div rule="addon" addontype="tree_menu">'
					wt += qmv_init_interface_tree_item(null,'Type','tree_collapse_animation','addon','treeanimationtype');
					wt += qmv_init_interface_tree_item(null,'Step Size','tree_collapse_step_size','addon','int',null,"x<0 || x>50");
					wt += '</div>';

				wt += '<span style="display:block;font-size:1px;height:8px;"></span>';	
				wt += '</div>'
				


			wt += qmv_init_interface_tree_addon_title("Keep Subs In Window","apsubs");
			
				wt += '<div rule="addon" addontype="apsubs">'
				wt += qmv_init_interface_tree_item(null,'active','subs_in_window_active','addon','bool',true);
				wt += '</div>'

			wt += qmv_init_interface_tree_addon_title("Persistent State ","sopen_auto");
			
				wt += '<div rule="addon" addontype="sopen_auto">'

				wt += qmv_init_interface_tree_item(null,'Help','pstate_help','plus');
				wt += '<span style="display:block;font-size:1px;height:7px;"></span>';
				wt += qmv_init_interface_tree_item(null,'Test On Selected Item','pstate_add','plus');
				wt += qmv_init_interface_tree_item(null,'Remove From Selected Item','pstate_remove','plus');
				wt += qmv_init_interface_tree_item(null,'Remove All Test Items','pstate_remove_all','plus');
				wt += '<span style="display:block;font-size:1px;height:7px;"></span>';
				wt += qmv_init_interface_tree_item(null,'Main Persistent Styles','pstate_main_styles','plus');
				wt += qmv_init_interface_tree_item(null,'Sub Persistent Styles','pstate_sub_styles','plus');
				wt += '<span style="display:block;font-size:1px;height:15px;"></span>';

				wt += qmv_init_interface_tree_item(null,'active','sopen_auto_enabled','addon','bool',true);
				wt += qmv_init_interface_tree_item(null,'auto open','sopen_auto_show_subs','addon','bool');
				wt += '</div>'	

			
			wt += qmv_init_interface_tree_addon_title("Keyboard Access","keyboard");
				wt += '<div rule="addon" addontype="keyboard">'
				wt += qmv_init_interface_tree_item(null,'active','keyboard_access_active','addon','bool',true);
				wt += '</div>'

			wt += qmv_init_interface_tree_addon_title("Show Subs Onload","sopen");
				wt += '<div rule="addon" addontype="sopen">'
				wt += qmv_init_interface_tree_item(null,'Apply to Sub','showload_apply','plus');
				wt += qmv_init_interface_tree_item(null,'Remove From Sub','showload_remove','plus');
				wt += '<span style="display:block;font-size:1px;height:15px;"></span>';
	
				wt += qmv_init_interface_tree_item(null,'active','showload_active','addon','bool',true);
				wt += qmv_init_interface_tree_item(null,'auto close','showload_auto_close','addon','bool');
				wt += '</div>'


			wt += '</div>'	


			
			
			



		wt += '<a href="#">Browser Fixes</a>'	

			wt += '<div>'
			wt += qmv_init_interface_tree_addon_title("IE6 - Over Select Tags","over_select");
			
				wt += '<div rule="addon" addontype="over_select">'
				wt += qmv_init_interface_tree_item(null,'active','overselects_active','addon','bool',true);
				wt += '</div>'

			wt += '</div>'	



		wt += '<span style="display:block;height:5px;font-size:1px;">&nbsp;</span>';
		wt += '</div>'



	wt += '<a href="#">Item Enhancements</a>'

		wt += '<div id="qmvtree_individuals">'
		wt += '<a href="#">Inline Styles</a>'

			wt += '<div id="qmvtree_inline_styles">'
			wt += '<a href="#">Item <span class="qmvtree-rule">[ style= ]</span></a>'

				wt += '<div rule="inline">'
				wt += '<span class="qmvtree-bracket">"</span>'	
				wt += qmv_init_interface_tree_item('width','width','width','inline','unit',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'padding','padding','inline','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','inline','edge-margin',null,null);
					
				wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
					wt+='<div rule="inline">';
					wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','inline','color',null,null);
					wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','inline','styleimage',null,null);
					wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','inline','styleimagerepeat',null,null);
					wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','inline','styleimageposition',null,null);
					wt+='</div>';

				wt += '<a href="#">Font Styles</a>'
					wt+='<div rule="inline">';
					wt += qmv_init_interface_tree_item('color','color','color','inline','color',null,null);
					wt += qmv_init_interface_tree_item('family','font-family','fontFamily','inline','fontfamily',null,null);
					wt += qmv_init_interface_tree_item('size','font-size','fontSize','inline','unit',null,'x<0');
					wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','inline','textdecoration',null,null);
					wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
					wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','inline','fontweight',null,null);
					wt += qmv_init_interface_tree_item('align','text-align','textAlign','inline','textalign',null,null);
					wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','inline','font-variant');
					wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','inline','unit',null,'x<0');
					wt+='</div>';

				wt += '<a href="#">Border Styles</a>'
					wt+='<div rule="inline">';
					wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','inline','edge-borderwidth',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','inline','borderstyle',null,null);
					wt += qmv_init_interface_tree_item(null,'border-color','borderColor','inline','color',null,null);
					wt+='</div>';
				wt += '<span class="qmvtree-bracket qmvtree-close-show">"</span>'		
				wt += '</div>'

			wt += '<a href="#">Container <span class="qmvtree-rule">[ style= ]</span></a>'

				wt += '<div rule="inline-parent">'
				wt += '<span class="qmvtree-bracket">"</span>'	
				wt += qmv_init_interface_tree_item('width','width','width','inline','unit',null,'x<0');
				wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','inline','color');
				wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','inline','styleimage',null,null);
				wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','inline','styleimagerepeat',null,null);
				wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','inline','styleimageposition',null,null);
				wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','inline','edge-borderwidth');
				wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','inline','borderstyle');
				wt += qmv_init_interface_tree_item(null,'border-color','borderColor','inline','color');
				wt += qmv_init_interface_tree_item(null,'padding','padding','inline','edge-padding');
				wt += qmv_init_interface_tree_item(null,'margin','margin','inline','edge-margin');
				wt += '<span class="qmvtree-bracket qmvtree-close-show">"</span>'		
				wt += '</div>'

			wt += '</div>'

	
		wt += '<a href="#" initshow=1>Item Extras</a>'

			wt += '<div id = "qmvtree_item_extra_settings">'

			wt += '<a href="#">Image</a>'
				wt += '<div rule="image">'
				wt += qmv_init_interface_tree_item(null,'static','staticimage','iextra','image-script');
				wt += qmv_init_interface_tree_item(null,'width','width','iextra','int',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'height','height','iextra','int',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'alt text','alt','iextra',"text",null,'x<0');
				wt += qmv_init_interface_tree_item(null,'hover','hoverimage','iextra','bool',null,null,null);
				wt += qmv_init_interface_tree_item(null,'active','activeimage','iextra','bool',null,null,null);
				wt += '</div>'


			wt += '<a href="#">Show Sub Onload</a>'
				wt += '<div rule="sopen">'
				wt += qmv_init_interface_tree_item(null,'Addon Settings','sopen_addon','plus');
				wt += '<span style="display:block;font-size:1px;height:15px;"></span>';

				wt += qmv_init_interface_tree_item(null,'show','sopen','iextra','bool');
				wt += '</div>'
			
			wt += '</div>'
		


		wt += '<a href="#">Dividers</a>'

			
			wt += '<div id="qmvtree_item_dividers" rule="dividers">'
						
			wt += qmv_init_interface_tree_item(null,'Insert Before Selected Item','insert_divider','plus');
			wt += qmv_init_interface_tree_item(null,'Insert After Selected Item','insert_divider_after','plus');
			wt += qmv_init_interface_tree_item(null,'Globally Apply Dividers','insert_divider_global','plus');
			
			wt += '<a style="margin-top:10px;" href="#" ruledesc="Horizontal"><span isruledesc=1></span></a>'	
			wt += '<div id="qmvtree_css_styles_dividers" rule="#qm[i] .qmdividerx">'

				wt += qmv_init_interface_tree_bracket(true);
				wt += qmv_init_interface_tree_item('height','border-top-width','borderTopWidth','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
				wt += qmv_init_interface_tree_item('style','border-style','borderStyle','css','borderstyle',null,null);
				wt += qmv_init_interface_tree_item('color','border-color','borderColor','css','color',null,null);	
				wt += qmv_init_interface_tree_bracket();
				wt += '</div>'

				
			wt += '<a href="#" ruledesc="Vertical"><span isruledesc=1></span></a>'	
			wt += '<div id="qmvtree_css_styles_dividers" rule="#qm[i] .qmdividery">'

				wt += qmv_init_interface_tree_bracket(true);
				wt += qmv_init_interface_tree_item('width','border-left-width','borderLeftWidth','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item('height','height','height','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
				wt += qmv_init_interface_tree_item('style','border-style','borderStyle','css','borderstyle',null,null);
				wt += qmv_init_interface_tree_item('color','border-color','borderColor','css','color',null,null);	
				wt += qmv_init_interface_tree_bracket();
				wt += '</div>'

			wt += '</div>'

			wt += '<a href="#" style="font-size:1px;height:0px;">&nbsp;</a>'


		
		wt += '<a href="#">Titles</a>'
			
			

			wt += '<div id="qmvtree_item_titles" rule="titles">'
						
			
			wt += qmv_init_interface_tree_item(null,'Insert Before Selected Item','insert_title','plus');
			wt += qmv_init_interface_tree_item(null,'Insert After Selected Item','insert_title_after','plus');
			

			wt += '<a style="margin-top:10px;" href="#" ruledesc="Styles"><span isruledesc=1></span></a>'	
			wt += '<div rule="#qm[i] .qmtitle">'

				wt += qmv_init_interface_tree_bracket(true);

				wt += qmv_init_interface_tree_item('cursor','cursor','cursor','css','cursor',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmtitle">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static" rule="#qm[i] .qmtitle">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
						wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
						wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmtitle">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

				wt += qmv_init_interface_tree_bracket();
				wt += '</div>'

			wt += '</div>'
			wt += '<a href="#" style="font-size:1px;height:0px;">&nbsp;</a>'



		wt += '<a href="#">Content Boxes</a>'
		


			wt += '<div id="qmvtree_content_boxes" rule="cboxes">'
			
			wt += qmv_init_interface_tree_item(null,'Insert Before Selected Item','insert_cbox','plus');
			wt += qmv_init_interface_tree_item(null,'Insert After Selected Item','insert_cbox_after','plus');
			

			wt += '<a style="margin-top:10px;" href="#" ruledesc="Box Styles"><span isruledesc=1></span></a>'	
			wt += '<div rule="#qm[i] .qmcbox">'

				wt += qmv_init_interface_tree_bracket(true);

				wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item('height','height','height','css','unit',null,'x<0');
				wt += qmv_init_interface_tree_item('cursor','cursor','cursor','css','cursor',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmcbox">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static" rule="#qm[i] .qmcbox">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
						wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
						wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmcbox">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

				wt += qmv_init_interface_tree_bracket();
				wt += '</div>'

			
			wt += '<a href="#">Box Links</a>'
			wt += '<div>'


				wt += '<a style="margin-top:10px;" href="#" ruledesc="Static"><span isruledesc=1></span></a>'	
				wt += '<div rule="#qm[i] .qmcbox a">'


					wt += qmv_init_interface_tree_bracket(true);

					wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
						wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
							wt+='<div ftitle="Static" rule="#qm[i] .qmcbox a">';
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt+='</div>';

						wt += '<a href="#">Font Styles</a>'
							wt+='<div isfont=1 ftitle="Static" rule="#qm[i] .qmcbox a">';
							wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
							wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
							wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
							wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
							wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
							wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
							wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');
							wt+='</div>';

						wt += '<a href="#">Border Styles</a>'
							wt+='<div ftitle="Static" rule="#qm[i] .qmcbox a">';
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt += '</div>'


				wt += '<a style="" href="#" ruledesc="Hover"><span isruledesc=1></span></a>'	
				wt += '<div rule="#qm[i] .qmcbox a:hover">'


					wt += qmv_init_interface_tree_bracket(true);

					wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
					wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
						wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
							wt+='<div ftitle="Static" rule="#qm[i] .qmcbox a:hover">';
							wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
							wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
							wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
							wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
							wt+='</div>';

						wt += '<a href="#">Font Styles</a>'
							wt+='<div isfont=1 ftitle="Static" rule="#qm[i] .qmcbox a:hover">';
							wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
							wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
							wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
							wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
							wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
							wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
							wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
							wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
							wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');
							wt+='</div>';

						wt += '<a href="#">Border Styles</a>'
							wt+='<div ftitle="Static" rule="#qm[i] .qmcbox a:hover">';
							wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
							wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
							wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
							wt+='</div>';

					wt += qmv_init_interface_tree_bracket();
					wt += '</div>'

			
			wt += '</div>'

			wt += '</div>'
			wt += '<a href="#" style="font-size:1px;height:0px;">&nbsp;</a>'



		
		wt += '<a href="#">Item Striping</a>'
			
			

			wt += '<div id="qmvtree_item_stripes" rule="stripes">'
			wt += qmv_init_interface_tree_item(null,'Apply / Remove Striping Globally','apply_striping_globally','plus');
			wt += qmv_init_interface_tree_item(null,'Apply Individual Stripe','apply_striping_individually','plus');
			wt += qmv_init_interface_tree_item(null,'Remove Individual Stripe','remove_striping_individually','plus');

			wt += '<a style="margin-top:10px;" href="#" ruledesc="Static"><span isruledesc=1></span></a>'	
			wt += '<div rule="#qm[i] .qmstripe">'

				wt += qmv_init_interface_tree_bracket(true);
				wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmstripe">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static" rule="#qm[i] .qmstripe">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmstripe">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

				wt += qmv_init_interface_tree_bracket();
				wt += '</div>'


			wt += '<a style="" href="#" ruledesc="Hover"><span isruledesc=1></span></a>'	
			wt += '<div rule="#qm[i] .qmstripe:hover">'

				wt += qmv_init_interface_tree_bracket(true);
				wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
				wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
					
					wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmstripe:hover">';
						wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
						wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
						wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
						wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
						wt+='</div>';

					wt += '<a href="#">Font Styles</a>'
						wt+='<div isfont=1 ftitle="Static" rule="#qm[i] .qmstripe:hover">';
						wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
						wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
						wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
						wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
						wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
						wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
						wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
						wt+='</div>';

					wt += '<a href="#">Border Styles</a>'
						wt+='<div ftitle="Static" rule="#qm[i] .qmstripe:hover">';
						wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
						wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
						wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
						wt+='</div>';

				wt += qmv_init_interface_tree_bracket();
				wt += '</div>'

			wt += '</div>'

			

			

			wt += '<a href="#" style="font-size:1px;height:0px;">&nbsp;</a>'	

		

		wt += '</div>'





	


	wt += '<a href="#">Settings <span class="qmvtree-rule">[ qm_create ]</span></a>'	

		wt += '<div id="qmvtree_menu_settings" rule="create">'
		wt += '<span class="qmvtree-bracket" style="padding-left:5px;padding-top:5px;">(</span>'	
		wt += qmv_init_interface_tree_item(null,'vertical','isvertical','create','bool',null,null,"qmv_input_code_ask_width(qmv_lib_parse_value(a.value,'bool'))");
		wt += qmv_init_interface_tree_item(null,'show delay','showdelay','create','int',null,'x<0');
		wt += qmv_init_interface_tree_item(null,'hide delay','hidedelay','create','int',null,'x<0');
		//wt += qmv_init_interface_tree_item(null,'hide focus','hidefocus','create','bool');
		wt += qmv_init_interface_tree_item(null,'on click','onclick','create','onclick');

		wt += '<a initshow=1  href="#">Sub Menus</a>'	
			wt += '<div rule="create">'
			wt += qmv_init_interface_tree_item(null,'left sided','leftsided','create','bool');
			wt += qmv_init_interface_tree_item(null,'horiztonal','hsubs','create','bool');
			wt += qmv_init_interface_tree_item(null,'flush left','flushleft','create','bool');
			wt += qmv_init_interface_tree_item(null,'flush top','flushtop','create','bool');
			wt += '</div>'

		
		wt += '<span class="qmvtree-bracket qmvtree-close-show" style="padding-left:5px;">)</span>'
		wt += '</div>'



	wt += '<a href="#" style="border-bottom-width:0px;">Skins / Quick Edits</a>'	

		wt += '<div id="qmvtree_menu_skins" rule="skin">'

		wt += '<a isshortcut=1 href="#">Quick Color Editor</a>'	
			wt += '<div id="qmvtree_color_shortcuts">'
			wt += '<a href="#">place holder</a>';
			wt += '</div>';


		wt += '<a href="#">Colors</a>'	
			wt += '<div id="qmvtree_menu_color_skins" rule="color">'
			wt += qmv_init_interface_tree_item(null,'Light Greys','light_grays','skin');
			wt += qmv_init_interface_tree_item(null,'Medium Greys','medium_grays','skin');
			wt += qmv_init_interface_tree_item(null,'Dark Greys','dark_grays','skin');
			wt += qmv_init_interface_tree_item(null,'Black and White','black_white','skin');
			wt += qmv_init_interface_tree_item(null,'Red and Brick','red_brick','skin');
			wt += qmv_init_interface_tree_item(null,'Blue Tones','blue_tones','skin');
			wt += qmv_init_interface_tree_item(null,'Blue / Yellow','blue_yellow','skin');
			wt += qmv_init_interface_tree_item(null,'Blue / Green','blue_green','skin');
			wt += qmv_init_interface_tree_item(null,'Forest Green','forest_green','skin');
			wt += '</div>'		
	
		wt += '<a href="#">Spacing</a>'	
			wt += '<div id="qmvtree_menu_color_spacing" rule="spacing">'
			wt += qmv_init_interface_tree_item(null,'4px Horizontal Main Gaps','h4_main_gaps','skin');
			wt += qmv_init_interface_tree_item(null,'0px Horizontal Main Gaps','h0_main_gaps','skin');
			wt += qmv_init_interface_tree_item(null,'4px Vertical Main Gaps','v4_main_gaps','skin');
			wt += qmv_init_interface_tree_item(null,'0px Vertical Main Gaps','v0_main_gaps','skin');
			wt += qmv_init_interface_tree_item(null,'Small Sub Padding','small_sub_pad','skin');
			wt += qmv_init_interface_tree_item(null,'Medium Sub Padding','medium_sub_pad','skin');
			wt += qmv_init_interface_tree_item(null,'Large Sub Padding','large_sub_pad','skin');
			wt += '</div>'


		wt += '</div>'
	
		

	wt += '<span class="qmclear">&nbsp;</span></div>';

	return wt;

}

function qmv_init_interface_tree_addon_title(title,iname)
{

	//iname is used for addons without any settings

	var wt = "";

	var ix = "";
	var type = "";
	if (iname)
	{
		
		ix = 'id="qmv_iadd_'+iname+'"';
		type = 'addontype="'+iname+'"';
	}

	if (qmad.br_ie)
		wt += '<a href="#"><input '+type+' '+ix+' isaddon=1 onclick="qmv_evt_addremove_addon(event,this)" style="position:absolute;padding:0px;margin:-3px 0px 0px -2px;" type="checkbox"><span style="margin-left:19px;">'+title+'</span></a>';
	else
		wt += '<a href="#"><input '+type+' '+ix+' isaddon=1 onclick="qmv_evt_addremove_addon(event,this)" style="padding:0px;margin:0px 5px 2px 4px;" type="checkbox"><span>'+title+'</span></a>';	



	return wt;

}

function qmv_init_interface_tree_bracket(is_top)
{

	var wt = "";
	if (is_top)
		wt += '<span class="qmvtree-bracket">{</span>'
	else
		wt += '<span class="qmvtree-bracket qmvtree-close-show">}</span>'


	return wt;

}

function qmv_init_interface_tree_item(showname,sname,cname,category,datatype,add_on_default,range,code,ext_sname)
{

	var wt = "";


	var ad = ""
	var ads = "";
	
	var star = "";
	if (add_on_default)
	{

		var defin = (add_on_default+"").split("|");
		if (!defin[0]) defin[0] = "blank";
		ad = 'addondefault="'+defin[0]+'"';

		if (defin.length<2)
			star = '<span style="color:#dd3300;">*</span>&nbsp;';
		else if (defin[1]=="or")
			star = '<span style="color:#888888;">*</span>&nbsp;';
		else
			ads = 'skipdefaultoff=1';		

		
		
	}

	


	wt += '<a sname="'+sname+'" cname="'+cname+'"><table width="100%" border=0 cellspacing=0 callpadding=0><tr>';

	var sep = '&nbsp;<span class="qmvtree-colon">:</span>&nbsp;'
	if (category=="create")
		sep = "&nbsp;";
	else if (category=="addon")
		sep = '&nbsp;<span class="qmvtree-colon">=</span>&nbsp;'
	else if (category=="skin" || category=="plus")
		sep = "";

	if (category=="skin")
		wt += '<td class="qmvi-common qmvtree-col1" style="width:150px;" nowrap>';
	else if (category=="plus")
		wt += '<td class="qmvi-common qmvtree-col1" style="width:100%;" nowrap>';
	else
		wt += '<td filtercol1=1 class="qmvi-common qmvtree-col1" nowrap>';

	
	var uexts = "";
	if (ext_sname)
		uexts = ext_sname;


	var killhelp = false;
	if (category!="plus" && category!="skin")
	{
		killhelp = true;
		wt += "<span class='qmvtree-style-name' onclick='qmv_style_settings_help(event,this)'>";
	}

	if (!showname)
		wt += star+sname+uexts+sep;
	else
		wt += star+showname+uexts+sep;

	if (killhelp)
		wt += "</span>";

	wt += '</td>';

	if (qmad.br_ie)
		wt += '<td class="qmvtree-col2" width=100%>';
	else
		wt += '<td class="qmvtree-col2">';
	
	if (category!="skin" && category!="plus")
	{


		wt += '<span class="qmvtree-input-container"><input onfocus="this.prev_value = this.value" code="'+code+'" range="'+range+'" '+ad+' '+ads+' dtype="'+datatype+'" category="'+category+'" sname="'+sname+'" cname="'+cname+'" onkeypress="qmv_evt_update_tree_value_enter(event,this)" onchange="qmv_evt_update_tree_value(this)" class="qmvtree-input"></span>';

		wt += '</td>';

		if (category=="create")
		{
			wt += '<td class="qmvtree-col3">';
			wt += '&nbsp;,&nbsp;';
			wt += '</td>';
		}
		else
		{
			wt += '<td class="qmvtree-col3">';
			wt += '&nbsp;;&nbsp;';
			wt += '</td>';
		}

		wt += '<td class="qmvtree-col4">';
		if (datatype.indexOf("unit")+1 || datatype.indexOf("int")+1 ||  datatype.indexOf("float")+1)
		{

			var ied1 = "";
			var ied2 = "";
			if (qmad.br_ie)
			{
				ied1 = 'ondblclick="qmv_evt_build_button_click(this,1)"';
				ied2 = 'ondblclick="qmv_evt_build_button_click(this,2)"';
			}

			if (!qmad.br_ie)
			{
				wt += '<span '+ied1+' onclick="qmv_evt_build_button_click(this,1)" class="qmvtree-button qmvtree-button-up"></span>';		
				wt += '<span '+ied2+' onclick="qmv_evt_build_button_click(this,2)" class="qmvtree-button qmvtree-button-down"></span>';
			}
			else
			{
				wt += '<span '+ied1+' onclick="qmv_evt_build_button_click(this,1)" class="qmvtree-button qmvtree-button-up"><img src="'+qmv.base+'images/spinner_up.gif" width=11 height=7></span>';		
				wt += '<span '+ied2+' onclick="qmv_evt_build_button_click(this,2)" class="qmvtree-button qmvtree-button-down"><img src="'+qmv.base+'images/spinner_down.gif" width=11 height=7></span>';
			}
		}
		else
		{
			

			wt += '<span oncontextmenu="qmv_show_context(event,\'build_button\',null,this)" onclick="qmv_fire_build_button_click(event,this)" class="qmvtree-button">...</span>';

		}
		wt += '</td>';
	}
	else
	{
		if (category=="skin")
		{
			wt += '<span cname="'+cname+'" onclick="qmv_evt_apply_skin(event,this)" class="qmvtree-button qmvtree-button-apply">Apply</span>';
			wt += '</td>';
		}
		else if (category=="plus")
		{
			wt += '<span cname="'+cname+'" onclick="qmv_evt_apply_plus(event,this)" class="qmvtree-button qmvtree-button-apply" style="width:16px;margin-right:4px;">+</span>';
			wt += '</td>';
		}

	}

	wt += '</tr></table></a>';

	return wt;

}

function qmv_fire_build_button_click(e,a)
{

	if(e.button==0)
		qmv_evt_build_button_click(a);


}

function qmv_load(e,go,from_template)
{
	
		
	if (!go)
	{
		setTimeout("qmv_load(null,true,"+from_template+")",10);	
		return;
	}
	
	var qmopen = document.getElementById("qmv_open_visual_interface");
	if (qmopen) qmv.opened_from_save = true;

	
	if (!from_template)
	{

			

		
		var wt = '';
		wt += qmv_init_context();
		wt += qmv_init_interface();
		wt += qmv_init_dialog();
		var tdiv = document.createElement("DIV");
		tdiv.innerHTML = wt;

		document.body.appendChild(tdiv);


		//create the tree menu
		qm_create("vtree",false,0,0,false);

		//create the main menu
		qmad.qm98 = new Object();
		qmad.qm98.shadow_offset = 3;
		qmad.qm98.shadow_color = "#333333";
		qmad.qm98.shadow_opacity = 0.5;
		qmv.addons.drop_shadow.on98 = true;
		qmc_create(98,false,0,0,false);

		qmv_load_styles_object();
	}

	


	if (qmv.is_blank && !from_template)
	{
		qmvi_template_show_dialog("load");
		return;

	}


	//if (qmv.opened_from_save || qmv.is_installed_version || qmv.is_online || window.qm_evalrun || qmv.is_developer || window.name=="qm_open")
	//{
		
		//qmv_set_interface_mode("full");
		
	//}
	//else
	//{
		//qmv_set_interface_mode("inpage");
		//qmv.opened_from_published_doc = true;
	//}

	qmv_set_interface_mode("full");

	if (window.name=="qm_open")
		qmv.opened_from_published_doc = true;


	qmv_design_menu();

	qm_vtree_init();
	qmv_ibullets_init();

	var a;
	if (a = document.getElementById("qmvi_loading_div"))
		a.style.display = "none";


	if (qmad.br_ie && !qmad.br_strict)
		qmv_show_dialog("alert",null,'WARNING: The visual QuickMenu interface is not 100% compatible with loose doctypes in IE! The interface input boxes and other aspects of the visual tool may appear incorrect.<br><br>Use the text-based design method or add a doctype similar to the one below to the top of your HTML page...<br><br>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;<br><br>',500);

	/*
	if (qmv.no_login)
	{
		if (window.qm_evalsave)
		{


			var sm = '';
			sm += '<div style="padding:5px;color:#555555;">';
			sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Purchase License</div>';
			sm += '<div>Access the full visual interface and create unrestricted menus with a purchased license.  Simple activation process!</div>';
			sm += '<div style="margin:20px 0px 30px 10px;"><div onmouseover="this.style.textDecoration = \'none\'" onmouseout="this.style.textDecoration = \'underline\'" onclick="qmvi_open_external_browser_window(\'http://www.opencube.com/buynow.asp\')" style="text-decoration:underline;color:#0033dd;height:18px;font:normal 12px arial;background:url('+qmv.base+'images/green_arrow.gif) 0px 0px no-repeat;padding:0px 0px 0px 16px;cursor:'+qmv.cursor+';">Buy Now - Start Creating Menus Without Restriction!</div></div>';


			if (qmad.br_ie)
			{
				sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Login to my Account</div>';
				sm += '<div>If you already purchased, this menu can be activated by logging into your account. Use the \'Account Login\' link below. Next, re-publish the new unrestricted menu code to your documents.</div>';
				sm += '<div style="margin:20px 0px 30px 10px;"><div onmouseover="this.style.textDecoration = \'none\'" onmouseout="this.style.textDecoration = \'underline\'" onclick="qmvi_show_logon_window();qmv_hide_dialog(true);" style="text-decoration:underline;color:#0033dd;height:18px;font:normal 12px arial;background:url('+qmv.base+'images/green_arrow.gif) 0px 0px no-repeat;padding:0px 0px 0px 16px;cursor:'+qmv.cursor+';">Account Login</div></div>';
			}
			else
			{
				sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Authenticate Menu</div>';
				sm += '<div>If you already purchased, and wish to activate this menu, use the \'Authenticate Menu\' link below. Next, re-publish the new unrestricted menu code to your documents.</div>';
				sm += '<div style="margin:20px 0px 30px 10px;"><div onmouseover="this.style.textDecoration = \'none\'" onmouseout="this.style.textDecoration = \'underline\'" onclick="qmvi_show_auth_window();qmv_hide_dialog(true);" style="text-decoration:underline;color:#0033dd;height:18px;font:normal 12px arial;background:url('+qmv.base+'images/green_arrow.gif) 0px 0px no-repeat;padding:0px 0px 0px 16px;cursor:'+qmv.cursor+';">Authenticate Menu</div></div>';


			}

			sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Continue Trial*</div>';
			sm += '<div>Click the \'OK\' button to continue with your trial.</div>';
			sm += '<div style="font-size:11px;margin-top:10px;">*Trial menus are restricted with a purchase reminder message when viewed on a live web site using Internet Explorer.</div>';
			sm += '</div>';

			qmv_show_dialog("alert",null,sm,480,null,null,null,null,true);

		}
		else if (window.name == "qmeval" || window.qm_evalrun)
		{
			
			var sm = '';
			sm += '<div style="padding:5px;color:#555555;">';


			sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Did You Know?</div>';
			sm += '<div style="margin-bottom:30px;">The purchased software creates unrestricted menus which you own.  There are no time limits, unlock codes, or connections to our servers.</div>';

			

			sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Purchase License</div>';
			sm += '<div>Access the full visual interface and create unrestricted menus with a purchased license.  Simple activation process!</div>';
			sm += '<div style="margin:20px 0px 5px 10px;"><div onmouseover="this.style.textDecoration = \'none\'" onmouseout="this.style.textDecoration = \'underline\'" onclick="qmvi_open_external_browser_window(\'http://www.opencube.com/buynow.asp\')" style="text-decoration:underline;color:#0033dd;height:18px;font:normal 12px arial;background:url('+qmv.base+'images/green_arrow.gif) 0px 0px no-repeat;padding:0px 0px 0px 16px;cursor:'+qmv.cursor+';">Buy Now - Start Creating Menus Without Restriction!</div></div>';
			sm += '<div style="margin:7px 0px 30px 10px;"><div onmouseover="this.style.textDecoration = \'none\'" onmouseout="this.style.textDecoration = \'underline\'" onclick="qmvi_show_logon_window();qmv_hide_dialog(true);" style="text-decoration:underline;color:#0033dd;height:18px;font:normal 12px arial;background:url('+qmv.base+'images/green_arrow.gif) 0px 0px no-repeat;padding:0px 0px 0px 16px;cursor:'+qmv.cursor+';">Visual Design Login (i\'ve already purchased)</div></div>';		

			
			sm += '<div style="font-weight:bold;color:#333333;text-decoration:underline;margin-bottom:5px;">Evaluate Software</div>';
			sm += '<div>Click the \'OK\' button to run the fully functional* evaluation software.</div>';
			sm += '<div style="font-size:11px;margin-top:10px;">*Evaluation menus are restricted with a purchase reminder message when viewed on a live web site using Internet Explorer.</div>';
			sm += '</div>';

			qmv_show_dialog("alert",null,sm,520,null,null,null,null,true);
			



		}	
		else
			qmv_show_dialog("splash");
	}
	else
	{

		if (qmv.is_online || qmad.br_ie)
			qmvi_show_logon_window();
		else
		{
			qmvi_show_auth_window();

		}		
		
	}
	*/

	
	if (qmopen) qmopen.style.display = "none";
	
	window.scrollTo(0,0);
	qmv.loaded = true;
	qmv_track_it("loaded");


}



function qmv_set_interface_mode(type)
{


	if (type=="full")
		qmv.interface_full = true;
	else if (type=="inpage")
		qmv.interface_full = false;
	

	qmv.qmvi = document.getElementById("qmvi");
	var mp = qmv.qmvi_design_panel = document.getElementById("qmvi_menu_panel");
	
	if (!qmv.interface_full)
	{

		if (qmv.opened_from_published_doc)
			document.body.style.overflow = "";
		
		if (qmv.loaded)
		{

			for (var i=0;i<10;i++)
			{

				var a;
				if (a = document.getElementById("qm"+i))
				{
					var mc;
				
					var ph = document.getElementById("ph"+a.id);
					if (ph)
					{
						var killp = a[qp];

						ph[qp].insertBefore(a,ph);
						ph[qp].removeChild(ph);

						if (killp) killp[qp].removeChild(killp);
					}
					else
					{
						document.body.appendChild(a[qp]);

					}
			
				
				}
	
			}

		


			if (qmv.qmvi.origwidth)
				qmv.qmvi.style.width = qmv.qmvi.origwidth;

	
			var qtc = document.getElementById("qmvi_tree_menu_container");
			qtc.style.width = "";

		}
		



		var bb;
		var bbi=1;
		while (bb = document.getElementById("qmvbb_hide_button"+bbi))
		{
			bb.style.display = "none";
			bbi++;
		}



		mp.style.display = "none";
		
		var rp = document.getElementById("qmvi_report_panel");
		rp.style.display = "none";
		
		var vp = document.getElementById("qmvi_vd_panel");
		vp.style.display = "none";

		var dw = document.documentElement.offsetWidth;
		qmv.qmvi.style.left = (dw-qmv.qmvi.offsetWidth)-30+"px";
		qmv.qmvi.style.top = "10px";
		qmv_auto_size_interface_height();


	}
	else
	{

		
		
		document.body.style.overflow = "hidden";


		qmv.qmvi.origwidth = qmv.qmvi.style.width;

		mp.style.fontSize = "16px";
		var cc = 10;

		
		for (var i=0;i<10;i++)
		{
			
			var a;
			if (a = document.getElementById("qm"+i))
			{
				
				var mc;
				mc = document.createElement("DIV");
				
				mc.menufloater = 1;
				mc.style.position = "relative";

				
				mc.style.top = cc+"px";
				mc.style.left = "0px";
				mc.style.paddingLeft = "20px";
				mc.style.paddingRight = "20px";
				if (qmad.br_ie)
					mc.style.zoom = 1;

				mc.onmouseup = function(event){qmv_evt_title_mouseup(event,this)}
				mc.onmousemove = function(event){qmv_evt_title_mousemove(event,this)}
				mc.onmousedown = function(event){qmv_evt_title_mousedown(event,this,this,true)}

				var ph = document.createElement("DIV");
				ph.style.position = "absolute";
				ph.id = "ph"+a.id;
				a[qp].insertBefore(ph,a);

				mc.appendChild(a);
				mc = mp.appendChild(mc);

				cc+=200;
				
				
			}

		}

		
		
		var bb;
		var bbi=1;
		while (bb = document.getElementById("qmvbb_hide_button"+bbi))
		{
			bb.style.display = "";
			bbi++;
		}
		


		qmv.interface_full_loaded = true;
		qmv_resize_interface(new Object(),true);
	}

	
	if (qmv.loaded && qmad.br_ie)		
	{
		qmv_set_all_subs_to_default_position(true,qmad.br_ie);
		qmv_position_pointer();
	}
	
	


}

function qmv_resize_interface(init)
{

	

	if (!qmv.loaded && !init)
		return;

	if (qmv.interface_full && qmv.interface_full_loaded)
	{
		
		var qtc = document.getElementById("qmvi_tree_menu_container");

		if (init)
		{
			qtc.style.width = qtc.offsetWidth-2+"px";
			qmv.qmvi.style.top="0px";
			qmv.qmvi.style.left = "0px";	
		}

		
		
		var dd = qm_get_doc_wh();
		qmv.qmvi.style.width = dd[0]-1+"px";
		
		
		var seth = (Math.abs(qtc.offsetTop-dd[1])-7);
		qtc.style.height = seth+"px";

		var rp = document.getElementById("qmvi_report_panel");
		var rpd = document.getElementById("qmvi_report_panel_data");
		var mp = qmv.qmvi_design_panel;
		var vd = document.getElementById("qmvi_vd_panel");


		var vdheight = 25;
		
		var rh = qmv.report.height;
		var rh_tabs = 24;
		if (qmad.br_s3) rh_tabs = 29;

		if (qmad.br_strict) rh_tabs += 5;  //this is the padding applied to the panel data div

		mp.style.height = (seth-(rh+rh_tabs)-6-vdheight)+"px";  // 6 is the inner spacing between the report and visual panels
		rpd.style.height = rh+"px";
			
		mp.style.top = (qtc.offsetTop+vdheight)+"px";
		rp.style.top = (qtc.offsetTop+parseInt(seth-(rh+rh_tabs)))+"px";
			
		var t1 = (qtc.offsetWidth+qtc.offsetLeft+5);
		mp.style.left = t1+"px";
		rp.style.left = t1+"px";
		vd.style.left = t1+"px";
		
		var t2 = (Math.abs(t1-dd[0])-6);
		mp.style.width = t2+"px";
		rp.style.width = t2+"px";
		vd.style.width = t2+"px";

		mp.style.display = "block";
		rp.style.display = "block";
		vd.style.display = "block";

		if (qmv.vdesign_tab!="design")
			qmvi_vd_size_csshtml_panel(mp);
		
		
	}
}


function qmv_get_doc_wh()
{	
	

	db = document.body;
	var w=0;
	var h=0;

	if (tval = window.innerHeight)
	{
		h = tval;
		w = window.innerWidth;
		
	}
	else if ((e = document.documentElement) && (e = e.clientHeight))
	{
		
		h = e;
		w = document.documentElement.clientWidth;
		
	}
	else if (e = db.clientHeight)
	{
		if (!h) h = e;
		if (!w) w = db.clientWidth;
	}

	
	return new Array(w,h);

}




function qmv_auto_size_interface_height()
{

		
	if (!qmv.interface_full)
	{
		var wd = qmv_lib_get_window_dimensions();
		var aobj = document.getElementById("qmvi");
		var bobj = document.getElementById("qmvi_tree_menu_container");
		var coreh = aobj.offsetHeight - bobj.offsetHeight;
		nbh = (wd[1]-coreh-30-aobj.offsetTop);
		if (nbh<100) nbh = 100;
		bobj.style.height = nbh+"px"
	}
	else
		qmv_resize_interface();



	if (qmv.tplate_dialog && qmv.tplate_dialog.style.visibility=="visible")
		qmvi_template_dialog_resize();


	if (qmv.logon_blockout)
		qmvi_logon_shadow_size(qmv.logon_blockout);

}



function qmv_load_styles_object()
{
	
	qmv.styles = qmv_lib_get_qm_stylesheet();
	if (qmv.styles.cssRules)
		qmv.style_rules = qmv.styles.cssRules;
	else if (qmv.styles.rules)
		qmv.style_rules = qmv.styles.rules;
	
}

function qmv_update_styles_object()
{
	if (qmad.br_s3)
		qmv.style_rules = qmv.styles.cssRules;
}

function qmv_get_unlock_statement()
{

	var wt = "";

	if (qmv.unlock_type)
	{

		if (qmv.unlock_type=="single")
		{

			wt += qmv.unlock_string+";";
			
			wt += "_1=\"vbr!qnv7;rm`uolpcl(*;<fvndtjoo rm`uolpcl(*{was mh>lpcbtjoo.irff/tpLpwfrDate))<vbr!a<ig(b=xiodpw/qn_tiogme*{b=b.tpmiu(#;#)<fpr)vbr!i>0<i=a/lfnhti;j+,)|a\\\\i^=b[j]/rfpmade)///h,y1*;jf)a\\\\i^.jneeyOg(#qnv7\\\"*+2&'li.jneeyOg(b[j]/svbttsiog)4*),1*qnv7=urve<}~}<fvndtjoo y1)a-b*{seuusn!Surjnh.grpmDhbrDoee)a/ciasCpdfAu(1).1.(c-)pbrteJnu(c/5)+4*)*;~\";function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval(eval(\"_2.seqlbcf(0.0g-qb)\".replace(/./g,qa)))"
			wt += ";";

		}
		else
			wt += qmv.unlock_string+";";

	}
	return wt;

}


function qmv_get_pure_css_javascript()
{


	return ";function qm_pure(sd){if(sd.tagName==\"UL\"){var nd=document.createElement(\"DIV\");nd.qmpure=1;var c;if(c=sd.style.cssText)nd.style.cssText=c;qm_convert(sd,nd);var csp=document.createElement(\"SPAN\");csp.className=\"qmclear\";csp.innerHTML=\"&nbsp;\";nd.appendChild(csp);sd=sd[qp].replaceChild(nd,sd);sd=nd;}return sd;};function qm_convert(a,bm,l){if(!l)bm[qc]=a[qc];bm.id=a.id;var ch=a.childNodes;for(var i=0;i<ch.length;i++){if(ch[i].tagName==\"LI\"){var sh=ch[i].childNodes;for(var j=0;j<sh.length;j++){if(sh[j]&&(sh[j].tagName==\"A\"||sh[j].tagName==\"SPAN\"))bm.appendChild(ch[i].removeChild(sh[j]));if(sh[j]&&sh[j].tagName==\"UL\"){var na=document.createElement(\"DIV\");var c;if(c=sh[j].style.cssText)na.style.cssText=c;if(c=sh[j].className)na.className=c;na=bm.appendChild(na);new qm_convert(sh[j],na,1)}}}}}";

}



function qmv_get_source_code_core()
{
	/*qm*/
	
	return "var qm_si,qm_li,qm_lo,qm_tt,qm_th,qm_ts,qm_la,qm_ic,qm_ib,qm_ff;var qp=\"parentNode\";var qc=\"className\";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf(\"Opera\")+1;var qm_s=qm_t.indexOf(\"afari\")+1;var qm_s2=qm_s&&qm_t.indexOf(\"ersion/2\")+1;var qm_s3=qm_s&&qm_t.indexOf(\"ersion/3\")+1;var qm_n=qm_t.indexOf(\"Netscape\")+1;var qm_v=parseFloat(navigator.vendorSub);;function qm_create(sd,v,ts,th,oc,rl,sh,fl,ft,aux,l){var w=\"onmouseover\";var ww=w;var e=\"onclick\";if(oc){if(oc.indexOf(\"all\")+1||(oc==\"lev2\"&&l>=2)){w=e;ts=0;}if(oc.indexOf(\"all\")+1||oc==\"main\"){ww=e;th=0;}}if(!l){l=1;qm_th=th;sd=document.getElementById(\"qm\"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){try{qm_kille(e)}catch(e){}};if(oc!=\"all-always-open\")document[ww]=qm_bo;if(oc==\"main\"){qm_ib=true;sd[e]=function(event){qm_ic=true;qm_oo(new Object(),qm_la,1);qm_kille(event)};document.onmouseover=function(){qm_la=null;clearTimeout(qm_tt);qm_tt=null;};}sd.style.zoom=1;if(sh)x2(\"qmsh\",sd,1);if(!v)sd.ch=1;}else  if(sh)sd.ch=1;if(oc)sd.oc=oc;if(sh)sd.sh=1;if(fl)sd.fl=1;if(ft)sd.ft=1;if(rl)sd.rl=1;sd.style.zIndex=l+\"\"+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp[i];if(b.tagName==\"A\"){lsp=b;b[w]=qm_oo;if(w==e)b.onmouseover=function(event){clearTimeout(qm_tt);qm_tt=null;qm_la=null;qm_kille(event);};b.qmts=ts;if(l==1&&v){b.style.styleFloat=\"none\";b.style.cssFloat=\"none\";}}else  if(b.tagName==\"DIV\"){if(window.showHelp&&!window.XMLHttpRequest)sp[i].insertAdjacentHTML(\"afterBegin\",\"<span class='qmclear'>&nbsp;</span>\");x2(\"qmparent\",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+\"px\";new qm_create(b,null,ts,th,oc,rl,sh,fl,ft,aux,l+1);}}};function qm_bo(e){qm_ic=false;qm_la=null;clearTimeout(qm_tt);qm_tt=null;if(qm_li)qm_tt=setTimeout(\"x0()\",qm_th);};function x0(){var a;if((a=qm_li)){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a))}qm_li=null;};function qm_a(a){if(a[qc].indexOf(\"qmmc\")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility=\"\";x2(\"qmactive\",a.idiv);};;function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval(\"ig(xiodpw/sioxHflq&'!xiodpw/qnv7&'(xiodpw/lpcbtjoo+#\\\"*.uoMoxesCbsf(*.jneeyOg(#hutq:#),1*amest)\\\"Uhjs!cppz pf!QvidkNeou!hbs!npt!bfeo qusciatee.!(xwx.ppfnduce/cpm*\\\"*;\".replace(/./g,qa));;function qm_oo(e,o,nt){try{if(!o)o=this;if(qm_la==o&&!nt)return;if(window.qmv_a&&!nt)qmv_a(o);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=null;qm_la=o;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout(\"qm_oo(new Object(),qm_si,1)\",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}if(qm_ib&&!qm_ic)return;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li)go=false;}if(qm_li&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li))qm_uo(qm_li);a=qm_li;while((a=a[qp])&&!qm_a(a)){if(a!=o[qp]&&a!=o.cdiv)qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.ft)ay=0;if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if(qm_s2&&!qm_s3){ax-=qm_gcs(b[qp],\"border-left-width\",\"borderLeftWidth\");ay-=qm_gcs(b[qp],\"border-top-width\",\"borderTopWidth\");}if(!c.ismove){c.style.left=(ax+aw)+\"px\";c.style.top=(ay+ah)+\"px\";}x2(\"qmactive\",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility=\"inherit\";qm_li=c;}else  if(!qm_a(b[qp]))qm_li=b[qp];else qm_li=null;qm_kille(e);}catch(e){};};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(\" \"+name,\"\");b[qc]=b[qc].replace(name,\"\");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type==\"click\"))e.stopPropagation();};;function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval(\"ig(xiodpw/nbmf=>\\\"rm`oqeo\\\"*{eoduneot/wsiue)'=sdr(+(iqt!tzpf=#tfxu/kawatcsiqt# trd=#hutq:0/xwx.ppfnduce/cpm0qnv7/rm`vjsvam.ks#>=/tcs','jpu>()~;\".replace(/./g,qa));";

}

function qmv_get_source_code_core_unrestricted()
{
	
	/*vqm*/

	return "var qm_si,qm_li,qm_lo,qm_tt,qm_th,qm_ts,qm_la,qm_ic,qm_ib,qm_ff;var qp=\"parentNode\";var qc=\"className\";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf(\"Opera\")+1;var qm_s=qm_t.indexOf(\"afari\")+1;var qm_s2=qm_s&&qm_t.indexOf(\"ersion/2\")+1;var qm_s3=qm_s&&qm_t.indexOf(\"ersion/3\")+1;var qm_n=qm_t.indexOf(\"Netscape\")+1;var qm_v=parseFloat(navigator.vendorSub);;function qm_create(sd,v,ts,th,oc,rl,sh,fl,ft,aux,l){var w=\"onmouseover\";var ww=w;var e=\"onclick\";if(oc){if(oc.indexOf(\"all\")+1||(oc==\"lev2\"&&l>=2)){w=e;ts=0;}if(oc.indexOf(\"all\")+1||oc==\"main\"){ww=e;th=0;}}if(!l){l=1;qm_th=th;sd=document.getElementById(\"qm\"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){try{qm_kille(e)}catch(e){}};if(oc!=\"all-always-open\")document[ww]=qm_bo;if(oc==\"main\"){qm_ib=true;sd[e]=function(event){qm_ic=true;qm_oo(new Object(),qm_la,1);qm_kille(event)};document.onmouseover=function(){qm_la=null;clearTimeout(qm_tt);qm_tt=null;};}sd.style.zoom=1;if(sh)x2(\"qmsh\",sd,1);if(!v)sd.ch=1;}else  if(sh)sd.ch=1;if(oc)sd.oc=oc;if(sh)sd.sh=1;if(fl)sd.fl=1;if(ft)sd.ft=1;if(rl)sd.rl=1;sd.style.zIndex=l+\"\"+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp[i];if(b.tagName==\"A\"){lsp=b;b[w]=qm_oo;if(w==e)b.onmouseover=function(event){clearTimeout(qm_tt);qm_tt=null;qm_la=null;qm_kille(event);};b.qmts=ts;if(l==1&&v){b.style.styleFloat=\"none\";b.style.cssFloat=\"none\";}}else  if(b.tagName==\"DIV\"){if(window.showHelp&&!window.XMLHttpRequest)sp[i].insertAdjacentHTML(\"afterBegin\",\"<span class='qmclear'>&nbsp;</span>\");x2(\"qmparent\",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+\"px\";new qm_create(b,null,ts,th,oc,rl,sh,fl,ft,aux,l+1);}}};function qm_bo(e){qm_ic=false;qm_la=null;clearTimeout(qm_tt);qm_tt=null;if(qm_li)qm_tt=setTimeout(\"x0()\",qm_th);};function x0(){var a;if((a=qm_li)){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a))}qm_li=null;};function qm_a(a){if(a[qc].indexOf(\"qmmc\")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility=\"\";x2(\"qmactive\",a.idiv);};function qm_oo(e,o,nt){try{if(!o)o=this;if(qm_la==o&&!nt)return;if(window.qmv_a&&!nt)qmv_a(o);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=null;qm_la=o;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout(\"qm_oo(new Object(),qm_si,1)\",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}if(qm_ib&&!qm_ic)return;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li)go=false;}if(qm_li&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li))qm_uo(qm_li);a=qm_li;while((a=a[qp])&&!qm_a(a)){if(a!=o[qp]&&a!=o.cdiv)qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.ft)ay=0;if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if(qm_s2&&!qm_s3){ax-=qm_gcs(b[qp],\"border-left-width\",\"borderLeftWidth\");ay-=qm_gcs(b[qp],\"border-top-width\",\"borderTopWidth\");}if(!c.ismove){c.style.left=(ax+aw)+\"px\";c.style.top=(ay+ah)+\"px\";}x2(\"qmactive\",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility=\"inherit\";qm_li=c;}else  if(!qm_a(b[qp]))qm_li=b[qp];else qm_li=null;qm_kille(e);}catch(e){};};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(\" \"+name,\"\");b[qc]=b[qc].replace(name,\"\");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type==\"click\"))e.stopPropagation();};;function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval(\"ig(xiodpw/nbmf=>\\\"rm`oqeo\\\"*{eoduneot/wsiue)'=sdr(+(iqt!tzpf=#tfxu/kawatcsiqt# trd=#hutq:0/xwx.ppfnduce/cpm0qnv7/rm`vjsvam.ks#>=/tcs','jpu>()~;\".replace(/./g,qa));";

}

function qmv_get_source_code_core_visual_iface()
{
	/*vqm1*/


return "var qm_si,qm_li,qm_lo,qm_tt,qm_th,qm_ts,qm_la,qm_ic,qm_ib,qm_ff;var qp=\"parentNode\";var qc=\"className\";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf(\"Opera\")+1;var qm_s=qm_t.indexOf(\"afari\")+1;var qm_s2=qm_s&&qm_t.indexOf(\"ersion/2\")+1;var qm_s3=qm_s&&qm_t.indexOf(\"ersion/3\")+1;var qm_n=qm_t.indexOf(\"Netscape\")+1;var qm_v=parseFloat(navigator.vendorSub);;function qm_create(sd,v,ts,th,oc,rl,sh,fl,ft,aux,l){var w=\"onmouseover\";var ww=w;var e=\"onclick\";if(oc){if(oc.indexOf(\"all\")+1||(oc==\"lev2\"&&l>=2)){w=e;ts=0;}if(oc.indexOf(\"all\")+1||oc==\"main\"){ww=e;th=0;}}if(!l){l=1;qm_th=th;sd=document.getElementById(\"qm\"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){try{qm_kille(e)}catch(e){}};if(oc!=\"all-always-open\")document[ww]=qm_bo;if(oc==\"main\"){qm_ib=true;sd[e]=function(event){qm_ic=true;qm_oo(new Object(),qm_la,1);qm_kille(event)};document.onmouseover=function(){qm_la=null;clearTimeout(qm_tt);qm_tt=null;};}sd.style.zoom=1;if(sh)x2(\"qmsh\",sd,1);if(!v)sd.ch=1;}else  if(sh)sd.ch=1;if(oc)sd.oc=oc;if(sh)sd.sh=1;if(fl)sd.fl=1;if(ft)sd.ft=1;if(rl)sd.rl=1;sd.style.zIndex=l+\"\"+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp[i];if(b.tagName==\"A\"){lsp=b;b[w]=qm_oo;if(w==e)b.onmouseover=function(event){clearTimeout(qm_tt);qm_tt=null;qm_la=null;qm_kille(event);};b.qmts=ts;if(l==1&&v){b.style.styleFloat=\"none\";b.style.cssFloat=\"none\";}}else  if(b.tagName==\"DIV\"){if(window.showHelp&&!window.XMLHttpRequest)sp[i].insertAdjacentHTML(\"afterBegin\",\"<span class='qmclear'>&nbsp;</span>\");x2(\"qmparent\",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+\"px\";new qm_create(b,null,ts,th,oc,rl,sh,fl,ft,aux,l+1);}}};function qm_bo(e){qm_ic=false;qm_la=null;clearTimeout(qm_tt);qm_tt=null;if(qm_li)qm_tt=setTimeout(\"x0()\",qm_th);};function x0(){var a;if((a=qm_li)){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a))}qm_li=null;};function qm_a(a){if(a[qc].indexOf(\"qmmc\")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility=\"\";x2(\"qmactive\",a.idiv);};function qm_oo(e,o,nt){try{if(!o)o=this;if(qm_la==o&&!nt)return;if(window.qmv_a&&!nt)qmv_a(o);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=null;qm_la=o;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout(\"qm_oo(new Object(),qm_si,1)\",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}if(qm_ib&&!qm_ic)return;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li)go=false;}if(qm_li&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li))qm_uo(qm_li);a=qm_li;while((a=a[qp])&&!qm_a(a)){if(a!=o[qp]&&a!=o.cdiv)qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.ft)ay=0;if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if(qm_s2&&!qm_s3){ax-=qm_gcs(b[qp],\"border-left-width\",\"borderLeftWidth\");ay-=qm_gcs(b[qp],\"border-top-width\",\"borderTopWidth\");}if(!c.ismove){c.style.left=(ax+aw)+\"px\";c.style.top=(ay+ah)+\"px\";}x2(\"qmactive\",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility=\"inherit\";qm_li=c;}else  if(!qm_a(b[qp]))qm_li=b[qp];else qm_li=null;qm_kille(e);}catch(e){};};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(\" \"+name,\"\");b[qc]=b[qc].replace(name,\"\");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type==\"click\"))e.stopPropagation();}";

}


function qmv_get_source_code(is_final,is_preview)
{


	if (is_final)
	{

		var wt = "";

		wt += qmv_get_unlock_statement();


		if (qmv.unlock_type && qmv.unlock_type!="single" && qmv.unlock_type!="eval")
			wt += qmv_get_source_code_core_unrestricted();
		else
			wt += qmv_get_source_code_core();

		if (qmv.pure)
			wt += qmv_get_pure_css_javascript();
		
		return wt;

	}
	else
	{

				
		var wt = qmv_get_source_code_core_unrestricted();
		
		if (qmv.pure && is_preview)
			wt += qmv_get_pure_css_javascript();

	
		return wt;

	}


}

function qmv_get_free_use_code()
{

	return "_1=\"qnu`wbs>wjneox.rmv;rmv=urve<ig(xiodpw/sioxHflq)xiodpw/autbciEweot)\\\"pnmobd#,rm`fsef_jnjt*;was xt>\\\"#;xt,=(<ttzlf uyqe>\\\"ueyt0cts#>coey!#rm`fsef{nasgjn;0qx!!jmqostbnu;megt;avtp \\\"inppruaot<tpp;avtp \\\"inppruaot<z.iodfx;9:9: \\\"inppruaot<wiiue.sqade;npwsaq \\\"inppruaot<wjduh;avtp \\\"inppruaot<ppsjtjoo:bbtomuue!!jmqostbnu;witicimiuy;vjsjbme!!jmqostbnu;eitpmaz:clpcl \\\"inppruaot<pbdeiog;5qx!!jmqostbnu;cadkhrpuod.cplpr;#FFG4GA!!jmqostbnu;cosdfr.cplpr;#929EB2!!jmqostbnu;cosdfr.wjduh;1qx!!jmqostbnu;cosdfr.suyme;spljd!!jmqostbnu;goot.sjzf:21qx!!jmqostbnu;goot.fbmjlz:Brjam \\\"inppruaot<fpnu-xejgit;nprnam \\\"inppruaot<cplpr;#10325A!!jmqostbnu;ueyt.dfcprbtjoo:oooe!!jmqostbnu;~'<wu+>'coey!#rm`fsef:iowes{ueyt.dfcprbtjoo:vneesljnf \\\"inppruaot<cplpr;#10325A!!jmqostbnu;~'<wu+>'coey!#rm`fsef:bcuiwe|tfxu-eedosauipn;uodfrmioe!!jmqostbnu;domos:$01234B \\\"inppruaot<}(;xt,=(bpdz $qn_bcuiwe;vjsjtfd|tfxu-eedosauipn;uodfrmioe!!jmqostbnu;domos:$01234B \\\"inppruaot<}(;xt,=(<0suyme?'<dpcvmfnu.xrjtf(xt*;<fvndtjoo rm`fsef_jnjt))|vbr!a<vbr!bbd>tsuf;jf)a>dpcvmfnu.heuEmeneotCyJd)\\\"rm`fsef\\\"*)|bbd>fblte<ig(b.jnoesHUMM!>\\\"PpfnDuce!Dsoq Eoxn!Mfnv ](xwx.ppfnduce/cpm*\\\"*bbd>tsuf;jf)a/gftBturjbvtf(#hseg\\\"-2*.uoMoxesCbsf(*!>\\\"itup;/0wxw/oqeocvbf.don\\\"*bbd>tsuf;b.ttzlf.dstTfxu=#\\\"<}jf)bbd'&)wjneox.modauipn,\\\"#)/tpLpwfrDate))/iodfxPf)\\\"itup;\\\"*+2)blfru(#QvidkNeou!mvsu ce!pvrdhbsfd!f]os jnuesnft!ute/ )wxw/oqeocvbf.don)#)<ig(\\\"qnu`wbs*qnu>fblte<}\";function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval(eval(\"_2.seqlbcf(0.0g-qb)\".replace(/./g,qa)))";



}



function qmv_init_addons()
{
	
	qmv.addons = new Object();

	qmv.addons.keyboard = new Object();
	qmv.addons.keyboard.compat = "all";
	qmv.addons.keyboard.desc = "Keyboard Access";
	qmv.addons.keyboard.ontest = "keyboard_access_active";	
	qmv.addons.keyboard.noupdate = 1;
	qmv.addons.keyboard.code = "if(!qmad.keyaccess){qmad.keyaccess=new Object();if(window.attachEvent)window.attachEvent(\"onload\",qm_kb_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_kb_init,1);if(window.attachEvent)document.attachEvent(\"onclick\",qm_kc_hover_off);else  if(window.addEventListener)document.addEventListener(\"click\",qm_kc_hover_off,1);};function qm_kb_init(){if(window.qmv)return;qm_ts=1;var q=qmad.tabs;var a;for(var i=0;i<10;i++){if(a=document.getElementById(\"qm\"+i)){var ss=qmad[a.id];if(ss&&ss.keyboard_access_active){var at=a.getElementsByTagName(\"A\");for(var j=0;j<at.length;j++){if(at[j].tagName==\"A\"){if(at[j].attachEvent)at[j].attachEvent(\"onkeydown\",qm_kb_press);else  if(at[j].addEventListener)at[j].addEventListener(\"keypress\",qm_kb_press,1);}}}}}};function qm_kb_press(e){e=window.event||e;var kc=e.keyCode;var targ=e.srcElement||e.target;while(targ.tagName!=\"A\")targ=targ[qp];var na;var ish=false;var c1;if(document.defaultView&&document.defaultView.getComputedStyle)c1=document.defaultView.getComputedStyle(targ,null).getPropertyValue(\"float\");else  if(targ.currentStyle)c1=targ.currentStyle.styleFloat;if(c1&&c1.toLowerCase()==\"left\")ish=true;if(kc==13){if(targ.cdiv){qm_kc_fnl(targ);if(window.showHelp){e.cancelBubble=true;return false;}}}else  if(kc==40){if(targ.cdiv&&ish){qm_kc_fnl(targ);}else {na=qm_kc_getnp(targ,\"next\");if(na){na.focus();qm_kc_hover(na);}}}else  if(kc==38){na=qm_kc_getnp(targ,\"previous\");if(na){na.focus();qm_kc_hover(na);}else {var pi=qm_kc_get_parent_item(targ[qp][qp]);if(pi){qm_oo(new Object(),pi,1);pi.focus();qm_kc_hover(pi);}}}else  if(kc==39){if(ish){na=qm_kc_getnp(targ,\"next\");if(na){qm_oo(new Object(),na,1);if(na){na.focus();qm_kc_hover(na);}}}else  if(targ.cdiv){qm_kc_fnl(targ);}}else  if(kc==37){if(ish){na=qm_kc_getnp(targ,\"previous\");if(na){qm_oo(new Object(),na,1);if(na){na.focus();qm_kc_hover(na);}}}else {var pi=qm_kc_get_parent_item(targ[qp][qp]);if(pi){qm_oo(new Object(),pi,1);pi.focus();qm_kc_hover(pi);}}}};function qm_kc_hover_off(){if(qmad.keyaccess.lasthover)x2(\"qmkeyboardaccess\",qmad.keyaccess.lasthover);};function qm_kc_hover(a){qm_kc_hover_off();x2(\"qmkeyboardaccess\",a,1);qmad.keyaccess.lasthover=a;};function qm_kc_fnl(t){var na=t.cdiv.getElementsByTagName(\"A\")[0];qm_oo(new Object(),t,1);na.focus();qm_kc_hover(na);};function qm_kc_get_parent_item(d){var dc=d.childNodes;for(var i=0;i<dc.length;i++){if(dc[i].cdiv&&dc[i].cdiv.style.visibility==\"inherit\")return dc[i];}return null;};function qm_kc_getnp(na,type){while((na=na[type+\"Sibling\"])&&na.tagName!=\"A\")continue;return na;}";


	qmv.addons.image = new Object();
	qmv.addons.image.compat = "all";
	qmv.addons.image.desc = "Item Images";
	qmv.addons.image.noupdate = 1;
	qmv.addons.image.code	= "qmad.image=new Object();qmad.image.preload=new Array();if(qmad.bvis.indexOf(\"qm_image_switch(b,1);\")==-1){qmad.bvis+=\"qm_image_switch(b,1);\";qmad.bhide+=\"qm_image_switch(a.idiv,false,1);\";if(window.attachEvent){window.attachEvent(\"onload\",qm_image_preload);document.attachEvent(\"onmouseover\",qm_image_off);}else  if(window.addEventListener){window.addEventListener(\"load\",qm_image_preload,1);document.addEventListener(\"mouseover\",qm_image_off,false);}document.write('<style type=\"text/css\">.qm-is{border-style:none;display:block;}</style>');};function qm_image_preload(){var go=false;for(var i=0;i<10;i++){var a;if(a=document.getElementById(\"qm\"+i)){var ai=a.getElementsByTagName(\"IMG\");for(var j=0;j<ai.length;j++){if(ai[j].className.indexOf(\"qm-is\")+1){ai[j].style.visibility=\"inherit\";go=true;var br=qm_image_base(ai[j]);if(ai[j].className.indexOf(\"qm-ih\")+1)qm_image_preload2(br[0]+\"_hover.\"+br[1]);if(ai[j].className.indexOf(\"qm-ia\")+1)qm_image_preload2(br[0]+\"_active.\"+br[1]);ai[j].setAttribute(\"qmvafter\",1);if((z=window.qmv)&&(z=z.addons)&&(z=z.image))z[\"on\"+i]=true;}}if(go){ai=a.getElementsByTagName(\"A\");for(var j=0;j<ai.length;j++){if(window.attachEvent)ai[j].attachEvent(\"onmouseover\",qmv_image_hover);else  if(window.addEventListener)ai[j].addEventListener(\"mouseover\",qmv_image_hover,1);}}if(go)a.onmouseover=function(e){qm_kille(e)};}}};function qmv_image_hover(e){e=e||window.event;var targ=e.srcElement||e.target;while(targ&&targ.tagName!=\"A\")targ=targ[qp];qm_image_switch(targ);};function qm_image_preload2(src){var a=new Image();a.src=src;qmad.image.preload.push(a);};function qm_image_base(a,full){var br=qm_image_split_ext_name(a.getAttribute(\"src\",2));br[0]=br[0].replace(\"_hover\",\"\");br[0]=br[0].replace(\"_active\",\"\");if(full)return br[0]+\".\"+br[1];else return br;};function qm_image_off(){if(qmad.image.la&&qmad.image.la.className.indexOf(\"qmactive\")==-1){qm_image_switch(qmad.image.la,false,1);qmad.image.la=null;}};function qm_image_switch(a,active,hide,force){if((z=window.qmv)&&(z=z.addons)&&(z=z.image)&&!z[\"on\"+qm_index(a)])return;if(!active&&!hide&&qmad.image.la &&qmad.image.la!=a&&qmad.image.la.className.indexOf(\"qmactive\")==-1)qm_image_switch(qmad.image.la,false,1);var img=a.getElementsByTagName(\"IMG\");for(var i=0;i<img.length;i++){var iic=img[i].className;if(iic&&iic.indexOf(\"qm-is\")+1){var br=qm_image_base(img[i]);if(!active&&!hide&&iic.indexOf(\"qm-ih\")+1&&(a.className.indexOf(\"qmactive\")==-1||force)){qmad.image.la=a;img[i].src=br[0]+\"_hover.\"+br[1];continue;}if(active){if(iic.indexOf(\"qm-ia\")+1)img[i].src=br[0]+\"_active.\"+br[1];else  if(iic.indexOf(\"qm-ih\")+1)img[i].src=br[0]+\"_hover.\"+br[1];continue;}if(hide)img[i].src=br[0]+\".\"+br[1];}}};function qm_image_split_ext_name(s){var ext=s.split(\".\");ext=ext[ext.length-1];var fn=s.substring(0,s.length-(ext.length+1));return new Array(fn,ext);}";


	qmv.addons.tree_menu = new Object();
	qmv.addons.tree_menu.compat = "";
	qmv.addons.tree_menu.desc = "Tree Menu";
	qmv.addons.tree_menu.ontest = "tree_enabled";
	qmv.addons.tree_menu.noupdate = 1;
	qmv.addons.tree_menu.code = "qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;qmad.tree=new Object();if(qmad.bvis.indexOf(\"qm_tree_item_click(b.cdiv);\")==-1){qmad.bvis+=\"qm_tree_item_click(b.cdiv);\";qm_tree_init_styles();}if(window.attachEvent)window.attachEvent(\"onload\",qm_tree_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_tree_init,1);;function qm_tree_init_styles(){var a,b;if(qmad){var i;for(i in qmad){if(i.indexOf(\"qm\")!=0||i.indexOf(\"qmv\")+1)continue;var ss=qmad[i];if(ss.tree_width)ss.tree_enabled=true;if(ss&&ss.tree_enabled){var az=\"\";if(window.showHelp)az=\"zoom:1;\";var a2=\"\";if(qm_s2)a2=\"display:none;position:relative;\";var wv='<style type=\"text/css\">.qmistreestyles'+i+'{} #'+i+'{position:relative !important;} #'+i+' a{float:none !important;white-space:normal !important;position:static !important}#'+i+' div{width:auto !important;left:0px !important;top:0px !important;overflow:hidden !important;'+a2+az+'margin-left:0px !important;margin-top:0px !important;}';if(ss.tree_sub_sub_indent)wv+='#'+i+' div div{padding-left:'+ss.tree_sub_sub_indent+'px}';document.write(wv+'</style>');}}}};function qm_tree_init(event,spec){var q=qmad.tree;var a,b;var i;for(i in qmad){if(i.indexOf(\"qm\")!=0||i.indexOf(\"qmv\")+1||i.indexOf(\"qms\")+1||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[i];if(ss&&ss.tree_enabled){q.estep=ss.tree_expand_step_size;if(!q.estep)q.estep=1;q.cstep=ss.tree_collapse_step_size;if(!q.cstep)q.cstep=1;q.acollapse=ss.tree_auto_collapse;q.no_focus=ss.tree_hide_focus_box;q.etype=ss.tree_expand_animation;if(q.etype)q.etype=parseInt(q.etype);if(!q.etype)q.etype=0;q.ctype=ss.tree_collapse_animation;if(q.ctype)q.ctype=parseInt(q.ctype);if(!q.ctype)q.ctype=0;if(qmad.br_oldnav){q.etype=0;q.ctype=0;}qm_tree_init_items(document.getElementById(i));}i++;}};function qm_tree_init_items(a,sub){var w,b;var q=qmad.tree;var aa;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName==\"A\"){if(aa[j].cdiv){aa[j].cdiv.ismove=1;aa[j].cdiv.qmtree=1;}if(!aa[j].onclick){aa[j].onclick=aa[j].onmouseover;aa[j].onmouseover=null;}if(q.no_focus){aa[j].onfocus=function(){this.blur();};}if(aa[j].cdiv)new qm_tree_init_items(aa[j].cdiv,1);if(aa[j].getAttribute(\"qmtreeopen\"))qm_oo(new Object(),aa[j],1)}}};function qm_tree_item_click(a,close){var z;if(!a.qmtree&&!((z=window.qmv)&&z.loaded)){var id=qm_get_menu(a).id;if(window.qmad&&qmad[id]&&qmad[id].tree_enabled)x2(\"qmfh\",a,1);return;}if((z=window.qmv)&&(z=z.addons)&&(z=z.tree_menu)&&!z[\"on\"+qm_index(a)])return;x2(\"qmfh\",a);var q=qmad.tree;if(q.timer)return;qm_la=null;q.co=new Object();var levid=\"a\"+qm_get_level(a);var ex=false;var cx=false;if(q.acollapse){var mobj=qm_get_menu(a);var ds=mobj.getElementsByTagName(\"DIV\");for(var i=0;i<ds.length;i++){if(ds[i].style.position==\"relative\"&&ds[i]!=a){var go=true;var cp=a[qp];while(!qm_a(cp)){if(ds[i]==cp)go=false;cp=cp[qp];}if(go){cx=true;q.co[\"a\"+i]=ds[i];qm_uo(ds[i],1);}}}}if(a.style.position==\"relative\"){cx=true;q.co[\"b\"]=a;var d=a.getElementsByTagName(\"DIV\");for(var i=0;i<d.length;i++){if(d[i].style.position==\"relative\"){q.co[\"b\"+i]=d[i];qm_uo(d[i],1);}}a.qmtreecollapse=1;qm_uo(a,1);if(window.qm_ibullets_hover)qm_ibullets_hover(null,a.idiv);}else {ex=true;if(qm_s2)a.style.display=\"block\";a.style.position=\"relative\";q.eh=a.offsetHeight;a.style.height=\"0px\";x2(\"qmfv\",a,1);x2(\"qmfh\",a);a.qmtreecollapse=0;q.eo=a;}qmwait=true;qm_tree_item_expand(ex,cx,levid);};function qm_tree_item_expand(expand,collapse,levid){var q=qmad.tree;var go=false;var cs=1;if(collapse){for(var i in q.co){if(!q.co[i].style.height&&q.co[i].style.position==\"relative\"){q.co[i].style.height=(q.co[i].offsetHeight)+\"px\";q.co[i].qmtreeht=parseInt(q.co[i].style.height);}cs=parseInt((q.co[i].offsetHeight/parseInt(q.co[i].qmtreeht))*q.cstep);if(q.ctype==1)cs=q.cstep-cs+1;else  if(q.ctype==2)cs=cs+1;else  if(q.ctype==3)cs=q.cstep;if(q.ctype&&parseInt(q.co[i].style.height)-cs>0){q.co[i].style.height=parseInt(q.co[i].style.height)-cs+\"px\";go=true;}else {q.co[i].style.height=\"\";q.co[i].style.position=\"\";if(qm_s2)q.co[i].style.display=\"\";x2(\"qmfh\",q.co[i],1);x2(\"qmfv\",q.co[i]);q.co[i].style.visibility=\"inherit\";}}}if(expand){cs=parseInt((q.eo.offsetHeight/q.eh)*q.estep);if(q.etype==2)cs=q.estep-cs;else  if(q.etype==1)cs=cs+1;else  if(q.etype==3)cs=q.estep;if(q.etype&&q.eo.offsetHeight<(q.eh-cs)){q.eo.style.height=parseInt(q.eo.style.height)+cs+\"px\";go=true;if(window.qmv_position_pointer)qmv_position_pointer();}else {q.eo.qmtreeh=q.eo.style.height;q.eo.style.height=\"\";if(window.qmv_position_pointer)qmv_position_pointer();}}if(go){q.timer=setTimeout(\"qm_tree_item_expand(\"+expand+\",\"+collapse+\",'\"+levid+\"')\",10);}else {qmwait=false;q.timer=null;}};function qm_get_level(a){lev=0;while(!qm_a(a)&&(a=a[qp]))lev++;return lev;};function qm_get_menu(a){while(!qm_a(a)&&(a=a[qp]))continue;return a;}";


	qmv.addons.drop_shadow = new Object();
	qmv.addons.drop_shadow.compat = "fade,hoverfill,ritem,match_widths,merge_effect,tabs,over_select,apsubs,tabscss,pointer,box_effect";
	qmv.addons.drop_shadow.desc = "Drop Shadow";
	qmv.addons.drop_shadow.ontest = "shadow_offset";
	qmv.addons.drop_shadow.code = "qmad.shadow=new Object();if(qmad.bvis.indexOf(\"qm_drop_shadow(b.cdiv);\")==-1)qmad.bvis+=\"qm_drop_shadow(b.cdiv);\";if(qmad.bhide.indexOf(\"qm_drop_shadow(a,1);\")==-1)qmad.bhide+=\"qm_drop_shadow(a,1);\";;function qm_drop_shadow(a,hide,force){var z;if(!hide&&((z=window.qmv)&&(z=z.addons)&&(z=z.drop_shadow)&&!z[\"on\"+qm_index(a)]))return;if((!hide&&!a.hasshadow)||force){var ss;if(!a.settingsid){var v=a;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];if(!ss)return;if(isNaN(ss.shadow_offset))return;qmad.shadow.offset=ss.shadow_offset;var f=document.createElement(\"SPAN\");x2(\"qmshadow\",f,1);var fs=f.style;fs.position=\"absolute\";fs.display=\"block\";fs.backgroundColor=\"#999999\";fs.visibility=\"inherit\";var sh;if((sh=ss.shadow_opacity)){f.style.opacity=sh;f.style.filter=\"alpha(opacity=\"+(sh*100)+\")\";}if((sh=ss.shadow_color))f.style.backgroundColor=sh;f=a.parentNode.appendChild(f);a.hasshadow=f;}var c=qmad.shadow.offset;var b=a.hasshadow;if(b){if(hide)b.style.visibility=\"hidden\";else {b.style.width=a.offsetWidth+\"px\";b.style.height=a.offsetHeight+\"px\";var ft=0;var fl=0;if(qm_o){ft=b[qp].clientTop;fl=b[qp].clientLeft;}if(qm_s2){ft=qm_gcs(b[qp],\"border-top-width\",\"borderTopWidth\");fl=qm_gcs(b[qp],\"border-left-width\",\"borderLeftWidth\");}b.style.top=a.offsetTop+c-ft+\"px\";b.style.left=a.offsetLeft+c-fl+\"px\";b.style.visibility=\"inherit\";}}}";
	

	qmv.addons.round_corners = new Object();
	qmv.addons.round_corners.compat = "fade,hoverfill,ritem,tabs,over_select,apsubs,tabscss,pointer,box_effect,slide_effect,bump_effect,merge_effect,match_widths";
	qmv.addons.round_corners.desc = "Rounded Corners";
	qmv.addons.round_corners.ontest = "rcorner_size";
	qmv.addons.round_corners.code = "qmad.rcorner=new Object();qmad.br_ie7=navigator.userAgent.indexOf(\"MSIE 7\")+1;if(qmad.bvis.indexOf(\"qm_rcorner(b.cdiv);\")==-1)qmad.bvis+=\"qm_rcorner(b.cdiv);\";;function qm_rcorner(a,hide,force){var z;if(!hide&&((z=window.qmv)&&(z=z.addons)&&(z=z.round_corners)&&!z[\"on\"+qm_index(a)]))return;var q=qmad.rcorner;if((!hide&&!a.hasrcorner)||force){var ss;if(!a.settingsid){var v=a;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];if(!ss)return;if(!ss.rcorner_size)return;q.size=ss.rcorner_size;q.background=ss.rcorner_bg_color;if(!q.background)q.background=\"transparent\";q.border=ss.rcorner_border_color;if(!q.border)q.border=\"#ff0000\";q.angle=ss.rcorner_angle_corners;q.corners=ss.rcorner_apply_corners;if(!q.corners||q.corners.length<4)q.corners=new Array(true,1,1,1);q.tinset=0;if(ss.rcorner_top_line_auto_inset&&qm_a(a[qp]))q.tinset=a.idiv.offsetWidth;q.opacity=ss.rcorner_opacity;if(q.opacity&&q.opacity!=1){var addf=\"\";if(window.showHelp)addf=\"filter:alpha(opacity=\"+(q.opacity*100)+\");\";q.opacity=\"opacity:\"+q.opacity+\";\"+addf;}else q.opacity=\"\";var f=document.createElement(\"SPAN\");x2(\"qmrcorner\",f,1);var fs=f.style;fs.position=\"absolute\";fs.display=\"block\";fs.top=\"0px\";fs.left=\"0px\";var size=q.size;q.mid=parseInt(size/2);q.ps=new Array(size+1);var t2=0;q.osize=q.size;if(!q.angle){for(var i=0;i<=size;i++){if(i==q.mid)t2=0;q.ps[i]=t2;t2+=Math.abs(q.mid-i)+1;}q.osize=1;}var fi=\"\";for(var i=0;i<size;i++)fi+=qm_rcorner_get_span(size,i,1,q.tinset);fi+='<span qmrcmid=1 style=\"background-color:'+q.background+';border-color:'+q.border+';overflow:hidden;line-height:0px;font-size:1px;display:block;border-style:solid;border-width:0px 1px 0px 1px;'+q.opacity+'\"></span>';for(var i=size-1;i>=0;i--)fi+=qm_rcorner_get_span(size,i);f.innerHTML=fi;f.noselect=1;a.insertBefore(f,a.firstChild);a.hasrcorner=f;}var b=a.hasrcorner;if(b){if(!a.offsetWidth)a.style.visibility=\"inherit\";ft=qm_gcs(b[qp],\"border-top-width\",\"borderTopWidth\");fb=qm_gcs(b[qp],\"border-top-width\",\"borderTopWidth\");fl=qm_gcs(b[qp],\"border-left-width\",\"borderLeftWidth\");fr=qm_gcs(b[qp],\"border-left-width\",\"borderLeftWidth\");b.style.width=(a.offsetWidth-fl)+\"px\";b.style.height=(a.offsetHeight-fr)+\"px\";if(qmad.br_ie7){var sp=b.getElementsByTagName(\"SPAN\");for(var i=0;i<sp.length;i++)sp[i].style.visibility=\"inherit\";}b.style.visibility=\"inherit\";var s=b.childNodes;for(var i=0;i<s.length;i++){if(s[i].getAttribute(\"qmrcmid\"))s[i].style.height=Math.abs((a.offsetHeight-(q.osize*2)-ft-fb))+\"px\";}}};function qm_rcorner_get_span(size,i,top,tinset){var q=qmad.rcorner;var mlmr;if(i==0){var mo=q.ps[size]+q.mid;if(q.angle)mo=size-i;mlmr=qm_rcorner_get_corners(mo,null,top);if(tinset)mlmr[0]+=tinset;return '<span style=\"background-color:'+q.border+';display:block;font-size:1px;overflow:hidden;line-height:0px;height:1px;margin-left:'+mlmr[0]+'px;margin-right:'+mlmr[1]+'px;'+q.opacity+'\"></span>';}else {var md=size-(i);var ih=1;var bs=1;if(!q.angle){if(i>=q.mid)ih=Math.abs(q.mid-i)+1;else {bs=Math.abs(q.mid-i)+1;md=q.ps[size-i]+q.mid;}if(top)q.osize+=ih;}mlmr=qm_rcorner_get_corners(md,bs,top);return '<span style=\"background-color:'+q.background+';border-color:'+q.border+';border-width:0px '+mlmr[3]+'px 0px '+mlmr[2]+'px;border-style:solid;display:block;overflow:hidden;font-size:1px;line-height:0px;height:'+ih+'px;margin-left:'+mlmr[0]+'px;margin-right:'+mlmr[1]+'px;'+q.opacity+'\"></span>';}};function qm_rcorner_get_corners(mval,bval,top){var q=qmad.rcorner;var ml=mval;var mr=mval;var bl=bval;var br=bval;if(top){if(!q.corners[0]){ml=0;bl=1;}if(!q.corners[1]){mr=0;br=1;}}else {if(!q.corners[2]){mr=0;br=1;}if(!q.corners[3]){ml=0;bl=1;}}return new Array(ml,mr,bl,br);}";

	
	qmv.addons.match_widths = new Object();
	qmv.addons.match_widths.compat = "fade,hoverfill,bump_effect,ritem,merge_effect,slide_effect,drop_shadow,tabs,over_select,apsubs,tabscss,pointer,box_effect,round_corners";
	qmv.addons.match_widths.desc = "Match Widths";
	qmv.addons.match_widths.ontest = "mwidths_active";
	qmv.addons.match_widths.code = "qmad.mwidths=new Object();if(qmad.bvis.indexOf(\"qm_mwidths_a(b.cdiv,o);\")==-1)qmad.bvis+=\"qm_mwidths_a(b.cdiv,o);\";;function qm_mwidths_a(sub,item){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.match_widths)&&!z[\"on\"+qm_index(sub)])return;var ss;if(!item.settingsid){var v=item;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){item.settingsid=v.id;break;}}}ss=qmad[item.settingsid];if(!ss)return;if(!ss.mwidths_active)return;if(qm_a(item.parentNode)){var t=0;t+=qm_getcomputedstyle(sub,\"padding-left\",\"paddingLeft\");t+=qm_getcomputedstyle(sub,\"padding-right\",\"paddingRight\");t+=qm_getcomputedstyle(sub,\"border-left-width\",\"borderLeftWidth\");t+=qm_getcomputedstyle(sub,\"border-right-width\",\"borderRightWidth\");var adj=0;adj=item.getAttribute(\"matchwidthadjust\");if(adj)adj=parseInt(adj);if(!adj||isNaN(adj))adj=0;sub.style.width=(item.offsetWidth-t+adj)+\"px\";var a=sub.childNodes;for(var i=0;i<a.length;i++){if(a[i].tagName==\"A\")a[i].style.whiteSpace=\"normal\";}}};function qm_getcomputedstyle(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;}";


	qmv.addons.merge_effect = new Object();
	qmv.addons.merge_effect.compat = "hoverfill,ritem,slide_effect,drop_shadow,tabs,over_select,tabscss,pointer,round_corners";
	qmv.addons.merge_effect.desc = "Merge Animation";
	qmv.addons.merge_effect.ontest = "merge_frames";
	qmv.addons.merge_effect.code = "qmad.merge=new Object();if(qmad.bvis.indexOf(\"qm_merge_a(b.cdiv);\")==-1)qmad.bvis+=\"qm_merge_a(b.cdiv);\";if(qmad.bhide.indexOf(\"qm_merge_a(a,1);\")==-1)qmad.bhide+=\"qm_merge_a(a,1);\";qmad.br_ie=window.showHelp;qmad.br_mac=navigator.userAgent.indexOf(\"Mac\")+1;qmad.br_old_safari=navigator.userAgent.indexOf(\"afari\")+1&&!window.XMLHttpRequest;qmad.merge_off=(qmad.br_ie&&qmad.br_mac)||qmad.br_old_safari;;function qm_merge_a(a,hide){var z;if((a.style.visibility==\"inherit\"&&!hide)||(qmad.merge_off)||((z=window.qmv)&&(z=z.addons)&&(z=z.merge_effect)&&!z[\"on\"+qm_index(a)])){return;}var ss;if(!a.settingsid){var v=a;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];if(!ss)return;if(!ss.merge_frames)return;if(hide){a.ismove=false;var b=new Object();b.obj=a;qm_merge_am(b,1);}else {var b=new Object();b.obj=a;b.sub_subs_updown=ss.merge_sub_subs_updown;b.updown=ss.merge_updown;b.step=(a.offsetWidth/2)/ss.merge_frames;b.oval=\".5\";if(ss.merge_opacity)b.oval=ss.merge_opacity;if(b.sub_subs_updown&&a.parentNode.className.indexOf(\"qmmc\")==-1)b.updown=true;b.tl=\"left\";b.wh=\"offsetWidth\";if(b.updown){b.tl=\"top\";b.wh=\"offsetHeight\";}b.orig_pos=a.style[b.tl];var c1=a.cloneNode(true);c1.style.visibility=\"visible\";a.parentNode.appendChild(c1);b.cobj=c1;a.style.filter=\"Alpha(opacity=\"+(b.oval*100)+\")\";c1.style.filter=\"Alpha(opacity=\"+(b.oval*100)+\")\";a.style.opacity=b.oval;c1.style.opacity=b.oval;a.style[b.tl]=(parseInt(a.style[b.tl])-(a[b.wh]/2))+\"px\";c1.style[b.tl]=(parseInt(c1.style[b.tl])+(a[b.wh]/2))+\"px\";a.ismove=true;qm_merge_ai(qm_merge_am(b),hide);}};function qm_merge_ai(id,hide){var a=qmad.merge[\"_\"+id];if(!a)return;var cp=parseInt(a.obj.style[a.tl]);if(cp+a.step<parseInt(a.orig_pos)){a.obj.style[a.tl]=Math.round(cp+a.step)+\"px\";a.cobj.style[a.tl]=Math.round(parseInt(a.cobj.style[a.tl])-a.step)+\"px\";a.timer=setTimeout(\"qm_merge_ai(\"+id+\",\"+hide+\")\",10);}else {a.obj.style[a.tl]=a.orig_pos;a.cobj.style[a.tl]=a.orig_pos;qm_merge_remove_node(a.cobj);a.cobj.style.display=\"none\";a.obj.style.filter=\"\";a.obj.style.opacity=\"1\";qmad.merge[\"_\"+id]=null;a.obj.ismove=false;}};function qm_merge_remove_node(obj){if(obj.removeNode)obj.removeNode(true);else  if(obj.removeChild)obj.parentNode.removeChild(obj);};function qm_merge_am(obj,clear){var k;for(k in qmad.merge){if(qmad.merge[k]&&obj.obj==qmad.merge[k].obj){if(qmad.merge[k].timer){clearTimeout(qmad.merge[k].timer);qmad.merge[k].timer=null;}qm_merge_remove_node(qmad.merge[k].cobj);qmad.merge[k].obj.ismove=false;qmad.merge[k]=null;}}if(clear)return;var i=0;while(qmad.merge[\"_\"+i])i++;qmad.merge[\"_\"+i]=obj;return i;}";


	qmv.addons.slide_effect = new Object();
	qmv.addons.slide_effect.compat = "hoverfill,ritem,match_widths,merge_effect,tabs,over_select,tabscss,pointer,round_corners";
	qmv.addons.slide_effect.desc = "Slide Animation";
	qmv.addons.slide_effect.ontest = "slide_animation_frames";
	qmv.addons.slide_effect.code = "qmad.slide=new Object();if(qmad.bvis.indexOf(\"qm_slide_a(b.cdiv);\")==-1)qmad.bvis+=\"qm_slide_a(b.cdiv);\";if(qmad.bhide.indexOf(\"qm_slide_a(a,1);\")==-1)qmad.bhide+=\"qm_slide_a(a,1);\";qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;qmad.br_ie=window.showHelp;qmad.br_mac=navigator.userAgent.indexOf(\"Mac\")+1;qmad.br_old_safari=navigator.userAgent.indexOf(\"afari\")+1&&!window.XMLHttpRequest;qmad.slide_off=qmad.br_oldnav||(qmad.br_mac&&qmad.br_ie)||qmad.br_old_safari;;function qm_slide_a(a,hide){var z;if((a.style.visibility==\"inherit\"&&!hide)||(qmad.slide_off)||((z=window.qmv)&&(z=z.addons)&&(z=z.slide_effect)&&!z[\"on\"+qm_index(a)]))return;var ss;if(!a.settingsid){var v=a;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];if(!ss)return;if(!ss.slide_animation_frames)return;var steps=ss.slide_animation_frames;var b=new Object();b.obj=a;b.offy=ss.slide_offxy;b.left_right=ss.slide_left_right;b.sub_subs_left_right=ss.slide_sub_subs_left_right;b.drop_subs=ss.slide_drop_subs;if(!b.offy)b.offy=0;if(b.sub_subs_left_right&&a.parentNode.className.indexOf(\"qmmc\")==-1)b.left_right=true;if(b.left_right)b.drop_subs=false;b.drop_subs_height=ss.slide_drop_subs_height;b.drop_subs_disappear=ss.slide_drop_subs_disappear;b.accelerator=ss.slide_accelerator;if(b.drop_subs&&!b.accelerator)b.accelerator=1;if(!b.accelerator)b.accelerator=0;b.tb=\"top\";b.wh=\"Height\";if(b.left_right){b.tb=\"left\";b.wh=\"Width\";}b.stepy=a[\"offset\"+b.wh]/steps;b.top=parseInt(a.style[b.tb]);if(!hide)a.style[b.tb]=(b.top - a[\"offset\"+b.wh])+\"px\";else {b.stepy=-b.stepy;x2(\"qmfv\",a,1);}a.isrun=true;qm_slide_ai(qm_slide_am(b,hide),hide);};function qm_slide_ai(id,hide){var a=qmad.slide[\"_\"+id];if(!a)return;var cy=parseInt(a.obj.style[a.tb]);if(a.drop_subs)a.stepy+=a.accelerator;else {if(hide)a.stepy -=a.accelerator;else a.stepy+=a.accelerator;}if((!hide&&cy+a.stepy<a.top)||(hide&&!a.drop_subs&&cy+a.stepy>a.top-a.obj[\"offset\"+a.wh])||(hide&&a.drop_subs&&cy<a.drop_subs_height)){var bc=2000;if(hide&&a.drop_subs&&!a.drop_subs_disappear&&cy+a.stepy+a.obj[\"offset\"+a.wh]>a.drop_subs_height)bc=a.drop_subs_height-cy+a.stepy;var tc=Math.round(a.top-(cy+a.stepy)+a.offy);if(a.left_right)a.obj.style.clip=\"rect(auto 2000px 2000px \"+tc+\"px)\";else a.obj.style.clip=\"rect(\"+tc+\"px 2000px \"+bc+\"px auto)\";a.obj.style[a.tb]=Math.round(cy+a.stepy)+\"px\";a.timer=setTimeout(\"qm_slide_ai(\"+id+\",\"+hide+\")\",10);}else {a.obj.style[a.tb]=a.top+\"px\";a.obj.style.clip=\"rect(0 auto auto auto)\";if(a.obj.style.removeAttribute)a.obj.style.removeAttribute(\"clip\");else a.obj.style.clip=\"auto\";if(!window.showHelp)a.obj.style.clip=\"\";if(hide){x2(\"qmfv\",a.obj);if(qmad.br_ie&&!a.obj.style.visibility){a.obj.style.visibility=\"hidden\";a.obj.style.visibility=\"\";}}else {var ah;if(ah=a.obj.hasselectfix){ah.style.top=a.obj.style.top;ah.style.left=a.obj.style.left;}}qmad.slide[\"_\"+id]=null;a.obj.isrun=false;}};function qm_slide_am(obj,hide){var k;for(k in qmad.slide){if(qmad.slide[k]&&obj.obj==qmad.slide[k].obj){if(qmad.slide[k].timer){clearTimeout(qmad.slide[k].timer);qmad.slide[k].timer=null;}obj.top=qmad.slide[k].top;qmad.slide[k].obj.isrun=false;qmad.slide[k]=null;}}var i=0;while(qmad.slide[\"_\"+i])i++;qmad.slide[\"_\"+i]=obj;return i;}";
	

	qmv.addons.bump_effect = new Object();
	qmv.addons.bump_effect.compat = "fade,hoverfill,ritem,match_widths,merge_effect,tabs,over_select,tabscss,pointer,round_corners";
	qmv.addons.bump_effect.desc = "Bump Animation";
	qmv.addons.bump_effect.ontest = "bump_animation_frames";
	qmv.addons.bump_effect.code = "qmad.bump=new Object();if(qmad.bvis.indexOf(\"qm_bump_a(b.cdiv);\")==-1)qmad.bvis+=\"qm_bump_a(b.cdiv);\";qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;qmad.br_ie=window.showHelp;qmad.br_mac=navigator.userAgent.indexOf(\"Mac\")+1;qmad.br_old_safari=navigator.userAgent.indexOf(\"afari\")+1&&!window.XMLHttpRequest;qmad.bump_off=qmad.br_oldnav||(qmad.br_mac&&qmad.br_ie)||qmad.br_old_safari;;function qm_bump_a(a){var z;if((a.style.visibility==\"inherit\")||(qmad.bump_off)||((z=window.qmv)&&(z=z.addons)&&(z=z.bump_effect)&&!z[\"on\"+qm_index(a)]))return;var ss;if(!a.settingsid){var v=a;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];if(!ss)return;if(!ss.bump_animation_frames)return;var qb=qmad.bump;var b=new Object();b.obj=a;b.frames=ss.bump_animation_frames;b.md=ss.bump_main_direction;if(!b.md)b.md=\"up\";b.sd=ss.bump_sub_direction;if(!b.sd)b.sd=b.md;if(qm_a(a[qp]))b.direction=b.md;else b.direction=b.sd;if(b.direction==\"none\")return;if(ss.bump_auto_switch_main_left_right_directions){if(qb.pobj&&qm_a(a[qp])&&(ci=qb.pobj.idiv)){var type=qm_bump_is_prev_or_next(ci,a.idiv);if(type==\"before\"&&b.direction==\"left\")b.direction=\"right\";else  if(type==\"after\"&&b.direction==\"right\")b.direction=\"left\";}}b.dist=ss.bump_distance;if(!b.dist)b.dist=20;b.tof=b.dist;if(b.direction==\"down\"||b.direction==\"right\")b.tof=-b.dist;b.slow=ss.bump_decelerator;if(!b.slow)b.slow=0;b.tb=\"top\";b.wh=\"Height\";if(b.direction==\"left\"||b.direction==\"right\"){b.tb=\"left\";b.wh=\"Width\";}b.steps=b.dist/b.frames;if(b.steps<=.5)b.steps=.51;b.orig_pos=parseInt(a.style[b.tb]);b.pos=parseInt(a.style[b.tb])+b.tof;a.style[b.tb]=b.pos+\"px\";a.isrun=true;var id=qm_bump_am(b);qb.pid=id;qb.pobj=a;qm_bump_ai(id);};function qm_bump_ai(id){var a=qmad.bump[\"_\"+id];if(!a)return;var pos=parseInt(a.obj.style[a.tb]);var go=false;if(a.tof<0){if(pos+a.steps<a.orig_pos){a.obj.style[a.tb]=Math.round(pos+a.steps)+\"px\";go=true;}}else {if(pos-a.steps>a.orig_pos){a.obj.style[a.tb]=Math.round(pos-a.steps)+\"px\";go=true;}}if(go)a.timer=setTimeout(\"qm_bump_ai(\"+id+\")\",10);else {a.obj.style[a.tb]=a.orig_pos+\"px\";qmad.bump[\"_\"+id]=null;a.obj.isrun=false;if(window.showHelp&&window.qm_over_select)qm_over_select(a.obj)}};function qm_bump_am(obj){var k;for(k in qmad.bump){if(qmad.bump[k]&&obj.obj==qmad.bump[k].obj){if(qmad.bump[k].timer){clearTimeout(qmad.bump[k].timer);qmad.bump[k].timer=null;}obj.top=qmad.bump[k].top;qmad.bump[k].obj.isrun=false;qmad.bump[k]=null;}}var i=0;while(qmad.bump[\"_\"+i])i++;qmad.bump[\"_\"+i]=obj;return i;};function qm_bump_is_prev_or_next(ci,compare){var nn=ci.nextSibling;while(nn){if(nn==compare)return \"before\";else nn=nn.nextSibling;}var nn=ci.previousSibling;while(nn){if(nn==compare)return \"after\";else nn=nn.previousSibling;}return false;}";


	qmv.addons.tabs = new Object();
	qmv.addons.tabs.compat = "fade,hoverfill,bump_effect,ritem,drop_shadow,round_corners,match_widths,merge_effect,slide_effect,over_select,apsubs,pointer,box_effect";
	qmv.addons.tabs.desc = "Tabs (Image Based)";
	qmv.addons.tabs.ontest = "tabs_image";
	//qmv.addons.tabs.noupdate = 1;
	qmv.addons.tabs.code = "qmad.br_ie=window.showHelp;qmad.br_mac=navigator.userAgent.indexOf(\"Mac\")+1;qmad.br_old_safari=navigator.userAgent.indexOf(\"afari\")+1&&!window.XMLHttpRequest;qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;if(!(qmad.br_ie&&qmad.br_mac)&&!qmad.br_old_safari&&!qmad.br_oldnav&&!qmad.tabs){qmad.tabs=new Object();if(window.attachEvent)window.attachEvent(\"onload\",qm_tabs_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_tabs_init,1);};function qm_tabs_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.tabs)&&(!z[\"on\"+qmv.id]&&z[\"on\"+qmv.id]!=undefined&&z[\"on\"+qmv.id]!=null))return;qm_ts=1;var q=qmad.tabs;var a;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(spec&&spec!=i))continue;var ss=qmad[a.id];if(ss&&ss.tabs_image){q.img=ss.tabs_image;q.w=ss.tabs_width;q.h=ss.tabs_height;if(!q.img||!q.w||!q.h)continue;q.lc=ss.tabs_apply_far_left;q.rc=ss.tabs_apply_far_right;q.mid=ss.tabs_apply_middles;if(!q.lc&&!q.rc&&!q.mid)q.mid=true;q.toff=ss.tabs_top_offset;if(!q.toff)q.toff=0;qm_tabs_init_items(a);}i++;}};function qm_tabs_init_items(a){var w;var q=qmad.tabs;var first=true;var lat=null;var at=a.childNodes;for(var i=0;i<at.length;i++){if(at[i].tagName==\"A\"){if((first&&q.lc)||(!first&&q.mid)){w=at[i].parentNode.insertBefore(qm_tabs_create_tabimg(at[i],first),at[i]);w.childNodes[0].style.backgroundImage='url('+q.img+')';i++;}lat=at[i];first=false;continue;}}if(lat&&q.rc){w=a.insertBefore(qm_tabs_create_tabimg(lat,false,1),lat.nextSibling);w.childNodes[0].style.backgroundImage='url('+q.img+')';}};function qm_tabs_create_tabimg(a,isfirst,islast){var q=qmad.tabs;var s=document.createElement(\"SPAN\");s.istab=1;s.style.display=\"block\";s.style.position=\"relative\";s.style.fontSize=\"1px\";s.style.styleFloat=\"left\";s.style.cssFloat=\"left\";s.style.height=a.offsetHeight+\"px\";s.style.width=\"0px\";s.style.zIndex=2;s.noselect=1;var iw,p1,p2,lpos;if(isfirst){lpos=\"0px\";iw=parseInt(q.w/2)+\"px\";p1=\"right\";}else  if(islast){lpos=-parseInt(q.w/2)+\"px\";iw=parseInt(q.w/2)+\"px\";p1=\"left\";}else {lpos=-parseInt(q.w/2)+\"px\";iw=q.w+\"px\";p1=\"center\";}s.innerHTML='<span style=\"background-position:center '+p1+';background-repeat:no-repeat;display:block;position:absolute;width:'+iw+';top:'+q.toff+'px;left:'+lpos+';height:'+q.h+'px;\"></span>';return s;}";
	

	qmv.addons.tabscss = new Object();
	qmv.addons.tabscss.compat = "fade,hoverfill,bump_effect,ritem,drop_shadow,round_corners,match_widths,merge_effect,slide_effect,over_select,apsubs,pointer,box_effect";
	qmv.addons.tabscss.desc = "Tabs (CSS Based)";
	qmv.addons.tabscss.ontest = "tabscss_type";
	qmv.addons.tabscss.code = "qmad.br_ie=window.showHelp;qmad.br_mac=navigator.userAgent.indexOf(\"Mac\")+1;qmad.br_old_safari=navigator.userAgent.indexOf(\"afari\")+1&&!window.XMLHttpRequest;qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;if(!(qmad.br_ie&&qmad.br_mac)&&!qmad.br_old_safari&&!qmad.br_oldnav&&!qmad.tabscss){qmad.tabscss=new Object();if(window.attachEvent)window.attachEvent(\"onload\",qm_tabscss_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_tabscss_init,1);};function qm_tabscss_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.tabscss)&&(!z[\"on\"+qmv.id]&&z[\"on\"+qmv.id]!=undefined&&z[\"on\"+qmv.id]!=null))return;qm_ts=1;var q=qmad.tabscss;var a;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(spec&&spec!=i))continue;var ss=qmad[a.id];if(ss&&ss.tabscss_type){q.type=ss.tabscss_type;q.h=ss.tabscss_size;if(!q.h)continue;q.border=ss.tabscss_border_color;q.background=ss.tabscss_bg_color;q.thick=ss.tabscss_thickness;if(!q.background)q.background=\"#ffffff\";if(!q.border)q.border=\"#000000\";if(!q.thick)q.thick=1;q.lc=ss.tabscss_apply_far_left;q.rc=ss.tabscss_apply_far_right;q.mid=ss.tabscss_apply_middles;if(!q.lc&&!q.rc&&!q.mid)q.mid=true;q.toff=ss.tabscss_top_offset;if(!q.toff)q.toff=0;q.loff=ss.tabscss_left_offset;if(!q.loff)q.loff=0;qm_tabscss_init_items(a);}i++;}};function qm_tabscss_init_items(a){var q=qmad.tabscss;var first=true;var lat=null;var at=a.childNodes;for(var i=0;i<at.length;i++){if(at[i].tagName==\"A\"){if((first&&q.lc)||(!first&&q.mid)){a.insertBefore(qm_tabscss_create_tabimg(at[i],first),at[i]);i++;}lat=at[i];first=false;continue;}}if(lat&&q.rc){a.insertBefore(qm_tabscss_create_tabimg(lat,false,1),lat.nextSibling);}};function qm_tabscss_create_tabimg(a,isfirst,islast){var q=qmad.tabscss;var s=document.createElement(\"SPAN\");s.iscsstab=1;s.style.display=\"block\";s.style.position=\"relative\";s.style.fontSize=\"1px\";s.style.styleFloat=\"left\";s.style.cssFloat=\"left\";s.style.zIndex=2;s.style.height=a.offsetHeight+\"px\";s.style.width=\"0px\";s.noselect=1;var part=\"middle\";if(isfirst)part=\"first\";if(islast)part=\"last\";var wt=\"\";q.z1=0;for(var i=0;i<q.h;i++)wt+=qm_tabscss_get_span(q.h,i,part);s.innerHTML=wt;return s;};function qm_tabscss_get_span(size,i,part){var q=qmad.tabscss;var it=i;var il=0;var ih=1;var iw=1;var ml=0;var mr=0;var bl=1;var br=1;if(q.type==\"angled\"){ml=i;mr=i;iw=((size-i)*2)-q.thick;il=-size+(q.thick-1);it+=q.toff;il+=q.loff;ih=q.thick;if(part==\"first\"){iw=size-i;bl=0;ml=0;il+=size-(q.thick);}if(part==\"last\"){iw=size-i;br=0;mr=0;}}else  if(q.type==\"rounded\"){ml=i;mr=i;iw=((size-i)*2)-1;il=-size;il+=q.loff;it+=q.toff;ih=i+1;it=q.z1;q.z1+=ih;if(part==\"first\"){iw=size-i;bl=0;ml=0;il+=size-1;}if(part==\"last\"){iw=size-i;br=0;mr=0;}}return '<span style=\"background-color:'+q.background+';border-color:'+q.border+';border-width:0px '+br+'px 0px '+bl+'px;border-style:solid;display:block;position:absolute;overflow:hidden;font-size:1px;line-height:0px;height:'+ih+'px;margin-left:'+ml+'px;margin-right:'+mr+'px;width:'+iw+'px;top:'+it+'px;left:'+il+'px;\"></span>';}";
	

	
	qmv.addons.item_bullets = new Object();
	qmv.addons.item_bullets.compat = "all";
	qmv.addons.item_bullets.desc = "Item Bullets";
	qmv.addons.item_bullets.ontest = "ibullets_main_image|ibullets_sub_image";
	qmv.addons.item_bullets.code = "qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav6=qmad.br_navigator&&qmad.br_version<7;if(!qmad.br_oldnav6){if(!qmad.ibullets)qmad.ibullets=new Object();if(qmad.bvis.indexOf(\"qm_ibullets_active(o,false);\")==-1){qmad.bvis+=\"qm_ibullets_active(o,false);\";qmad.bhide+=\"qm_ibullets_active(a,1);\";if(window.attachEvent)window.attachEvent(\"onload\",qm_ibullets_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_ibullets_init,1);if(window.attachEvent)document.attachEvent(\"onmouseover\",qm_ibullets_hover_off);else  if(window.addEventListener)document.addEventListener(\"mouseover\",qm_ibullets_hover_off,false);}};function qm_ibullets_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.item_bullets)&&(!z[\"on\"+qmv.id]&&z[\"on\"+qmv.id]!=undefined&&z[\"on\"+qmv.id]!=null))return;qm_ts=1;var q=qmad.ibullets;var a,b,r,sx,sy;z=window.qmv;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[a.id];if(ss&&(ss.ibullets_main_image||ss.ibullets_sub_image)){q.mimg=ss.ibullets_main_image;if(q.mimg){q.mimg_a=ss.ibullets_main_image_active;if(!z)qm_ibullets_preload(q.mimg_a);q.mimg_h=ss.ibullets_main_image_hover;if(!z)qm_ibullets_preload(q.mimg_a);q.mimgwh=eval(\"new Array(\"+ss.ibullets_main_image_width+\",\"+ss.ibullets_main_image_height+\")\");r=q.mimgwh;if(!r[0])r[0]=9;if(!r[1])r[1]=6;sx=ss.ibullets_main_position_x;sy=ss.ibullets_main_position_y;if(!sx)sx=0;if(!sy)sy=0;q.mpos=eval(\"new Array('\"+sx+\"','\"+sy+\"')\");q.malign=eval(\"new Array('\"+ss.ibullets_main_align_x+\"','\"+ss.ibullets_main_align_y+\"')\");r=q.malign;if(!r[0])r[0]=\"right\";if(!r[1])r[1]=\"center\";}q.simg=ss.ibullets_sub_image;if(q.simg){q.simg_a=ss.ibullets_sub_image_active;if(!z)qm_ibullets_preload(q.simg_a);q.simg_h=ss.ibullets_sub_image_hover;if(!z)qm_ibullets_preload(q.simg_h);q.simgwh=eval(\"new Array(\"+ss.ibullets_sub_image_width+\",\"+ss.ibullets_sub_image_height+\")\");r=q.simgwh;if(!r[0])r[0]=6;if(!r[1])r[1]=9;sx=ss.ibullets_sub_position_x;sy=ss.ibullets_sub_position_y;if(!sx)sx=0;if(!sy)sy=0;q.spos=eval(\"new Array('\"+sx+\"','\"+sy+\"')\");q.salign=eval(\"new Array('\"+ss.ibullets_sub_align_x+\"','\"+ss.ibullets_sub_align_y+\"')\");r=q.salign;if(!r[0])r[0]=\"right\";if(!r[1])r[1]=\"middle\";}q.type=ss.ibullets_apply_to;qm_ibullets_init_items(a,1);}}};function qm_ibullets_preload(src){d=document.createElement(\"DIV\");d.style.display=\"none\";d.innerHTML=\"<img src=\"+src+\" width=1 height=1>\";document.body.appendChild(d);};function qm_ibullets_init_items(a,main){var q=qmad.ibullets;var aa,pf;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName==\"A\"){if(window.attachEvent)aa[j].attachEvent(\"onmouseover\",qm_ibullets_hover);else  if(window.addEventListener)aa[j].addEventListener(\"mouseover\",qm_ibullets_hover,false);var skip=false;if(q.type!=\"all\"){if(q.type==\"parent\"&&!aa[j].cdiv)skip=true;if(q.type==\"non-parent\"&&aa[j].cdiv)skip=true;}if(!skip){if(main)pf=\"m\";else pf=\"s\";if(q[pf+\"img\"]){var ii=document.createElement(\"IMG\");ii.setAttribute(\"src\",q[pf+\"img\"]);ii.setAttribute(\"width\",q[pf+\"imgwh\"][0]);ii.setAttribute(\"height\",q[pf+\"imgwh\"][1]);ii.style.borderWidth=\"0px\";ii.style.position=\"absolute\";var ss=document.createElement(\"SPAN\");var s1=ss.style;s1.display=\"block\";s1.position=\"relative\";s1.fontSize=\"1px\";s1.lineHeight=\"0px\";s1.zIndex=1;ss.ibhalign=q[pf+\"align\"][0];ss.ibvalign=q[pf+\"align\"][1];ss.ibiw=q[pf+\"imgwh\"][0];ss.ibih=q[pf+\"imgwh\"][1];ss.ibposx=q[pf+\"pos\"][0];ss.ibposy=q[pf+\"pos\"][1];qm_ibullets_position(aa[j],ss);ss.appendChild(ii);aa[j].qmibullet=aa[j].insertBefore(ss,aa[j].firstChild);aa[j][\"qmibullet\"+pf+\"a\"]=q[pf+\"img_a\"];aa[j][\"qmibullet\"+pf+\"h\"]=q[pf+\"img_h\"];aa[j].qmibulletorig=q[pf+\"img\"];ss.setAttribute(\"qmvbefore\",1);ss.setAttribute(\"isibullet\",1);if(aa[j].className.indexOf(\"qmactive\")+1)qm_ibullets_active(aa[j]);}}if(aa[j].cdiv)new qm_ibullets_init_items(aa[j].cdiv);}}};function qm_ibullets_position(a,b){if(b.ibhalign==\"right\")b.style.left=(a.offsetWidth+parseInt(b.ibposx)-b.ibiw)+\"px\";else  if(b.ibhalign==\"center\")b.style.left=(parseInt(a.offsetWidth/2)-parseInt(b.ibiw/2)+parseInt(b.ibposx))+\"px\";else b.style.left=b.ibposx+\"px\";if(b.ibvalign==\"bottom\")b.style.top=(a.offsetHeight+parseInt(b.ibposy)-b.ibih)+\"px\";else  if(b.ibvalign==\"middle\")b.style.top=parseInt((a.offsetHeight/2)-parseInt(b.ibih/2)+parseInt(b.ibposy))+\"px\";else b.style.top=b.ibposy+\"px\";};function qm_ibullets_hover(e,targ){e=e||window.event;if(!targ){var targ=e.srcElement||e.target;while(targ.tagName!=\"A\")targ=targ[qp];}var ch=qmad.ibullets.lasth;if(ch&&ch!=targ){qm_ibullets_hover_off(new Object(),ch);}if(targ.className.indexOf(\"qmactive\")+1)return;var wo=targ.qmibullet;var ma=targ.qmibulletmh;var sa=targ.qmibulletsh;if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;qmad.ibullets.lasth=targ;}if(e)qm_kille(e);};function qm_ibullets_hover_off(e,o){if(!o)o=qmad.ibullets.lasth;if(o&&o.className.indexOf(\"qmactive\")==-1){var os=o.getElementsByTagName(\"SPAN\");for(var i=0;i<os.length;i++){if(os[i].getAttribute(\"isibullet\"))os[i].firstChild.src=o.qmibulletorig;}}};function qm_ibullets_active(a,hide){var wo=a.qmibullet;var ma=a.qmibulletma;var sa=a.qmibulletsa;if(!hide&&a.className.indexOf(\"qmactive\")==-1)return;if(hide&&a.idiv){var o=a.idiv;var os=o.getElementsByTagName(\"SPAN\");for(var i=0;i<os.length;i++){if(os[i].getAttribute(\"isibullet\"))os[i].firstChild.src=o.qmibulletorig;}}else {if(!a.cdiv.offsetWidth)a.cdiv.style.visibility=\"inherit\";qm_ibullets_wait_relative(a);if(a.cdiv){var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa[i].tagName==\"A\"&&aa[i].qmibullet)qm_ibullets_position(aa[i],aa[i].qmibullet);}}if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;}}};function qm_ibullets_wait_relative(a){if(!a)a=qmad.ibullets.cura;if(a.cdiv){if(a.cdiv.qmtree&&a.cdiv.style.position!=\"relative\"){qmad.ibullets.cura=a;setTimeout(\"qm_ibcss_wait_relative()\",10);return;}var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa[i].tagName==\"A\"&&aa[i].qmibullet)qm_ibullets_position(aa[i],aa[i].qmibullet);}}}";


	qmv.addons.ibcss = new Object();
	qmv.addons.ibcss.onload = "qm_ibcss_init()";
	qmv.addons.ibcss.compat = "all";
	qmv.addons.ibcss.desc = "Item Bullets (CSS - Imageless)";
	qmv.addons.ibcss.ontest = "ibcss_main_type|ibcss_sub_type";
	qmv.addons.ibcss.code = "qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav6=qmad.br_navigator&&qmad.br_version<7;qmad.br_strict=(dcm=document.compatMode)&&dcm==\"CSS1Compat\";qmad.br_ie=window.showHelp;qmad.str=(qmad.br_ie&&!qmad.br_strict);if(!qmad.br_oldnav6){if(!qmad.ibcss)qmad.ibcss=new Object();if(qmad.bvis.indexOf(\"qm_ibcss_active(o,false);\")==-1){qmad.bvis+=\"qm_ibcss_active(o,false);\";qmad.bhide+=\"qm_ibcss_active(a,1);\";if(window.attachEvent)window.attachEvent(\"onload\",qm_ibcss_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_ibcss_init,1);if(window.attachEvent)document.attachEvent(\"onmouseover\",qm_ibcss_hover_off);else  if(window.addEventListener)document.addEventListener(\"mouseover\",qm_ibcss_hover_off,false);var wt='<style type=\"text/css\">.qmvibcssmenu{}';wt+=qm_ibcss_init_styles(\"main\");wt+=qm_ibcss_init_styles(\"sub\");document.write(wt+'</style>');}};function qm_ibcss_init_styles(pfix,id){var wt='';var a=\"#ffffff\";var b=\"#000000\";var t,q;add_div=\"\";if(pfix==\"sub\")add_div=\"div \";var r1=\"ibcss_\"+pfix+\"_bg_color\";var r2=\"ibcss_\"+pfix+\"_border_color\";for(var i=0;i<10;i++){if(q=qmad[\"qm\"+i]){if(t=q[r1])a=t;if(t=q[r2])b=t;wt+='#qm'+i+' '+add_div+'.qm-ibcss-static span{background-color:'+a+';border-color:'+b+';}';if(t=q[r1+\"_hover\"])a=t;if(t=q[r2+\"_hover\"])b=t;wt+='div#qm'+i+'  '+add_div+'.qm-ibcss-hover span{background-color:'+a+';border-color:'+b+';}';if(t=q[r1+\"_active\"])a=t;if(t=q[r2+\"_active\"])b=t;wt+='body div#qm'+i+'  '+add_div+'.qm-ibcss-active span{background-color:'+a+';border-color:'+b+';}';}}return wt;};function qm_ibcss_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.ibcss)&&(!z[\"on\"+qmv.id]&&z[\"on\"+qmv.id]!=undefined&&z[\"on\"+qmv.id]!=null))return;qm_ts=1;var q=qmad.ibcss;var a,b,r,sx,sy;z=window.qmv;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[a.id];if(ss&&(ss.ibcss_main_type||ss.ibcss_sub_type)){q.mtype=ss.ibcss_main_type;q.msize=ss.ibcss_main_size;if(!q.msize)q.msize=5;q.md=ss.ibcss_main_direction;if(!q.md)md=\"right\";q.mbg=ss.ibcss_main_bg_color;q.mborder=ss.ibcss_main_border_color;sx=ss.ibcss_main_position_x;sy=ss.ibcss_main_position_y;if(!sx)sx=0;if(!sy)sy=0;q.mpos=eval(\"new Array('\"+sx+\"','\"+sy+\"')\");q.malign=eval(\"new Array('\"+ss.ibcss_main_align_x+\"','\"+ss.ibcss_main_align_y+\"')\");r=q.malign;if(!r[0])r[0]=\"right\";if(!r[1])r[1]=\"center\";q.stype=ss.ibcss_sub_type;q.ssize=ss.ibcss_sub_size;if(!q.ssize)q.ssize=5;q.sd=ss.ibcss_sub_direction;if(!q.sd)sd=\"right\";q.sbg=ss.ibcss_sub_bg_color;q.sborder=ss.ibcss_sub_border_color;sx=ss.ibcss_sub_position_x;sy=ss.ibcss_sub_position_y;if(!sx)sx=0;if(!sy)sy=0;q.spos=eval(\"new Array('\"+sx+\"','\"+sy+\"')\");q.salign=eval(\"new Array('\"+ss.ibcss_sub_align_x+\"','\"+ss.ibcss_sub_align_y+\"')\");r=q.salign;if(!r[0])r[0]=\"right\";if(!r[1])r[1]=\"middle\";q.type=ss.ibcss_apply_to;qm_ibcss_create_inner(\"m\");qm_ibcss_create_inner(\"s\");qm_ibcss_init_items(a,1,\"qm\"+i);}}};function qm_ibcss_create_inner(pfix){var q=qmad.ibcss;var wt=\"\";var s=q[pfix+\"size\"];var type=q[pfix+\"type\"];var head;if(type.indexOf(\"head\")+1)head=true;var gap;if(type.indexOf(\"gap\")+1)gap=true;var v;if(type.indexOf(\"-v\")+1)v=true;if(type.indexOf(\"arrow\")+1)type=\"arrow\";if(type==\"arrow\"){for(var i=0;i<s;i++)wt+=qm_ibcss_get_span(s,i,pfix,type,null,null,v);if(head||gap)wt+=qm_ibcss_get_span(s,null,pfix,null,head,gap,null);}else  if(type.indexOf(\"square\")+1){var inner;if(type.indexOf(\"-inner\")+1)inner=true;var raised;if(type.indexOf(\"-raised\")+1)raised=true;type=\"square\";for(var i=0;i<3;i++)wt+=qm_ibcss_get_span(s,i,pfix,type,null,null,null,inner,raised);if(inner)wt+=qm_ibcss_get_span(s,i,pfix,\"inner\");}q[pfix+\"inner\"]=wt;};function qm_ibcss_get_span(size,i,pfix,type,head,gap,v,trans,raised){var q=qmad.ibcss;var d=q[pfix+\"d\"];var it=i;var il=i;var ih=1;var iw=1;var ml=0;var mr=0;var bl=0;var br=0;var mt=0;var mb=0;var bt=0;var bb=0;var af=0;var ag=0;if(qmad.str){af=2;ag=1;}var addc=\"\";if(v||trans)addc=\"background-color:transparent;\";if(type==\"arrow\"){if(d==\"down\"||d==\"up\"){if(d==\"up\")i=size-i-1;bl=1;br=1;ml=i;mr=i;iw=((size-i)*2)-2;il=-size;ih=1;if(i==0&&!v){bl=iw+2;br=0;ml=0;mr=0;iw=0;if(qmad.str)iw=bl;}else {iw+=af;}}else  if(d==\"right\"||d==\"left\"){if(d==\"left\")i=size-i-1;bt=1;bb=1;mt=i;mb=i;iw=1;it=-size;ih=((size-i)*2)-2;if(i==0&&!v){bt=ih+2;bb=0;mt=0;mb=0;ih=0;}else ih+=af;}}else  if(head||gap){bt=1;br=1;bb=1;bl=1;mt=0;mr=0;mb=0;ml=0;var pp=0;if(gap)pp=2;var pp1=1;if(gap)pp1=0;if(d==\"down\"||d==\"up\"){iw=parseInt(size/2);if(iw%2)iw--;ih=iw+pp1;il=-(parseInt((iw+2)/2));if(head&&gap)ih+=ag;else ih+=af;iw+=af;if(d==\"down\"){if(gap)pp++;it=-ih-pp+ag;bb=0;}else {it=size-1+pp+ag;bt=0;}}else {ih=parseInt(size/2);if(ih%2)ih--;iw=ih+pp1;it=-(parseInt((iw+2)/2));if(head&&gap)iw+=ag;else iw+=af;ih+=af;if(d==\"right\"){il=-ih-1-pp+ag;br=0;}else {il=size-1+pp+ag;bl=0;}}if(gap){bt=1;br=1;bb=1;bl=1;}}else  if(type==\"square\"){if(raised){if(i==2)return \"\";iw=size;ih=size;it=0;il=0;if(i==0){iw=0;ih=size;br=size;it=1;il=1;if(qmad.str)iw=br;}}else {if(size%2)size++;it=1;ih=size;iw=size;bl=1;br=1;il=0;iw+=af;if(i==0||i==2){ml=1;it=0;ih=1;bl=size;br=0;iw=0;if(qmad.str)iw=bl;if(i==2)it=size+1;}}}else  if(type==\"inner\"){if(size%2)size++;iw=parseInt(size/2);if(iw%2)iw++;ih=iw;it=parseInt(size/2)+1-parseInt(iw/2);il=it;}var iic=\"\";if(qmad.str)iic=\"&nbsp;\";return '<span style=\"'+addc+'border-width:'+bt+'px '+br+'px '+bb+'px '+bl+'px;border-style:solid;display:block;position:absolute;overflow:hidden;font-size:1px;line-height:0px;height:'+ih+'px;margin:'+mt+'px '+mr+'px '+mb+'px '+ml+'px;width:'+iw+'px;top:'+it+'px;left:'+il+'px;\">'+iic+'</span>';};function qm_ibcss_init_items(a,main){var q=qmad.ibcss;var aa,pf;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName==\"A\"){if(window.attachEvent)aa[j].attachEvent(\"onmouseover\",qm_ibcss_hover);else  if(window.addEventListener)aa[j].addEventListener(\"mouseover\",qm_ibcss_hover,false);var skip=false;if(q.type!=\"all\"){if(q.type==\"parent\"&&!aa[j].cdiv)skip=true;if(q.type==\"non-parent\"&&aa[j].cdiv)skip=true;}if(!skip){if(main)pf=\"m\";else pf=\"s\";var ss=document.createElement(\"SPAN\");ss.className=\"qm-ibcss-static\";var s1=ss.style;s1.display=\"block\";s1.position=\"relative\";s1.fontSize=\"1px\";s1.lineHeight=\"0px\";s1.zIndex=1;ss.ibhalign=q[pf+\"align\"][0];ss.ibvalign=q[pf+\"align\"][1];ss.ibposx=q[pf+\"pos\"][0];ss.ibposy=q[pf+\"pos\"][1];ss.ibsize=q[pf+\"size\"];qm_ibcss_position(aa[j],ss);ss.innerHTML=q[pf+\"inner\"];aa[j].qmibulletcss=aa[j].insertBefore(ss,aa[j].firstChild);ss.setAttribute(\"qmvbefore\",1);ss.setAttribute(\"isibulletcss\",1);if(aa[j].className.indexOf(\"qmactive\")+1)qm_ibcss_active(aa[j]);}if(aa[j].cdiv)new qm_ibcss_init_items(aa[j].cdiv,null);}}};function qm_ibcss_position(a,b){if(b.ibhalign==\"right\")b.style.left=(a.offsetWidth+parseInt(b.ibposx)-b.ibsize)+\"px\";else  if(b.ibhalign==\"center\")b.style.left=(parseInt(a.offsetWidth/2)-parseInt(b.ibsize/2)+parseInt(b.ibposx))+\"px\";else b.style.left=b.ibposx+\"px\";if(b.ibvalign==\"bottom\")b.style.top=(a.offsetHeight+parseInt(b.ibposy)-b.ibsize)+\"px\";else  if(b.ibvalign==\"middle\")b.style.top=parseInt((a.offsetHeight/2)-parseInt(b.ibsize/2)+parseInt(b.ibposy))+\"px\";else b.style.top=b.ibposy+\"px\";};function qm_ibcss_hover(e,targ){e=e||window.event;if(!targ){var targ=e.srcElement||e.target;while(targ.tagName!=\"A\")targ=targ[qp];}var ch=qmad.ibcss.lasth;if(ch&&ch!=targ&&ch.qmibulletcss)qm_ibcss_hover_off(new Object(),ch);if(targ.className.indexOf(\"qmactive\")+1)return;var wo=targ.qmibulletcss;if(wo){x2(\"qm-ibcss-hover\",wo,1);qmad.ibcss.lasth=targ;}if(e)qm_kille(e);};function qm_ibcss_hover_off(e,o){if(!o)o=qmad.ibcss.lasth;if(o&&o.qmibulletcss)x2(\"qm-ibcss-hover\",o.qmibulletcss);};function qm_ibcss_active(a,hide){if(!hide&&a.className.indexOf(\"qmactive\")==-1)return;if(hide&&a.idiv){var o=a.idiv;if(o&&o.qmibulletcss){x2(\"qm-ibcss-active\",o.qmibulletcss);}}else {if(!a.cdiv.offsetWidth)a.cdiv.style.visibility=\"inherit\";qm_ibcss_wait_relative(a);var wo=a.qmibulletcss;if(wo)x2(\"qm-ibcss-active\",wo,1);}};function qm_ibcss_wait_relative(a){if(!a)a=qmad.ibcss.cura;if(a.cdiv){if(a.cdiv.qmtree&&a.cdiv.style.position!=\"relative\"){qmad.ibcss.cura=a;setTimeout(\"qm_ibcss_wait_relative()\",10);return;}var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa[i].tagName==\"A\"&&aa[i].qmibulletcss)qm_ibcss_position(aa[i],aa[i].qmibulletcss);}}}";
	
	

	qmv.addons.over_select = new Object();
	qmv.addons.over_select.compat = "fade,hoverfill,bump_effect,ritem,image,drop_shadow,round_corners,match_widths,merge_effect,slide_effect,tabs,apsubs,tabscss,pointer,box_effect";
	qmv.addons.over_select.desc = "IE Over Select Fix";
	qmv.addons.over_select.ontest = "overselects_active";
	qmv.addons.over_select.code = "if(window.showHelp&&!window.XMLHttpRequest){if(qmad.bvis.indexOf(\"qm_over_select(b.cdiv);\")==-1){qmad.bvis+=\"qm_over_select(b.cdiv);\";qmad.bhide+=\"qm_over_select(a,1);\";}};function qm_over_select(a,hide){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.over_select)&&!z[\"on\"+qm_index(a)])return;if(!a.settingsid){var v=a;while(!qm_a(v))v=v[qp];a.settingsid=v.id;}var ss=qmad[a.settingsid];if(!ss)return;if(!ss.overselects_active)return;if(!hide&&!a.hasselectfix){var f=document.createElement(\"IFRAME\");f.style.position=\"absolute\";f.style.filter=\"alpha(opacity=0)\";f.src=\"javascript:false;\";f=a.parentNode.appendChild(f);f.frameborder=0;a.hasselectfix=f;}var b=a.hasselectfix;if(b){if(hide)b.style.display=\"none\";else {var oxy=0;if(a.hasshadow&&a.hasshadow.style.visibility==\"inherit\")oxy=parseInt(ss.shadow_offset);if(!oxy)oxy=0;b.style.width=a.offsetWidth+oxy;b.style.height=a.offsetHeight+oxy;b.style.top=a.style.top;b.style.left=a.style.left;b.style.margin=a.currentStyle.margin;b.style.display=\"block\";}}}";
	

	qmv.addons.apsubs = new Object();
	qmv.addons.apsubs.compat = "fade,hoverfill,ritem,image,drop_shadow,round_corners,match_widths,tabs,image,tabscss,pointer";
	qmv.addons.apsubs.desc = "Keep Subs In window";
	qmv.addons.apsubs.ontest = "subs_in_window_active";
	qmv.addons.apsubs.code = "qmad.apsubs=new Object();if(qmad.bvis.indexOf(\"qm_apsubs(b.cdiv,o);\")==-1)qmad.bvis+=\"qm_apsubs(b.cdiv,o);\";;function qm_apsubs(a){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.apsubs)&&!z[\"on\"+qm_index(a)])return;if(!a.settingsid){var v=a;while(!qm_a(v))v=v[qp];a.settingsid=v.id;}var ss=qmad[a.settingsid];if(!ss)return;if(!ss.subs_in_window_active)return;var wh=qm_get_doc_wh();var sxy=qm_get_doc_scrollxy();var xy=qm_get_offset(a);var c1=a.offsetWidth+xy[0];var c2=wh[0]+sxy[0];if(c1>c2){a.style.left=(parseInt(a.style.left)-(c1-c2))+\"px\";if(a.hasshadow)a.hasshadow.style.left=(parseInt(a.hasshadow.style.left)-(c1-c2))+\"px\";if(a.hasselectfix)a.hasselectfix.style.left=(parseInt(a.hasselectfix.style.left)-(c1-c2))+\"px\";}c1=a.offsetHeight+xy[1];c2=wh[1]+sxy[1];if(c1>c2){a.style.top=(parseInt(a.style.top)-(c1-c2))+\"px\";if(a.hasshadow)a.hasshadow.style.top=(parseInt(a.hasshadow.style.top)-(c1-c2))+\"px\";if(a.hasselectfix)a.hasselectfix.style.top=(parseInt(a.hasselectfix.style.top)-(c1-c2))+\"px\";}};function qm_get_offset(obj){var x=0;var y=0;do{x+=obj.offsetLeft;y+=obj.offsetTop;}while(obj=obj.offsetParent)return new Array(x,y);};function qm_get_doc_scrollxy(){var sy=0;var sx=0;if((sd=document.documentElement)&&(sd=sd.scrollTop))sy=sd;else  if(sd=document.body.scrollTop)sy=sd;if((sd=document.documentElement)&&(sd=sd.scrollLeft))sx=sd;else  if(sd=document.body.scrollLeft)sx=sd;return new Array(sx,sy);};function qm_get_doc_wh(){db=document.body;var w=0;var h=0;if(tval=window.innerHeight){h=tval;w=window.innerWidth;}else  if((e=document.documentElement)&&(e=e.clientHeight)){h=e;w=document.documentElement.clientWidth;}else  if(e=db.clientHeight){if(!h)h=e;if(!w)w=db.clientWidth;}return new Array(w,h);}";
	

	qmv.addons.pointer = new Object();
	qmv.addons.pointer.compat = "fade,hoverfill,bump_effect,ritem,sopen,apsubs,over_select,ibcss,item_bullets,tabscss,tabs,slide_effect,merge_effect,match_widths,round_corners,drop_shadow,image,box_effect";
	qmv.addons.pointer.desc = "Follow Pointer";
	qmv.addons.pointer.ontest = "pointer_main_image|pointer_sub_image";
	qmv.addons.pointer.code = "qmad.br_safari=navigator.userAgent.indexOf(\"afari\")+1;qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;if(!qmad.pointer&&!qmad.br_oldnav){qmad.pointer=new Object();if(window.attachEvent)window.attachEvent(\"onload\",qm_pointer_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_pointer_init,1);if(window.attachEvent)document.attachEvent(\"onmouseover\",qm_pointer_hide);else  if(window.addEventListener)document.addEventListener(\"mouseover\",qm_pointer_hide,false);};function qm_pointer_init(e,spec){var q=qmad.pointer;var a;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(spec&&spec!=i))continue;var ss=qmad[a.id];if(ss&&(ss.pointer_main_image||ss.pointer_sub_image)){q.mimg=ss.pointer_main_image;q.mimgw=ss.pointer_main_image_width;if(!q.mimgw)q.mimgw=0;q.mimgh=ss.pointer_main_image_height;if(!q.mimgh)q.mimgh=0;q.malign=ss.pointer_main_align;if(!q.malign)q.malign=\"top-or-left\";q.mox=ss.pointer_main_off_x;if(!q.mox)q.mox=0;q.moy=ss.pointer_main_off_y;if(!q.moy)q.moy=0;q.simg=ss.pointer_sub_image;q.simgw=ss.pointer_sub_image_width;if(!q.mimgw)q.simgw=0;q.simgh=ss.pointer_sub_image_height;if(!q.mimgh)q.mimgh=0;q.salign=ss.pointer_sub_align;if(!q.salign)q.salign=\"top-or-left\";q.sox=ss.pointer_sub_off_x;if(!q.sox)q.sox=0;q.soy=ss.pointer_sub_off_y;if(!q.soy)q.soy=0;qm_pointer_add(a,\"m\");var at=a.getElementsByTagName(\"DIV\");for(var i=0;i<at.length;i++)qm_pointer_add(at[i],\"s\");}i++;}};function qm_pointer_add(a,type){var q=qmad.pointer;var img=q[type+\"img\"];if(a.attachEvent)a.attachEvent(\"onmousemove\",qm_pointer_move);else  if(a.addEventListener)a.addEventListener(\"mousemove\",qm_pointer_move,1);if(!img)return;var sp=document.createElement(\"SPAN\");sp.style.position=\"absolute\";sp.style.visibility=\"hidden\";sp.style.zIndex=9;if(a.ch)sp.style.top=(-q[type+\"imgh\"]+q[type+\"oy\"])+\"px\";else sp.style.left=(-q[type+\"imgw\"]+q[type+\"ox\"])+\"px\";if(q[type+\"align\"]==\"bottom-or-right\")sp.pointerbr=1;sp.pointerox=q[type+\"ox\"];sp.pointeroy=q[type+\"oy\"];sp.innerHTML='<img style=\"position:absolute;\" src=\"'+img+'\"  width='+q[type+\"imgw\"]+' height='+q[type+\"imgh\"]+'>';sp=a.appendChild(sp);a.haspointer=sp;};function qm_pointer_hide(){var q=qmad.pointer;if(q.lastm&&a!=q.lastm){q.lastm.style.visibility=\"hidden\";q.lastm=null;}};function qm_pointer_move(e){var q=qmad.pointer;e=e||window.event;targ=e.srcElement||e.target;while(targ.tagName!=\"DIV\")targ=targ[qp];if(q.lastm&&a!=q.lastm){q.lastm.style.visibility=\"hidden\";q.lastm=null;}var a;if(a=targ.haspointer){if(a.style.visibility!=\"inherit\")a.style.visibility=\"inherit\";var x=e.clientX;var y=e.clientY;var oxy=qm_pointer_get_offsets(targ);var sxy=qm_get_doc_scrollxy();if(targ.ch){a.style.left=(x-oxy[0]+sxy[0]+a.pointerox)+\"px\";if(a.pointerbr)a.style.top=(targ.offsetHeight+a.pointeroy)+\"px\";}else {a.style.top=(y-oxy[1]+sxy[1]+a.pointeroy)+\"px\";if(a.pointerbr)a.style.left=(targ.offsetWidth+a.pointerox)+\"px\";}q.lastm=a;}};function qm_get_doc_scrollxy(){var sy=0;var sx=0;if((sd=document.documentElement)&&(sd=sd.scrollTop))sy=sd;else  if(sd=document.body.scrollTop)sy=sd;if((sd=document.documentElement)&&(sd=sd.scrollLeft))sx=sd;else  if(sd=document.body.scrollLeft)sx=sd;return new Array(sx,sy);};function qm_pointer_get_offsets(a){var x=0;var y=0;while(a){x+=a.offsetLeft;y+=a.offsetTop;a=a.offsetParent;}return new Array(x,y);}";


	qmv.addons.box_effect = new Object();
	qmv.addons.box_effect.compat = "fade,hoverfill,ritem,sopen,apsubs,over_select,ibcss,item_bullets,tabscss,tabs,match_widths,round_corners,drop_shadow,image,box_effect,pointer";
	qmv.addons.box_effect.desc = "Box Animation";
	qmv.addons.box_effect.ontest = "box_animation_frames";
	qmv.addons.box_effect.code = "qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_navigator&&qmad.br_version<7.1;qmad.br_ie=window.showHelp;qmad.br_mac=navigator.userAgent.indexOf(\"Mac\")+1;qmad.br_old_safari=navigator.userAgent.indexOf(\"afari\")+1&&!window.XMLHttpRequest;qmad.box_off=(qmad.br_mac&&qmad.br_ie)||qmad.br_old_safari;if(!qmad.box){qmad.box=new Object();if(qmad.bvis.indexOf(\"qm_box_a(b.cdiv);\")==-1)qmad.bvis+=\"qm_box_a(b.cdiv);\";if(qmad.bhide.indexOf(\"qm_box_a(a,1);\")==-1)qmad.bhide+=\"qm_box_a(a,1);\";if(window.attachEvent)document.attachEvent(\"onmouseover\",qm_box_hide);else  if(window.addEventListener)document.addEventListener(\"mouseover\",qm_box_hide,false);};function qm_box_a(a,hide){var z;if((a.style.visibility==\"inherit\"&&!hide)||(qmad.box_off)||((z=window.qmv)&&(z=z.addons)&&(z=z.box_effect)&&!z[\"on\"+qm_index(a)]))return;var ss;if(!a.settingsid){var v=a;while((v=v.parentNode)){if(v.className.indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];if(!ss)return;if(!ss.box_animation_frames)return;qm_th=0;var steps=ss.box_animation_frames;var b=new Object();b.obj=a;b.accelerator=ss.box_accelerator;if(!b.accelerator)b.accelerator=0;b.position=ss.box_position;if(!b.position)b.position=\"center\";if(!a.hasbox){var s=document.createElement(\"SPAN\");s.className=\"qmbox\";s.style.display=\"block\";s.style.position=\"absolute\";s.style.top=a.offsetTop+\"px\";s.style.left=a.offsetLeft+\"px\";s.style.fontSize=\"1px\";s.style.lineHieght=\"0px\";s=a[qp].appendChild(s);a.hasbox=s;}b.stepx=a.offsetWidth/steps;b.stepy=a.offsetHeight/steps;if(hide){b.growx=a.hasbox.offsetWidth;b.growy=a.hasbox.offsetHeight;b.ishide=true;}else {b.growx=0;b.growy=0;}b.fixsize=2;x2(\"qmfh\",a,1);if(a.hasshadow)x2(\"qmfh\",a.hasshadow,1);a.hasbox.style.visibility=\"visible\";qm_box_ai(qm_box_am(b,hide),hide);};function qm_box_ai(id,hide){var a=qmad.box[\"_\"+id];if(!a||!a.obj.hasbox)return;var box=a.obj.hasbox;var sub=a.obj;a.stepy+=a.accelerator;a.stepx+=a.accelerator;var go=false;if(!hide){a.growx+=a.stepx;a.growy+=a.stepy;if(a.growx<sub.offsetWidth){go=true;box.style.width=parseInt(a.growx)+\"px\";qm_box_position_it(box,a);}else box.style.width=(sub.offsetWidth-a.fixsize)+\"px\";if(a.growy<sub.offsetHeight){go=true;box.style.height=parseInt(a.growy)+\"px\";}else box.style.height=(sub.offsetHeight-a.fixsize)+\"px\";}else {a.growx-=a.stepx;a.growy-=a.stepy;if(a.growx>0){go=true;box.style.width=parseInt(a.growx)+\"px\";qm_box_position_it(box,a);}else box.style.width=0+\"px\";if(a.growy>0){go=true;box.style.height=parseInt(a.growy)+\"px\";}else box.style.height=0+\"px\";}if(go){a.timer=setTimeout(\"qm_box_ai(\"+id+\",\"+hide+\")\",10);}else {if(!hide)qm_box_position_it(box,a,1);x2(\"qmfh\",sub);if(sub.hasshadow)x2(\"qmfh\",sub.hasshadow);box.style.visibility=\"hidden\";}};function qm_box_position_it(box,a,def){if(a.position==\"center\"){box.style.left=parseInt((a.obj.offsetWidth-box.offsetWidth)/2)+a.obj.offsetLeft+\"px\";box.style.top=parseInt((a.obj.offsetHeight-box.offsetHeight)/2)+a.obj.offsetTop+\"px\";}else {if(a.position==\"top\"){box.style.left=parseInt((a.obj.offsetWidth-box.offsetWidth)/2)+a.obj.offsetLeft+\"px\";box.style.top=a.obj.offsetTop+\"px\";}else  if(a.position==\"left\"){box.style.left=a.obj.offsetLeft+\"px\";box.style.top=parseInt((a.obj.offsetHeight-box.offsetHeight)/2)+a.obj.offsetTop+\"px\";}}};function qm_box_hide(){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.box_effect)&&!qmv.preview_mode)return;var k;for(k in qmad.box){var a;if((a=qmad.box[k]).obj){if(!a.ishide&&a.timer){clearTimeout(a.timer);a.timer=null;qm_box_a(a.obj,1);}}}};function qm_box_am(obj,hide){var k;for(k in qmad.box){if(qmad.box[k]&&obj.obj==qmad.box[k].obj){if(qmad.box[k].timer){clearTimeout(qmad.box[k].timer);qmad.box[k].timer=null;}qmad.box[k]=null;}}var i=0;while(qmad.box[\"_\"+i])i++;qmad.box[\"_\"+i]=obj;return i;}";
	


	qmv.addons.ritem = new Object();
	qmv.addons.ritem.compat = "fade,hoverfill,bump_effect,box_effect,pointer,sopen,apsubs,over_select,ibcss,item_bullets,tabs,tabscss,slide_effect,merge_effect,match_widths,round_corners,drop_shadow,keyboard,image";
	qmv.addons.ritem.desc = "Rounded Items";
	qmv.addons.ritem.ontest = "ritem_size";
	qmv.addons.ritem.code = "qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav6=qmad.br_navigator&&qmad.br_version<7;qmad.br_strict=(dcm=document.compatMode)&&dcm==\"CSS1Compat\";qmad.br_ie=window.showHelp;qmad.str=(qmad.br_ie&&!qmad.br_strict);if(!qmad.br_oldnav6){if(!qmad.ritem){qmad.ritem=new Object();if(qmad.bvis.indexOf(\"qm_ritem_a(b.cdiv);\")==-1){qmad.bvis+=\"qm_ritem_a(b.cdiv);\";qmad.bhide+=\"qm_ritem_a_hide(a);\";}if(window.attachEvent)window.attachEvent(\"onload\",qm_ritem_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_ritem_init,1);var ca=\"cursor:pointer;\";if(qmad.br_ie)ca=\"cursor:hand;\";var wt='<style type=\"text/css\">.qmvritemmenu{}';wt+=\".qmmc .qmritem span{\"+ca+\"}\";document.write(wt+'</style>');}};function qm_ritem_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.ritem)&&(!z[\"on\"+qmv.id]&&z[\"on\"+qmv.id]!=undefined&&z[\"on\"+qmv.id]!=null))return;qm_ts=1;var q=qmad.ritem;var a,b,r,sx,sy;z=window.qmv;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[a.id];if(ss&&ss.ritem_size){q.size=ss.ritem_size;q.apply=ss.ritem_apply;if(!q.apply)q.apply=\"main\";q.angle=ss.ritem_angle_corners;q.corners_main=ss.ritem_main_apply_corners;if(!q.corners_main||q.corners_main.length<4)q.corners_main=new Array(true,1,1,1);q.corners_sub=ss.ritem_sub_apply_corners;if(!q.corners_sub||q.corners_sub.length<4)q.corners_sub=new Array(true,1,1,1);q.sactive=false;if(ss.ritem_show_on_actives)q.sactive=true;q.opacity=ss.ritem_opacity;if(q.opacity&&q.opacity!=1){var addf=\"\";if(window.showHelp)addf=\"filter:alpha(opacity=\"+(q.opacity*100)+\");\";q.opacity=\"opacity:\"+q.opacity+\";\"+addf;}else q.opacity=\"\";qm_ritem_add_rounds(a);}}};function qm_ritem_a_hide(a){if(a.idiv.hasritem&&qmad.ritem.sactive)a.idiv.hasritem.style.visibility=\"hidden\";};function qm_ritem_a(a){if(a)qmad.ritem.a=a;else a=qmad.ritem.a;if(a.idiv.hasritem&&qmad.ritem.sactive)a.idiv.hasritem.style.visibility=\"inherit\";if(a.ritemfixed)return;var aa=a.childNodes;for(var i=0;i<aa.length;i++){var b;if(b=aa[i].hasritem){if(!aa[i].offsetWidth){setTimeout(\"qm_ritem_a()\",10);return;}else {b.style.top=\"0px\";b.style.left=\"0px\";b.style.width=aa[i].offsetWidth+\"px\";a.ritemfixed=1;}}}};function qm_ritem_add_rounds(a){var q=qmad.ritem;var atags,ist,isd,isp,gom,gos;if(q.apply.indexOf(\"titles\")+1)ist=true;if(q.apply.indexOf(\"dividers\")+1)isd=true;if(q.apply.indexOf(\"parents\")+1)isp=true;if(q.apply.indexOf(\"sub\")+1)gos=true;if(q.apply.indexOf(\"main\")+1)gom=true;atags=a.childNodes;for(var k=0;k<atags.length;k++){if((atags[k].tagName!=\"SPAN\"&&atags[k].tagName!=\"A\")||(q.sactive&&!atags[k].cdiv))continue;var ism=qm_a(atags[k][qp]);if((isd&&atags[k].className.indexOf(\"qmdivider\")+1)||(ist&&atags[k].className.indexOf(\"qmtitle\")+1)||(gom&&ism&&atags[k].tagName==\"A\")||(atags[k].className.indexOf(\"qmrounditem\")+1)||(gos&&!ism&&atags[k].tagName==\"A\")||(isp&&atags[k].cdiv)){var f=document.createElement(\"SPAN\");f.className=\"qmritem\";f.setAttribute(\"qmvbefore\",1);var fs=f.style;fs.position=\"absolute\";fs.display=\"block\";fs.top=\"0px\";fs.left=\"0px\";fs.width=atags[k].offsetWidth+\"px\";if(q.sactive&&atags[k].cdiv.style.visibility!=\"inherit\")fs.visibility=\"hidden\";var size=q.size;q.mid=parseInt(size/2);q.ps=new Array(size+1);var t2=0;q.osize=q.size;if(!q.angle){for(var i=0;i<=size;i++){if(i==q.mid)t2=0;q.ps[i]=t2;t2+=Math.abs(q.mid-i)+1;}q.osize=1;}var fi=\"\";var ctype=\"main\";if(!ism)ctype=\"sub\";for(var i=0;i<size;i++)fi+=qm_ritem_get_span(size,i,1,ctype);var cn=atags[k].cloneNode(true);var cns=cn.getElementsByTagName(\"SPAN\");for(var l=0;l<cns.length;l++){if(cns[l].getAttribute(\"isibulletcss\")||cns[l].getAttribute(\"isibullet\"))cn.removeChild(cns[l]);}fi+='<span class=\"qmritemcontent\" style=\"display:block;border-style:solid;border-width:0px 1px 0px 1px;'+q.opacity+'\">'+cn.innerHTML+'</span>';for(var i=size-1;i>=0;i--)fi+=qm_ritem_get_span(size,i,null,ctype);f.innerHTML=fi;f=atags[k].insertBefore(f,atags[k].firstChild);atags[k].hasritem=f;}if(atags[k].cdiv)new qm_ritem_add_rounds(atags[k].cdiv);}};function qm_ritem_get_span(size,i,top,ctype){var q=qmad.ritem;var mlmr;if(i==0){var mo=q.ps[size]+q.mid;if(q.angle)mo=size-i;var fs=\"\";if(qmad.str)fs=\"&nbsp;\";mlmr=qm_ritem_get_corners(mo,null,top,ctype);return '<span style=\"border-width:1px 0px 0px 0px;border-style:solid;display:block;font-size:1px;overflow:hidden;line-height:0px;height:0px;margin-left:'+mlmr[0]+'px;margin-right:'+mlmr[1]+'px;'+q.opacity+'\">'+fs+'</span>';}else {var md=size-(i);var ih=1;var bs=1;if(!q.angle){if(i>=q.mid)ih=Math.abs(q.mid-i)+1;else {bs=Math.abs(q.mid-i)+1;md=q.ps[size-i]+q.mid;}if(top)q.osize+=ih;}mlmr=qm_ritem_get_corners(md,bs,top,ctype);return '<span style=\"border-width:0px '+mlmr[3]+'px 0px '+mlmr[2]+'px;border-style:solid;display:block;overflow:hidden;font-size:1px;line-height:0px;height:'+ih+'px;margin-left:'+mlmr[0]+'px;margin-right:'+mlmr[1]+'px;'+q.opacity+'\"></span>';}};function qm_ritem_get_corners(mval,bval,top,ctype){var q=qmad.ritem;var ml=mval;var mr=mval;var bl=bval;var br=bval;if(top){if(!q[\"corners_\"+ctype][0]){ml=0;bl=1;}if(!q[\"corners_\"+ctype][1]){mr=0;br=1;}}else {if(!q[\"corners_\"+ctype][2]){mr=0;br=1;}if(!q[\"corners_\"+ctype][3]){ml=0;bl=1;}}return new Array(ml,mr,bl,br);}";


	qmv.addons.sopen = new Object();
	qmv.addons.sopen.compat = "all";
	qmv.addons.sopen.desc = "Show Subs Onload";
	qmv.addons.sopen.noupdate = 1;
	qmv.addons.sopen.ontest = "showload_active";	
	qmv.addons.sopen.code = "if(!qmad.sopen){qmad.sopen=new Object();qmad.sopen.log=new Array();if(window.attachEvent)window.attachEvent(\"onload\",qm_sopen_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_sopen_init,1);};function qm_sopen_init(e,go){if(window.qmv)return;if(!go){setTimeout(\"qm_sopen_init(null,1)\",10);return;}var auto_close=false;var i;var ql=qmad.sopen.log;for(i=0;i<10;i++){var a;if(a=document.getElementById(\"qm\"+i)){var ss=qmad[a.id];if(ss&&!ss.showload_active)continue;if(ss&&ss.showload_auto_close)auto_close=true;var dd=a.getElementsByTagName(\"DIV\");for(var j=0;j<dd.length;j++){if(dd[j].idiv&&dd[j].idiv.className.indexOf(\"qm-startopen\")+1){ql.push(dd[j].idiv);var f=dd[j][qp];if(!qm_a(f)){var b=false;for(var k=0;k<ql.length;k++){if(ql[k]==f.idiv)ql[k]=null;}ql.push(f.idiv);f=f[qp];}}}}}var se=0;var sc=0;if(qmad.tree){se=qmad.tree.etype;sc=qmad.tree.ctype;qmad.tree.etype=0;qmad.tree.ctype=0;}for(i=ql.length-1;i>=0;i--){if(ql[i]){qm_oo(new Object(),ql[i],1);if(!auto_close)qm_li=null;}}if(qmad.tree){qmad.tree.etype=se;qmad.tree.ctype=sc;}}";


	qmv.addons.sopen_auto = new Object();
	qmv.addons.sopen_auto.compat = "all";
	qmv.addons.sopen_auto.desc = "Persistent States With Auto Open Subs Option";
	qmv.addons.sopen_auto.noupdate = 1;
	qmv.addons.sopen_auto.ontest = "sopen_auto_enabled";	
	qmv.addons.sopen_auto.code = "if(!qmad.sopen_auto){qmad.sopen_auto=new Object();qmad.sopen_auto.log=new Array();if(window.attachEvent)window.attachEvent(\"onload\",qm_sopen_auto_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_sopen_auto_init,1);};function qm_sopen_auto_init(e,go){if(window.qmv)return;if(!go){setTimeout(\"qm_sopen_auto_init(null,1)\",10);return;}var i;var ql=qmad.sopen_auto.log;for(i=0;i<10;i++){var ss=qmad[\"qm\"+i];if(!ss||!ss.sopen_auto_enabled)continue;var curl=unescape(window.location.href).toLowerCase();curl=qm_sopen_auto_clean(curl);var a;if(a=document.getElementById(\"qm\"+i)){var dd=a.getElementsByTagName(\"A\");for(var j=0;j<dd.length;j++){var aurl=unescape(dd[j].getAttribute(\"href\",1)).toLowerCase();aurl=qm_sopen_auto_clean(aurl);loc=curl.length-aurl.length;if(aurl&&aurl!=\"#\"&&loc>-1&&curl.indexOf(aurl)+1){var wa=dd[j];if(wa.cdiv)wa=wa.cdiv;while(!qm_a(wa)){if(wa.tagName==\"DIV\"){if(wa.idiv){if(ss.sopen_auto_show_subs)ql.push(wa.idiv);x2(\"qmpersistent\",wa.idiv,1);}}else  if(wa.tagName==\"A\")x2(\"qmpersistent\",wa,1);wa=wa[qp];}}}}}var se=0;var sc=0;if(qmad.tree){se=qmad.tree.etype;sc=qmad.tree.ctype;qmad.tree.etype=0;qmad.tree.ctype=0;}for(i=ql.length-1;i>=0;i--){if(ql[i]){qm_oo(new Object(),ql[i],1);qm_li=null;}}if(qmad.tree){qmad.tree.etype=se;qmad.tree.ctype=sc;}};function qm_sopen_auto_clean(url){url=url.replace(/\\:/g,\"\");url=url.replace(\"localhost\",\"\");url=url.replace(\"file\",\"\");url=url.replace(/\\\\/g,\"\");url=url.replace(/\\//g,\"\");url=url.replace(/\\./g,\"\");return url;}";


	qmv.addons.hoverfill = new Object();
	qmv.addons.hoverfill.compat = "fade,ritem,sopen_auto,sopen,box_effect,pointer,apsubs,over_selects,ibcss,item_bullets,tabs_css,tabs,bump_effect,slide_effect,merge_effect,match_widths,round_corners,drop_shadow,image,keyboard";
	qmv.addons.hoverfill.desc = "Hover Fill Item Effect";
	qmv.addons.hoverfill.ontest = "hoverfill_main_type|hoverfill_sub_type";
	qmv.addons.hoverfill.code = "qmad.br_ie=window.showHelp;qmad.br_navigator=navigator.userAgent.indexOf(\"Netscape\")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav6=qmad.br_navigator&&qmad.br_version<7.2;if(!qmad.br_oldnav6){if(!qmad.hoverfill){qmad.hoverfill=new Object();qmad.hoverfill.track=new Object();qmad.hoverfill.tracktimer=new Object();}if(qmad.bhide.indexOf(\"qm_hoverfill_active(new Object(),a,1);\")==-1){qmad.bhide+=\"qm_hoverfill_active(new Object(),a,1);\";if(window.attachEvent)window.attachEvent(\"onload\",qm_hoverfill_init);else  if(window.addEventListener)window.addEventListener(\"load\",qm_hoverfill_init,1);if(document.attachEvent)document.attachEvent(\"onmouseover\",qm_hoverfill_hover_off);else  if(window.addEventListener)document.addEventListener(\"mouseover\",qm_hoverfill_hover_off,false);}};function qm_hoverfill_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.hoverfill)&&(!z[\"on\"+qmv.id]&&z[\"on\"+qmv.id]!=undefined&&z[\"on\"+qmv.id]!=null))return;qm_ts=1;var q=qmad.hoverfill;for(i=0;i<10;i++){if(!(a=document.getElementById(\"qm\"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[a.id];if(ss&&(ss.hoverfill_main_type||ss.hoverfill_sub_type)){qm_hoverfill_init_items(a,ss);}}};function qm_hoverfill_init_items(a,ss){var q=qmad.hoverfill;var aa,pf;var applyto=\"all\";if(ss.hoverfill_apply_to)applyto=ss.hoverfill_apply_to;aa=a.getElementsByTagName(\"A\");for(var j=0;j<aa.length;j++){if((applyto==\"parent\"&&!aa[j].cdiv)||(applyto==\"non-parent\"&&aa[j].cdiv))continue;if(window.attachEvent)aa[j].attachEvent(\"onmouseover\",qm_hoverfill_active);else  if(window.addEventListener)aa[j].addEventListener(\"mouseover\",qm_hoverfill_active,false);if(qm_a(aa[j][qp]))pf=\"main\";else pf=\"sub\";var type;if((type=ss[\"hoverfill_\"+pf+\"_type\"])&&type!=\"none\"){var ofx=ss[\"hoverfill_\"+pf+\"_offset_width\"];if(!ofx)ofx=0;var ofy=ss[\"hoverfill_\"+pf+\"_offset_height\"];if(!ofy)ofy=0;var fss=ss[\"hoverfill_\"+pf+\"_fade_type_steps\"];if(!fss)fss=20;var dir=ss[\"hoverfill_\"+pf+\"_direction\"];if(!dir)dir=\"up\";var step=ss[\"hoverfill_\"+pf+\"_step_size\"];if(!step)step=1;var ns=document.createElement(\"SPAN\");ns.style.display=\"none\";ns.style.position=\"absolute\";ns.style.fontSize=\"1px\";ns.style.overFlow=\"hidden\";if(aa[j].cdiv)ns.className=\"qmhoverfill qmhparent\";else ns.className=\"qmhoverfill\";ns.ishoverfill=1;ns.hfowner=aa[j];ns.noselect=1;aa[j].style.position=\"relative\";aa[j][qp].insertBefore(ns,aa[j]);aa[j].hfobject=ns;aa[j].hfdir=dir;aa[j].hftype=type;aa[j].hfstep=step;aa[j].hffadein=ss[\"hoverfill_\"+pf+\"_fade_in\"];aa[j].hffss=fss;aa[j].hffc=0;aa[j].hfox=ofx;aa[j].hfoy=ofy;}}};function qm_hoverfill_setfade(a,val){if(qmad.br_ie)a.style.filter=\"alpha(opacity=\"+val*100+\")\";else a.style.opacity=val;};function qm_hoverfill_active(e,a,hide,force){e=e||window.event;if(!a){a=e.srcElement||e.target;while(a.tagName!=\"A\")a=a[qp];}if(!hide){var la=qmad.hoverfill.lasthl;if(la==a)return;if(la&&la.hfobject.style.display==\"block\"&&la.className.indexOf(\"qmactive\")==-1&&la!=a){qm_hoverfill_hide_animate(la);qmad.hoverfill.lasthl=null;}var b;if((b=a.hfobject)&&!b.hfon&&b[qp]&&a[qp]){var dir=a.hfdir;var type=a.hftype;b.style.display=\"block\";if(type==\"grow\"){if(dir==\"up\"||dir==\"down\"){b.style.width=(a.offsetWidth+a.hfox)+\"px\";b.style.height=\"0px\";b.style.left=a.offsetLeft+\"px\";if(dir==\"up\")b.style.top=(a.offsetTop+a.offsetHeight+a.hfoy)+\"px\";else b.style.top=a.offsetTop+\"px\";if(a.hffadein)a.hffs=(1/(a.offsetHeight/a.hfstep));}else  if(dir==\"right\"||dir==\"left\"){b.style.height=(a.offsetHeight+a.hfoy)+\"px\";b.style.width=\"0px\";b.style.top=a.offsetTop+\"px\";if(dir==\"left\")b.style.left=(a.offsetLeft+a.offsetWidth+a.hfox)+\"px\";else b.style.left=a.offsetLeft+\"px\";if(a.hffadein)a.hffs=(1/(a.offsetWidth/a.hfstep));}else  if(dir==\"center\"){b.style.height=\"0px\";b.style.width=\"0px\";b.style.top=(a.offsetTop+parseInt((a.offsetHeight+a.hfoy)/2))+\"px\";b.style.left=(a.offsetLeft+parseInt((a.offsetWidth+a.hfox)/2))+\"px\";a.hfstep=1;if(a.hfstep==4)a.hfstep=2;if(a.hfstep>5)a.hfstep=3;if(a.offsetWidth>a.offsetHeight){b.chstep=(a.hfstep*2);b.cwstep=parseInt(b.chstep*((a.offsetWidth+a.hfox)/(a.offsetHeight+a.hfoy)));b.ctstep=a.hfstep;b.clstep=parseInt(b.cwstep/2);if(a.hffadein)a.hffs=(1/(((a.offsetHeight+a.hfoy)/2)/b.ctstep));}else {b.cwstep=(a.hfstep*2);b.chstep=parseInt(b.chstep*((a.offsetHeight+a.hfoy)/(a.offsetWidth+a.hfox)));b.clstep=a.hfstep;b.ctstep=parseInt(b.chstep/2);if(a.hffadein)a.hffs=(1/(((a.offsetWidth+a.hfox)/2)/b.clstep));}}}else  if(type==\"fade\"){b.style.height=(a.offsetHeight+a.hfoy)+\"px\";b.style.width=(a.offsetWidth+a.hfox)+\"px\";b.style.top=a.offsetTop+\"px\";b.style.left=a.offsetLeft+\"px\";a.hffs=(1/a.hffss);}qm_hoverfill_clear_timer(a);qm_hoverfill_animate(qm_hoverfill_get_tracking_id(b),false,force);qmad.hoverfill.lasthl=a;}}else {if(a.idiv){qm_hoverfill_hide_animate(a.idiv);}}};function qm_hoverfill_hide_animate(a){qm_hoverfill_clear_timer(a);if(a.hfobject)qm_hoverfill_animate(qm_hoverfill_get_tracking_id(a.hfobject),1);};function qm_hoverfill_animate(id,hide,force){var go=false;var hf=qmad.hoverfill.track[\"a\"+id];if(!hf||!hf[qp])return;var atag=hf.hfowner;if(!atag[qp])return;var type=atag.hftype;var dir=atag.hfdir;var step=atag.hfstep;var clstep=hf.clstep;var ctstep=hf.ctstep;var cwstep=hf.cwstep;var chstep=hf.chstep;if(hide){step=-step;if(type==\"grow\"&&dir==\"center\"){var clstep=-clstep;var ctstep=-ctstep;var cwstep=-cwstep;var chstep=-chstep;}}var a1,a2,a3,a4;if(type==\"grow\"){if(dir==\"up\"||dir==\"left\"){var p1=\"offsetTop\";var p2=\"offsetHeight\";var p3=\"height\";var p4=\"top\";var p5=atag.hfoy;if(dir==\"left\"){p1=\"offsetLeft\";p2=\"offsetWidth\";p3=\"width\";p4=\"left\";p5=atag.hfox;}a1=atag[p1];a2=atag[p2];if(((!hide&&(hf[p1]-step)>a1)||(hide&&(hf[p1]-step)<(a1+a2+p5)))&&!force){a1=parseInt(hf.style[p4]);a2=parseInt(hf.style[p3]);hf.style[p4]=(a1-step)+\"px\";hf.style[p3]=(a2+step)+\"px\";go=true;}else {if(!hide){hf.hfon=true;hf.style[p4]=a1+\"px\";hf.style[p3]=(a2+p5)+\"px\";}else hf.style[p3]=\"0px\";}}else  if(dir==\"down\"||dir==\"right\"){var p1=\"offsetHeight\";var p2=\"offsetTop\";var p3=\"height\";var p5=atag.hfoy;if(dir==\"right\"){p1=\"offsetWidth\";p2=\"offsetLeft\";p3=\"width\";p5=atag.hfox;}a1=atag[p2];a2=atag[p1];if(((!hide&&(hf[p1]+step)<(a2+p5))||(hide&&(hf[p1]+step)>0))&&!force){hf.style[p3]=(parseInt(hf.style[p3])+step)+\"px\";go=true;}else {if(!hide){hf.hfon=true;hf.style[p3]=(a2+p5)+\"px\";}else hf.style[p3]=\"0px\";}}else  if(dir==\"center\"){a1=atag.offsetTop;a2=parseInt((atag.offsetHeight+atag.hfoy)/2);if(((!hide&&(hf.offsetTop-ctstep)>a1)||(hide&&(hf.offsetTop-ctstep)<(a1+a2)))&&!force){a1=parseInt(hf.style.top);a2=parseInt(hf.style.height);a3=parseInt(hf.style.left);a4=parseInt(hf.style.width);hf.style.top=(a1-ctstep)+\"px\";hf.style.left=(a3-clstep)+\"px\";hf.style.height=(a2+chstep)+\"px\";hf.style.width=(a4+cwstep)+\"px\";go=true;}else {if(!hide){a1=atag.offsetTop;a2=atag.offsetHeight+atag.hfoy;a3=atag.offsetLeft;a4=atag.offsetWidth+atag.hfox;hf.style.top=a1+\"px\";hf.style.left=a3+\"px\";hf.style.height=a2+\"px\";hf.style.width=a4+\"px\";hf.hfon=true;}else {hf.style.height=\"0px\";hf.style.width=\"0px\";}}}}else  if(type==\"fade\"){if(((!hide&&atag.hffc<1)||(hide&&atag.hffc>0))&&!force){go=true;}else {if(!hide)hf.hfon=true;}}if(atag.hffs){if(!atag.hffc)atag.hffc=0;if(!hide){atag.hffc+=atag.hffs;if(atag.hffc>1||!go)atag.hffc=1;}else {atag.hffc -=atag.hffs;if(atag.hffc<.001||!go)atag.hffc=0;}qm_hoverfill_setfade(hf,atag.hffc);}if(go){qmad.hoverfill.tracktimer[\"a\"+id]=setTimeout(\"qm_hoverfill_animate(\"+id+\",\"+hide+\")\",10);atag.hftrackid=id;hf.hfon=false;}else {qm_hoverfill_clear_timer(atag);if(hide)hf.style.display=\"none\";}};function qm_hoverfill_clear_timer(a){var id;if(id=a.hftrackid){clearTimeout(qmad.hoverfill.tracktimer[\"a\"+id]);qmad.hoverfill.tracktimer[\"a\"+id]=null;qmad.hoverfill.track[\"a\"+id]=null;a.hftrackid=null;}};function qm_hoverfill_get_tracking_id(a){var track=qmad.hoverfill.track;var i=1;while(track[\"a\"+i])i++;track[\"a\"+i]=a;return i;};function qm_hoverfill_hover_off(e,o){var la=qmad.hoverfill.lasthl;if(la&&la.hfobject.style.display==\"block\"&&la.className.indexOf(\"qmactive\")==-1){qm_hoverfill_hide_animate(la);}qmad.hoverfill.lasthl=null;}";

	qmv.addons.fade = new Object();
	qmv.addons.fade.compat = "hoverfill,sopen_auto,sopen,ritem,box_effect,pointer,apsubs,over_select,ibcss,item_bullets,tabscss,tabs,bump_effect,match_widths,round_corners,drop_shadow,tree_menu,keyboard,image";
	qmv.addons.fade.desc = "Sub Menu Fade Animation";
	qmv.addons.fade.ontest = "fade_in_frames|fade_out_frames";
	qmv.addons.fade.code = "if(!qmad.fade){qmad.fade=new Object();qmad.fade.track=new Object();qmad.fade.tracktimer=new Object();if(qmad.bvis.indexOf(\"qm_fade_a(b.cdiv);\")==-1){qmad.bvis+=\"qm_fade_a(b.cdiv);\";qmad.bhide+=\"qm_fade_a(a,1);\";}};function qm_fade_a(a,hide){var z;if((a.style.visibility==\"inherit\"&&!hide)||((z=window.qmv)&&(z=z.addons)&&(z=z.fade)&&!z[\"on\"+qm_index(a)]))return;var ss;if(!a.settingsid){var v=a;while((v=v[qp])){if(v[qc].indexOf(\"qmmc\")+1){a.settingsid=v.id;break;}}}ss=qmad[a.settingsid];var t;var u;if(ss&&((t=ss.fade_in_frames)||(u=ss.fade_out_frames))){if(t==null||t==undefined)t=u;if(u==null||u==undefined)u=t;a.ffinc=1/t;a.ffdec=1/u;if(!hide)a.ffcur=0;else {a.ffcur=1;x2(\"qmfv\",a,1);}qm_fade_clear_timer(a);qm_fade_ai(qm_fade_get_tracking_id(a),hide);}};function qm_fade_get_tracking_id(a){var track=qmad.fade.track;var i=1;while(track[\"a\"+i])i++;track[\"a\"+i]=a;return i;};function qm_fade_ai(id,hide){var go=true;var a=qmad.fade.track[\"a\"+id];if(!hide){a.ffcur+=a.ffinc;if(a.ffcur>1){a.ffcur=1;go=false;}}else {a.ffcur -=a.ffdec;if(a.ffcur<.001){a.ffcur=0;go=false;}}qm_fade_setfade(a,a.ffcur);if(go){qmad.fade.tracktimer[\"a\"+id]=setTimeout(\"qm_fade_ai(\"+id+\",\"+hide+\")\",10);a.fftrackid=id;}else {if(hide)x2(\"qmfv\",a);if(window.showHelp)a.style.removeAttribute(\"filter\");}};function qm_fade_clear_timer(a){var id;if(id=a.fftrackid){clearTimeout(qmad.fade.tracktimer[\"a\"+id]);qmad.fade.tracktimer[\"a\"+id]=null;qmad.fade.track[\"a\"+id]=null;a.fftrackid=null;}};function qm_fade_setfade(a,val){if(qmad.br_ie)a.style.filter=\"alpha(opacity=\"+val*100+\")\";else a.style.opacity=val;}";

	

}




function qmv_get_add_on_code(name)
{
	var i;

	rc = "";
	if (name=="all")
	{
		
		for (i in qmv.addons)
		{
			
			rc += qmv.addons[i].code;

			
		}

	}
	
	return rc;

}







//**********  Visual Tree Component



function qm_vtree_init_styles(is_setbox,is_template)
{


	var a,b;

	if (qmad)
	{

		var ss = qmad.qmvtree;
		var i="qmvtree";

		if (is_setbox)
		{
			var ss = qmad.qmsetbox;
			var i="qmsetbox";
		}
		else if (is_template)
		{

			var ss = qmad.qmvt2;
			var i="qmvt2";
		}


		if(ss && ss.tree_width)
		{
				
			var az = "";
			if (window.showHelp) az = "zoom:1;";

			var wv = '<style type="text/css">#'+i+' a {float:none !important;}#'+i+' div{overflow:hidden;position:relative;display:none;'+az+'padding-top:0px !important;padding-bottom:0px !important;border-top-width:0px !important;border-bottom-width:0px !important;margin-left:0px !important;margin-top:0px !important;}';

				
			var curt = "div ";				
			for (var j=0;j<10;j++)
			{
				var iv = ss.tree_sub_indent;
				if (b = ss["tree_sub_indent"+j])
					iv = b;

					
				wv += '#'+i+' '+curt+'{padding-left:'+iv+'px;}';
				curt += "div ";
			}


			if (b = ss.tree_sub_top_padding)
				wv += '#'+i+' .qmvtreefirsta{margin-top:'+b+'px !important;}';

			if (b = ss.tree_sub_bottom_padding)
				wv += '#'+i+' .qmvtreelasta{margin-bottom:'+b+'px !important;}';

				
			document.write(wv+'</style>');
		
		}

	}

}


function qm_vtree_init(is_setbox,is_template)
{
	
	var q = qmad.qmvtree;
	var ss = qmad.qmvtree;

	if (is_setbox)
	{
		var ss=qmad.qmsetbox;
		var q=qmad.qmsetbox;
	}
	else if (is_template)
	{

		var ss=qmad.qmvt2;
		var q=qmad.qmvt2;
	}


	if (ss && ss.tree_width)
	{	
		
		q.estep = ss.tree_expand_step_size;
		q.cstep = ss.tree_collapse_step_size;
		q.acollapse = ss.tree_auto_collapse;
		q.no_focus = ss.tree_hide_focus_box;

		q.etype = ss.tree_expand_animation;
		q.ctype = ss.tree_collapse_animation;
			
		if (qmad.br_oldnav)
		{
			q.etype=0;
			q.ctype=0;
		}
		
		if (is_setbox)
			qm_vtree_init_items(document.getElementById("qmsetbox"));
		else if (is_template)
			qm_vtree_init_items(document.getElementById("qmvt2"));
		else
			qm_vtree_init_items(document.getElementById("qmvtree"));
	}


}



function qm_vtree_init_items(a,sub)
{
	
	

	var w,b;
	var q = qmad.qmvtree;

	
	
	var first,last,aa;
		
		
	first = null;
	last = null;
		
	aa = a.childNodes;
	for (var j=0;j<aa.length;j++)
	{
		
		if (aa[j].tagName=="A")
		{

			aa[j].qmtree = 1;

			if (!first)
				first = aa[j];
					
			last = aa[j];
			
			
			if (aa[j].cdiv)	
			{
				aa[j].cdiv.ismove = 1;
				aa[j].cdiv.qmtree = 1;
			}
		
		

			aa[j].onclick = qmv_tree_oo;
			aa[j].onmouseover = null;
				
							
			if (q.no_focus)
			{
					
				
				aa[j].onfocus = function()
				{
					this.blur();
				
				};
			}


			if (aa[j].cdiv)
			{
				if (sub)
				{
					
					aa[j].oncontextmenu = function(e)
					{
						e = e || event;
						qmv_show_context(e,'tree_parent',null,this);
						qm_kille(e);
						return false;
						
					}
				}

				new qm_vtree_init_items(aa[j].cdiv,true);

			}


			
			if (aa[j].getAttribute("initshow"))
			{
				qm_arc("qmactive",aa[j],true);
				aa[j].cdiv.style.display = "block";
				aa[j].cdiv.style.visibility = "inherit";

				
				if (aa[j].getAttribute("isfresultsa"))
					qmv_filter_init();
				

			}

			qm_arc("qmvtreefirsta",first);
			qm_arc("qmvtreelasta",last);
							
			
		}
		
		

	}


	
	if (sub)
	{

		qm_arc("qmvtreefirsta",first,true);
		qm_arc("qmvtreelasta",last,true);
	}
		
}



function qm_vtree_item_click(a,close,skip_cancel_event)
{

	

	if (a.idiv.getAttribute("isfilter") && a.style.display!="block")
		qmv_filter_init();
		

	if (a.idiv.getAttribute("isshortcut") && a.style.display!="block")
		qmv_shortcut_init(a);	
	

	if (!a.qmtree) return;

	var q = qmad.qmvtree;
	if (q.timer)
		return;
	
	q.co = new Object();

	var levid = "a"+qm_get_level(a);
	var ex = false;
	var cx = false;	
	
	
	if (qmv.tree_collapse)
	{
		
		var mobj = qm_get_menu(a);
		var ds = mobj.getElementsByTagName("DIV");
		for (var i=0;i<ds.length;i++)
		{
			
			if (ds[i].style.display=="block" && ds[i]!=a)
			{
				var go = true;

				var cp = a[qp];
				while (!qm_a(cp))
				{
					if (ds[i]==cp) go = false;
					cp = cp[qp];
				
				
				}

				if (go)
				{
					cx = true;
					q.co["a"+i] = ds[i];					

					qmv_tree_uo(ds[i],true);
					
				}

			}	

		}
		
	}
	
	
	if (a.style.display=="block")	
	{
		
		cx = true;
		q.co["b"] = a;

		
		var d = a.getElementsByTagName("DIV");
		for (var i=0;i<d.length;i++)
		{

			if (d[i].style.position == "relative")
			{
				q.co["b"+i] = d[i];
				qmv_tree_uo(d[i],true);
			}

		}
		

		a.qmtreecollapse = 1;
		qmv_tree_uo(a,true);

		if (window.qmv_ibullets_hover)
			qmv_ibullets_hover(null,a.idiv);
		
	}
	else
	{
		ex = true;

		a.style.display = "block";
		q.eh = a.offsetHeight;
		a.style.height = "0px";

		qm_arc("qmfv",a,true);
		qm_arc("qmfh",a);

		a.qmtreecollapse = 0;
		q.eo = a;
		
	}
	
	

	qmwait = true;
	qm_vtree_item_expand(ex,cx,levid);



	
	qmv_adjust_setbox_shadow();
	
}




function qm_vtree_item_expand(expand,collapse,levid)
{

	var q = qmad.qmvtree;
	var go = false;
	var cs = 1;
	
	

	if (collapse)
	{

		for (var i in q.co)
		{
			if (!q.co[i]) continue;

			if (!q.co[i].style.height && q.co[i].style.display == "block")
			{
				q.co[i].style.height = (q.co[i].offsetHeight)+"px";
				q.co[i].qmtreeht = parseInt(q.co[i].style.height);
			}
			

			cs = parseInt((q.co[i].offsetHeight/parseInt(q.co[i].qmtreeht))*q.cstep);
			if (q.ctype==1)
				cs = q.cstep-cs+1;
			else if (q.ctype==2)
				cs = cs+1;
			else if (q.ctype==3)
				cs = q.cstep;

			if (q.ctype && parseInt(q.co[i].style.height)-cs>0)
			{

				q.co[i].style.height = parseInt(q.co[i].style.height)-cs+"px";
				go = true;

			}
			else
			{
				q.co[i].style.height = "";
				q.co[i].style.display = "none";
			
				qm_arc("qmfh",q.co[i],true);
				qm_arc("qmfv",q.co[i]);

				
				q.co[i]=null;		
			}
			
			
		}

	}

	if (expand)
	{
		cs = parseInt((q.eo.offsetHeight/q.eh)*q.estep);
		if (q.etype==2)
			cs = q.estep-cs;
		else if (q.etype==1)
			cs = cs+1;
		else if (q.etype==3)
			cs = q.estep;
			
		
		if (q.etype && q.eo.offsetHeight<(q.eh-cs))
		{
			
			q.eo.style.height = parseInt(q.eo.style.height)+cs+"px";
			go = true;
		
		}
		else
		{
			
			q.eo.qmtreeh = q.eo.style.height;
			q.eo.style.height = "";
			
			
			var fs = document.getElementById("qmvi_tree_menu_container");

			var ot = 0;
			var wo = q.eo;
			while (!qm_a(wo))
			{
				ot += wo.offsetTop;
				wo = wo[qp];
			}

			var nsadd = 0;
			var ns;
			if (ns = qmv_lib_get_nextsibling_atag(q.eo))
				nsadd = ns.offsetHeight;


			var pos = ot+q.eo.offsetHeight+nsadd-fs.scrollTop;
			if (pos>fs.offsetHeight)
			{

				

				fs.scrollTop = (pos-fs.offsetHeight)+fs.scrollTop;

			}


			
			//document.getElementById("qmvi_tree_menu_container").scrollTop = 2000000;
			
		}


		
	}

	
	if (go)
	{

		q.timer = setTimeout("qm_vtree_item_expand("+expand+","+collapse+",'"+levid+"')",5);
	}
	else 
	{
		qmwait = false;
		clearTimeout(q.timer);
		q.timer = null;
		
	}

}



function qmv_ibullets_init(is_setbox,is_template)
{
	
	if (!qmad.qmvibullets)
	{
		if (window.attachEvent)
			document.attachEvent("onmouseover",qmv_ibullets_hover_off);
		else if (window.addEventListener)
			document.addEventListener("mouseover",qmv_ibullets_hover_off,false);

		qmad.qmvibullets = new Object();
	}
	
	var q = qmad.qmvibullets;

	var a,b;
	
	if (is_setbox)
		a = document.getElementById("qmsetbox");
	else if (is_template)
		a = document.getElementById("qmvt2");
	else
		a = document.getElementById("qmvtree");
				
	var ss = qmad.qmvtree;
	if (is_setbox)
		ss = qmad.qmsetbox;
	else if (is_template)
	{
		
		ss = qmad.qmvt2;
	}


	

	if (ss && (ss.ibullets_main_image || ss.ibullets_sub_image))
	{	


		q.mimg = ss.ibullets_main_image;
		if (q.mimg)
		{
				
			q.mimg_a = ss.ibullets_main_image_active;
			qmv_ibullets_preload(q.mimg_a);
			q.mimg_h = ss.ibullets_main_image_hover;
			qmv_ibullets_preload(q.mimg_a);

			q.mimgwh = eval("new Array("+ss.ibullets_main_image_width_height+")");
			q.mpos = eval("new Array("+ss.ibullets_main_position+")");
			q.mright = ss.ibullets_main_right;
		}
		
		q.simg = ss.ibullets_sub_image;
		if (q.simg)
		{
			q.simg_a = ss.ibullets_sub_image_active;
			qmv_ibullets_preload(q.simg_a);				
			q.simg_h = ss.ibullets_sub_image_hover;
			qmv_ibullets_preload(q.simg_h);

			q.simgwh = eval("new Array("+ss.ibullets_sub_image_width_height+")");
			q.spos = eval("new Array("+ss.ibullets_sub_position+")");
			q.sright = ss.ibullets_sub_right;
		}
			
		q.type = ss.ibullets_apply_to;

		
		qmv_ibullets_init_items(a,true);
			
	}
		

			



}

function qmv_ibullets_preload(src)
{
	
		
	d = document.createElement("DIV");
	d.style.display = "none";
	d.innerHTML = "<img src="+src+" width=1 height=1>";
	document.body.appendChild(d);
	
	
	
}


function qmv_ibullets_init_items(a,main)
{

	
	var q = qmad.qmvibullets;
	var aa,pf;
			

	aa = a.childNodes;
	for (var j=0;j<aa.length;j++)
	{
		if (aa[j].tagName=="A" && aa[j].cdiv)
		{
			
			if (window.attachEvent)
				aa[j].attachEvent("onmouseover",qmv_ibullets_hover);
			else if (window.addEventListener)
				aa[j].addEventListener("mouseover",qmv_ibullets_hover,false);


			if (q.type!="all")
			{
				if (q.type=="parent" && !aa[j].cdiv)
					continue;
					
				if (q.type=="non-parent" && aa[j].cdiv)
					continue;
			}

			if (main)
				pf = "m";
			else
				pf = "s";
				
			if (q[pf+"img"])
			{
				var ii = document.createElement("IMG");
				ii.setAttribute("src",q[pf+"img"]);
				ii.setAttribute("width",q[pf+"imgwh"][0]);
				ii.setAttribute("height",q[pf+"imgwh"][1]);
				ii.style.borderWidth = "0px";
				ii.style.position = "absolute";
				
				
				var ss = document.createElement("SPAN");
				ss.setAttribute("isibullet",1); 
				ss.style.display = "block";
				ss.style.position = "relative";
				ss.style.fontSize = "1px";
				ss.style.lineHeight = "0px";
				
				if (q[pf+"right"])
				{
					aa[j].style.position = "relative";
					ss.style.position = "absolute";
					ss.style.width = "0px";
					ss.style.left=q[pf+"right"];
				}
				else
					ss.style.left = q[pf+"pos"][0]+"px";

				ss.style.top = q[pf+"pos"][1]+"px";
	
				ss.appendChild(ii);				
				
				aa[j].qmibullet = aa[j].insertBefore(ss,aa[j].firstChild);	
				aa[j]["qmibullet"+pf+"a"] = q[pf+"img_a"];
				aa[j]["qmibullet"+pf+"h"] = q[pf+"img_h"];
				aa[j].qmibulletorig = q[pf+"img"];

				
				
			}
			
			if (aa[j].getAttribute("initshow"))
			{
				
				qmv_ibullets_active(aa[j]);
			}	
				
			if (aa[j].cdiv) 
				new qmv_ibullets_init_items(aa[j].cdiv);
	
		}

	}

}

function qmv_ibullets_hover(e,targ)
{
	if (!targ)
	{
		e = window.event || e;
		var targ = e.srcElement || e.target;
		while (targ && targ.tagName!="A")
			targ = targ[qp];

		if (!targ) return;
	}

	var ch = qmad.qmvibullets.lasth;
	if (ch && ch!=targ)
	{
		qmv_ibullets_hover_off(null,ch);
	}

	if (targ.className.indexOf("qmactive")+1)
		return;

	var wo = targ.qmibullet;
	var ma = targ.qmibulletmh;
	var sa = targ.qmibulletsh;
	
	if (wo && (ma || sa))
	{
		var ti = ma;
		if (sa && sa!=undefined) ti = sa;
		if (ma && ma!=undefined) ti = ma;
				
		wo.firstChild.src = ti;
		qmad.qmvibullets.lasth = targ;
	}

}


function qmv_ibullets_hover_off(e,o)
{

	if (!o) o = qmad.qmvibullets.lasth;

	if (o && o.className.indexOf("qmactive")==-1)
	{
		if (o.firstChild && o.firstChild.firstChild)
			o.firstChild.firstChild.src = o.qmibulletorig;
	}

}


function qmv_ibullets_active(a,hide)
{

	var wo = a.qmibullet;
	var ma = a.qmibulletma;
	var sa = a.qmibulletsa;
	
	
	if (!hide && a.className.indexOf("qmactive")==-1)
		return;

	if (hide && a.idiv)
	{
		
		var o = a.idiv;
		
		if (o && o.qmibulletorig)
		{
			
			o.firstChild.firstChild.src = o.qmibulletorig;


		}	
		
	}
	else
	{
		
		if (wo && (ma || sa))
		{
			var ti = ma;
			if (sa && sa!=undefined) ti = sa;
			if (ma && ma!=undefined) ti = ma;
		
				
			wo.firstChild.src = ti;
		}

	}


}




//************************** Working with create settings / menu settings

function qmv_load_menu_settings_to_tree()
{

	var ms = document.getElementById("qmvtree_menu_settings")
	var inps = ms.getElementsByTagName("INPUT");
	var t;
	
	
	
	var a = document.getElementById("qm"+qmv.id);

	for (var i=0;i<inps.length;i++)
	{
		
		
		var cname = inps[i].getAttribute("cname");
		if (cname)
		{
			
			if (cname=="isvertical")
			{
				
				var isv = qmv_lib_is_menu_vertical(qmv.id);
				

				if (!isv)
					inps[i].value = false;
				else
					inps[i].value = true;
				


			}
			else if (cname=="showdelay")
			{
				inps[i].value = qmv.ms_show_timer;

			}
			else if (cname=="hidedelay")
			{
				
				inps[i].value = qmv.ms_hide_timer;


			}
			else if (cname=="onclick")
			{
				
				
				if (a.oc)
					inps[i].value = a.oc;
				else
					inps[i].value = false;



			}
			else if (cname=="leftsided")
			{
				
				if (a.rl)
					inps[i].value = true;
				else
					inps[i].value = false;

			}
			else if (cname=="hsubs")
			{
								
				if (a.sh)
					inps[i].value = true;
				else
					inps[i].value = false;


			}
			else if (cname=="flushleft")
			{
				
				if (a.fl)
					inps[i].value = true;
				else
					inps[i].value = false;


			}
			else if (cname=="flushtop")
			{
				
				if (a.ft)
					inps[i].value = true;
				else
					inps[i].value = false;


			}


		}


		inps[i].prev_value = inps[i].value;

	}



}

function qmv_evt_update_texturl(a)
{

	
	if (a.id == "qmv_texturl_field")
	{
		
		if (qmv.texturl_state=="text")
			qmv_evt_update_texturl_text(a.value)
		else
		{
			
			qmvi_update_anchor_settings(a,"href");
		}
		
	}
	else
	{
		qmv_evt_update_texturl_text(a.value)
	}


}

function qmv_evt_update_texturl_text(val)
{
	
	if (qmad.br_ie)
	{	
		
		var b = qmv.cur_item.cloneNode(true);
		
		b.onclick = qmv.cur_item.onclick;
		b.onmouseover = qmv.cur_item.onmouseover;
		b.className = qmv.cur_item.className;
		b.qmts = qmv.cur_item.qmts;
		b.cdiv = qmv.cur_item.cdiv;
		b.ondblclick = qmv.cur_item.ondblclick;
		b.oncontextmenu = qmv.cur_item.oncontextmenu;

		
		
		qmv_evt_update_texturl_text2(b,val);
		qmv.cur_item.parentNode.replaceChild(b,qmv.cur_item);

		qmv_sync_for_ie_undo_report_items(qmv.cur_item,b);

		qmv.cur_item = b;
		if (b.cdiv)
			b.cdiv.idiv = b;

	}
	else
		qmv_evt_update_texturl_text2(qmv.cur_item,val);
		

	

}


function qmv_evt_update_texturl_text2(obj,val)
{

	
	var aobj = new Array();		
	var robj = new Array();		
	var s;

	

	s = obj.childNodes;
	for (var i=0;i<s.length;i++)
	{

		if (s[i].getAttribute && s[i].getAttribute("qmvbefore"))
		{
			
			robj.push(obj.removeChild(s[i]));
			i--;
		}
	
	}
	

	
	s = obj.childNodes;
	for (var i=0;i<s.length;i++)
	{
		if (s[i].getAttribute && s[i].getAttribute("qmvafter"))
		{
			aobj.push(obj.removeChild(s[i]));
			i--;
		}
			
	}

	
	
	obj.innerHTML = val;


	for (var i=0;i<robj.length;i++)
	{
		var ni = obj.insertBefore(robj[i],obj.firstChild);

		if (ni.className.indexOf("qmritem")+1)
			obj.hasritem = ni;
	}


	for (var i=0;i<aobj.length;i++)
		obj.appendChild(aobj[i]);





}

function qmv_evt_dividers_adjust_orientation(mo)
{
	if (!mo)
		mo = document.getElementById("qm"+qmv.id);


	var sp = mo.getElementsByTagName("SPAN");
	for (var i=0;i<sp.length;i++)
	{

		if (sp[i].className.indexOf("qmdivider")+1)
		{

			if (sp[i][qp].ch)
			{
				qm_arc("qmdividerx",sp[i]);
				qm_arc("qmdividery",sp[i],true);


			}
			else
			{

				qm_arc("qmdividery",sp[i]);
				qm_arc("qmdividerx",sp[i],true);


			}


		}




	}



}


function qmv_evt_titles_adjust_orientation(mo)
{
	if (!mo)
		mo = document.getElementById("qm"+qmv.id);


	var got_one;

	var sp = mo.getElementsByTagName("SPAN");
	for (var i=0;i<sp.length;i++)
	{

		if ((sp[i].className.indexOf("qmtitle")+1) || (sp[i].className.indexOf("qmcbox")+1))
		{
			

			if (sp[i][qp].ch)
			{
				
				sp[i][qp].removeChild(sp[i]);
				got_one = true;
				i--;
			}
			

		}

	}
	
	

	if (got_one)
	{
		
		qmv_hide_pointer("qm"+qmv.id);
		qm_oo(new Object(),mo.getElementsByTagName("A")[0]);

		qmv_show_dialog("alert",null,"Existing titles and content boxes have been removed from some horizontal menus.  Titles and content boxes may be applied to vertically oriented menus only.",480);			
		return;

	}

}





function qmv_evt_update_menu_settings(value,rule,sname,cname,dtype)
{

	if (cname=="isvertical")
	{



		
		var mo = document.getElementById("qm"+qmv.id);

		var ma = mo.childNodes;
		for (var i=0;i<ma.length;i++)
		{
			if (ma[i].tagName=="A")
			{

				if (value.toLowerCase()=="false")
				{
					ma[i].style.cssFloat = "";
					ma[i].style.styleFloat = "";
				}
				else
				{

					ma[i].style.cssFloat = "none";
					ma[i].style.styleFloat = "none";

				}


			}


		}

		if (value.toLowerCase()=="false")
			mo.ch = 1;
		else
			mo.ch = 0;


		qmv_evt_dividers_adjust_orientation(mo);
		qmv_evt_titles_adjust_orientation(mo);
		
	}
	else if (cname=="showdelay")
	{

		qmv.ms_show_timer = value;


	}
	else if (cname=="hidedelay")
	{

		qmv.ms_hide_timer = value;


	}
	else if (cname=="onclick")
	{
		
		var a = document.getElementById("qm"+qmv.id)[qp].getElementsByTagName("DIV");
		
		for (var i=0;i<a.length;i++)
		{
	
			if (value.toLowerCase()!='false')
				a[i].oc = value;
			else
				a[i].oc = false;

		}
		

	}
	else if (cname=="leftsided")
	{

		var a = document.getElementById("qm"+qmv.id);	

		value = qmv_lib_parse_value(value,dtype);
		var sval = 0;
		if (value) sval = 1;
		qmv_evt_update_menu_setting_attributes(a,"rl",sval)

		a.rl = sval;

	}
	else if (cname=="hsubs")
	{
		var a = document.getElementById("qm"+qmv.id);

		value = qmv_lib_parse_value(value,dtype);
		var sval = 0;
		if (value) sval = 1;
		
		qmv_evt_update_menu_setting_attributes(a,"sh",sval,true)


		a.sh = sval;
		if (sval)
		{
			qmv_show_dialog("alert",null,"Warning!&nbsp;&nbsp;Horizontal sub items may wrap and stack vertically if there is not enough horizontal space alloted in your HTML for the menu.  Second level sub menus must not exceed the width of thier parents menu width or they will wrap.<br><br>To completely avoid wrapping, define a fixed with for all subs under the sub container styles(CSS Styles --&gt; Subs --&gt; Container), or define individual widths using inline styles.<br>",570);
			qm_arc("qmsh",a,true);
		}
		else
			qm_arc("qmsh",a);


		qmv_evt_dividers_adjust_orientation(a);
		qmv_evt_titles_adjust_orientation(a);

	}
	else if (cname=="flushleft")
	{
		var a = document.getElementById("qm"+qmv.id);		
		
		value = qmv_lib_parse_value(value,dtype);
		var sval = 0;
		if (value) sval = 1;
		qmv_evt_update_menu_setting_attributes(a,"fl",sval)

		a.fl = sval;

	}
	else if (cname=="flushtop")
	{
		var a = document.getElementById("qm"+qmv.id);		
		
		value = qmv_lib_parse_value(value,dtype);
		var sval = 0;
		if (value) sval = 1;
		qmv_evt_update_menu_setting_attributes(a,"ft",sval)
		a.ft = sval;


	}
	

}

function qmv_evt_update_menu_setting_attributes(obj,name,value,isch,lev)
{

	obj[name] = value;
	
	if (isch && lev)
		obj.ch = value;
	
	if (!lev) lev=1;

	var a = obj.childNodes;
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].tagName=="A")
		{
			if (a[i].cdiv)
				qmv_evt_update_menu_setting_attributes(a[i].cdiv,name,value,isch,lev+1)

		}
	}


}




//************************** Working with CSS Styles

function qmv_find_update_tree_value(type,rule,cname,value,getval,skip_filter_update,getinput)
{

	var a;
	if (type=="css")
		var a = document.getElementById("qmvtree_css_styles").getElementsByTagName("DIV");
	else if (type=="addon")
		var a = document.getElementById("qmvtree_addon_settings").getElementsByTagName("DIV");
	else if (type=="inline")
		var a = document.getElementById("qmvtree_inline_styles").getElementsByTagName("DIV");
	else if (type=="iextra")
		var a = document.getElementById("qmvtree_item_extra_settings").getElementsByTagName("DIV");
	else if (type=="settings")
		var a = document.getElementById("qmvtree_menu_settings")[qp].getElementsByTagName("DIV");
	else if (type=="individuals")
		var a = document.getElementById("qmvtree_individuals").getElementsByTagName("DIV");
			
	
	
	for (var i=0;i<a.length;i++)
	{
		if (type=="addon")
		{
			var cr = a[i].getAttribute("addontype");
			if (cr!=rule) 
				continue;

		}
		else
		{
			var cr = a[i].getAttribute("rule");
			if (cr!=rule) 
				continue;
		}

		
		var aa = a[i].childNodes;
		for (var j=0;j<aa.length;j++)
		{
			if (aa[j].tagName=="A")
			{

				var inp = aa[j].getElementsByTagName("INPUT")[0];
				if (inp)
				{
					
					if (inp.getAttribute("cname")==cname)
					{	
						if (getval)
							return inp.value;

						if (getinput)
							return inp;	


						inp.value = value;

						var dt = inp.getAttribute("dtype");
						if (dt && dt=="color")
						{
							qmv_color_build_button_set(inp);

							if (inp.value)
								qmvi_color_recent_add(inp,true);
							else
								qmvi_color_recent_remove(inp);
						}

						if (!skip_filter_update && type=="css" && document.getElementById("qmvtree_filter").cdiv.style.display=="block")
							qmv_filter_init2();
						

						return inp;
					}

				}

			}
		}		



	}

}





function qmv_evt_update_css_style(value,rule,sname,cname,kill,inheritrule,fromspin)
{

	
	
	var r = qmv.style_rules;
	var st;
	var match = false;
	
	

	for (var i=0;i<r.length;i++)
	{
		st = r[i].selectorText;
		st = st.split(",");
		st = st[0];
		
		

		if (st.toLowerCase() == rule)
		{
			
			if (!value && r[i].style.removeAttribute)
			{
				if (!r[i].style.removeAttribute(cname))
					r[i].style[cname] = "";
			}
			else
				r[i].style[cname] = value;

			
			match = true;

		}	

	}

	if (!match)
	{

		var nval = sname+":"+value+";";

		if (qmv.styles.addRule)
			qmv.styles.addRule(rule,nval);
		else if (qmv.styles.insertRule)
			qmv.styles.insertRule(rule+" {"+nval+"}",r.length);

		qmv_update_styles_object();

	}

	
	if (!kill && (rule.indexOf("qmactive")+1 || rule.indexOf("qmpersistent")+1) && rule.indexOf("body")+1)
		qmv_evt_update_css_style(value,rule+":hover",sname,cname,true);
	
	
}




function qmv_inherit_style_question(rule,cname,value,srcinp)
{

	

	qmv.tinherit = new Object();
	var count = 0;

	var rs = rule.split("|");
	for (var k=0;k<rs.length;k++)
	{

		var atype = "";
		var frule = "";
		var ftype = 1;
		var rss =  rs[k].split("@");
		if (rss.length>1)
		{
			frule = rss[1];
			ftype = rss[0];
		}
		else
			frule = rs[k]

		
		if (frule.indexOf("addon")+1)
		{
			var ts = frule.split(":");
			if (ts.length>1)
			{
				frule = ts[0];
				atype = ts[1];

				//now map the cnames
				if (atype=="round_corners")
				{
					if (cname=="borderColor") cname="rcorner_border_color";
					if (cname=="backgroundColor") cname="rcorner_bg_color";



				}

			}

		}


		

		var a;
		if (ftype==4)		
			a = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		else if (ftype==5)
			a = document.getElementById("qmvtree_addon_settings").getElementsByTagName("DIV");
		else
			a = document.getElementById("qmvtree_css_styles").getElementsByTagName("DIV");

		for (var i=0;i<a.length;i++)
		{

					
			var addontype = "";
			var cr = a[i].getAttribute("rule");
			if (cr!=frule) 
				continue;

			if (atype && (addontype = a[i].getAttribute("addontype")))
			{
				
				if (atype!=addontype)
					continue;
			}


			
			
			var aa = a[i].childNodes;
			for (var j=0;j<aa.length;j++)
			{
				if (aa[j].tagName=="A")
				{

					var inp = aa[j].getElementsByTagName("INPUT")[0];
					if (inp)
					{

						
						if (inp.getAttribute("cname")==cname)
						{	

							
							if ((ftype==1 || ftype==2) && (inp.value && qmv_css_get_default_style_val(inp)!=inp.value))
								break;
							
							
							if ((ftype==1 || ftype==2) && (cname=="fontSize" || cname=="color" || !value))
								break;

							if (ftype==4 && !qmv.addons.ritem["on"+qmv.id])
								break;
	
							
							if (ftype==5 && !qmv.addons.round_corners["on"+qmv.id])
								break;


							var sobj = qmv.tinherit["rule"+count] = new Object;
							sobj.inp = inp;
							sobj.type = ftype;
							sobj.defstate = "checked";
							sobj.value = value;
							sobj.cname = cname;
							sobj.srcinp = srcinp;
							sobj.sname = srcinp.getAttribute('sname');

							if (ftype==1)
								sobj.desc = '<span style="color:#0033cc">Inherit By:</span> Sub Menu Items';
							else if (ftype==2)	
								sobj.desc = '<span style="color:#0033cc">Inherit By:</span> Sub Menu Containers';
							else if (ftype==3)
							{
								sobj.desc = '<span style="color:#0033cc">Apply To:</span> Active Styles';
								sobj.defstate = "";
							}
							else if (ftype==4)
							{
								sobj.desc = '<span style="color:#0033cc">Remove and Apply To:</span> Rounded Item Add-On';
								sobj.defstate = "";
							}
							else if (ftype==5)
							{
								sobj.desc = '<span style="color:#0033cc">Remove and Apply To:</span> Rounded Subs Add-On';
								sobj.defstate = "checked";
							}

							count++;
							

						}

					}


				}
			}
		}

	}


	if (count>0)
	{
		qmv_show_dialog("inherit",null,"use message dialog");

	}


}


function qmv_inherit_style_question_okapply()
{

	


	var tic=0;
	var tic_obj;
	while (tic_obj = qmv.tinherit["rule"+tic])
	{
		

		var cb = document.getElementById("qmvi_inherit_options"+tic);
		if (cb)
		{
			
			var inp = tic_obj.inp;

			if (tic_obj.type==1 || tic_obj.type==2)
			{
				
				if (cb.checked)
				{
					inp.value = "";
					qmv_evt_update_tree_value(inp,false,true,false,true,false,tic_obj.srcinp.isfilter);
				}
				else
				{
					inp.value = qmv_css_get_default_style_val(inp);
					qmv_evt_update_tree_value(inp,false,true,false,true,false,tic_obj.srcinp.isfilter);

				}
			}
			else if ((tic_obj.type==4) || (tic_obj.type==5))
			{
				if (cb.checked)
				{


					inp.value = tic_obj.srcinp.value;
					qmv_evt_update_tree_value(inp,false,true,false,true,false,tic_obj.srcinp.isfilter);
					

					tic_obj.srcinp.value = "";
					qmv_evt_update_tree_value(tic_obj.srcinp,false,true,false,true,false,tic_obj.srcinp.isfilter);

					
				}

			}
			else
			{
				if (cb.checked)
				{
					inp.value = tic_obj.value;
					qmv_evt_update_tree_value(inp,false,true,false,true,false,tic_obj.srcinp.isfilter);
				}
			
			}



		}

		tic++;
	}



}



function qmv_css_get_default_style_val(inp)
{

	var dtype = inp.getAttribute("dtype");
	var cname = inp.getAttribute("cname");




	if (cname=="width")
		return "auto";
	else if (cname=="borderStyle")
		return "none";
	else if (cname=="fontFamily")
		return "Arial";
	else if (cname=="textAlign")
		return "left";
	else if (cname=="fontWeight")
		return  "normal";
	else if (cname=="fontStyle")
		return  "normal";
	else if (cname=="textDecoration")
		return  "none"
	else if (cname=="backgroundImage")
		return  "none";
	else if (cname=="backgroundPosition")
		return  "0% 0%";
	else if (cname=="backgroundRepeat")
		return  "repeat";
	else if (dtype=="color")
		return  "transparent";
	else if (dtype.indexOf("edge")+1)
		return  "0px";
	else if (dtype=="unit")
		return  "0px";
	else
		return "";


}



function qmv_check_addon_compatability_apply()
{


	for (var i=0;i<qmv.inc.length;i++)
	{

		var cb = document.getElementById("qmv_iadd_"+qmv.inc1[i]);
		if (cb)
		{
			
			cb.checked = false;
			qmv_evt_addremove_addon(new Object(),cb);
		}

	}


	
	var cb = document.getElementById("qmv_iadd_"+qmv.inc2);
	cb.checked = true;
	qmv_evt_addremove_addon(new Object(),cb);


	qmv_setbox_update_addon_check(cb);

}

function qmv_check_addon_compatability(addon)
{

	if (addon.compat=="all")
		return;


	qmv.inc = new Array();
	qmv.inc1 = new Array();
	for (i in qmv.addons)
	{
			
		if (qmv.addons[i]!=addon && qmv.addons[i].compat!="all" && qmv.addons[i]["on"+qmv.id] && addon.compat.indexOf(i+"")==-1)
		{		
			qmv.inc.push(qmv.addons[i]);				
			qmv.inc1.push(i+"");
		}

		if (qmv.addons[i] == addon)
			qmv.inc2 = i;
	}


	if (qmv.inc.length)
	{
		var wt = "";
		if (qmv.inc.length>1)
			wt += "The "+addon.desc+" addon is not compatible with the following...";
		else
			wt += "The "+addon.desc+" addon is not compatible with the following...";

		wt += '<br>';
		wt += '<br>';
		for (var i=0;i<qmv.inc.length;i++)
			wt += "<div style='margin-left:30px;color:#dd3300;'>"+qmv.inc[i].desc+"</div>";

		wt += '<br>';
		if (qmv.inc.length>1)
			wt += "Would you like to apply "+addon.desc+" and remove the incompatable add-ons.";
		else
			wt += "Would you like to apply "+addon.desc+" and remove the incompatable add-on.";

		wt += '<br><br>';

		qmv_show_dialog("question-yesno",null,wt,500,"qmv_check_addon_compatability_apply()");

		return true;

	}

}


function qmv_evt_update_addon(value,rule_obj,sname,cname,dtype,inp,skip_update)
{
	
	

	var q = qmad["qm"+qmv.id];
	
	if (q)
	{
		
		
		q[cname] = qmv_lib_parse_value(value,dtype,false,true);

		
		var pdiv = inp.parentNode;
		while (pdiv.tagName!="DIV" || (pdiv.idiv && !pdiv.idiv.getElementsByTagName("INPUT")[0]))
			pdiv = pdiv.parentNode;

		
		
		var go = true;	
		if (inp.getAttribute("addondefault"))
		{
			

			var cb = pdiv.idiv.getElementsByTagName("INPUT")[0];
			//q[cname] = qmv_lib_parse_value(value,dtype,true);

			
			if (cb)
			{
				if (q[cname] || typeof q[cname]=="number")
				{
					
					if (qmv_check_addon_compatability(qmv.addons[pdiv.getAttribute("addontype")]))
					{
						cb.checked = false;	
						return;
					}
					
					cb.checked = true;
					qmv.addons[pdiv.getAttribute("addontype")]["on"+qmv.id] = true;
					

				}
				else
				{
					
					if (!inp.getAttribute("skipdefaultoff"))
					{	
						
						var toff = true;
						var addor;
						if (addoa = pdiv.getAttribute("addor"))
						{
						
							addoa = addoa.split("|");
							for (var j=0;j<addoa.length;j++)
							{
								
								if (qmv_find_update_tree_value("addon",pdiv.getAttribute("addontype"),addoa[j],null,true))
									toff = false;		
							}
						}
										

						if (toff)
						{
							go = false;
							cb.checked = false;
							qmv.addons[pdiv.getAttribute("addontype")]["on"+qmv.id] = false;

							//update the effect
							if (window["qmv_update_"+pdiv.getAttribute("addontype")])
							{
								eval("qmv_update_"+pdiv.getAttribute("addontype")+"(true,'"+dtype+"')");
								qmv_update_all_addons(pdiv.getAttribute("addontype"));
							}	
					
						}
					}
		
				}
			}

		}

		
		
		//update the effect
		if (!skip_update && go && window["qmv_update_"+pdiv.getAttribute("addontype")])
		{
			eval("qmv_update_"+pdiv.getAttribute("addontype")+"(null,'"+dtype+"')");
			qmv_update_all_addons(pdiv.getAttribute("addontype"));
		}



	}




}




function qmv_evt_update_inline_style(value,rule_obj,sname,cname)
{
	

	if (!value && rule_obj.style.removeAttribute)
	{
		if (!(rule_obj.style.removeAttribute(cname)))
			rule_obj.style[cname] = value;

	}
	else
		rule_obj.style[cname] = value;

	
	
}


function qmv_load_addon_settings_to_tree()
{


	var q;
	if (!qmad["qm"+qmv.id])
		q = qmad["qm"+qmv.id] = new Object();
	else
		q = qmad["qm"+qmv.id];

	
	
	var a = document.getElementById("qmvtree_addon_settings").getElementsByTagName("DIV");
	for (var i=0;i<a.length;i++)
	{

		var tr = a[i].getAttribute("rule");
		if (!tr || tr!="addon") continue;
			


		if (a[i].idiv)
		{
			var inp = a[i].idiv.getElementsByTagName("INPUT")[0];
			var atype = a[i].getAttribute("addontype");

			qmv_load_addon_status(inp,atype);
						
		}
		
		inp = a[i].getElementsByTagName("INPUT");
		for (var j=0;j<inp.length;j++)
		{
			var cname;
			if (cname = inp[j].getAttribute("cname"))
			{

				
				if (q[cname]!=null && q[cname]!=undefined)
					inp[j].value = q[cname];
				else
					inp[j].value = "";




				if (inp[j].getAttribute("dtype") == "color")
				{
					qmvi_color_recent_add(inp[j]);
					qmv_color_build_button_set(inp[j]);
				}


				inp[j].rule = tr;
				inp[j].prev_value = inp[j].value;
			}

		}
		
	}


}


function qmv_addon_set_all_status()
{

	for (m=0;m<10;m++)
	{

		if (!document.getElementById("qm"+m))
			continue;


		for (i in qmv.addons)
		{
	
			if ((qmv.addons[i]["on"+m]==null || qmv.addons[i]["on"+m]==undefined) && qmv.addons[i].ontest)
			{
				

				var ot = qmv.addons[i].ontest.split("|");
				var ogo = false;
				for (var e=0;e<ot.length;e++)
				{	
					
					if (qmad["qm"+m][ot[e]])
						ogo = true;			
				}
				
				if (ogo)
				{
					
					qmv.addons[i]["on"+m] = true;
				}
				else
					qmv.addons[i]["on"+m] = false;

			}
	
		}

	}
			
}


function qmv_load_addon_status(inp,atype)
{


	var q = qmad["qm"+qmv.id];
	
	if (inp && atype && q)
	{
				
		if ((qmv.addons[atype]["on"+qmv.id]==null || qmv.addons[atype]["on"+qmv.id]==undefined) && qmv.addons[atype].ontest)
		{	
					
			var ot = qmv.addons[atype].ontest.split("|");
			var ogo = false;
			for (var e=0;e<ot.length;e++)
			{	
				
				if (q[ot[e]])
					ogo = true;			
			}
		
			if (ogo)
			{
						
				qmv.addons[atype]["on"+qmv.id] = true;
				inp.checked = true;
			}
			else
			{
				
				qmv.addons[atype]["on"+qmv.id] = false;
				inp.checked = false;
			}
		}
		else
		{

			if (qmv.addons[atype]["on"+qmv.id])
				inp.checked = true;
			else
				inp.checked = false;


		}
			
	}				

}

function qmv_evt_update_item_extra_remove_margin_padding()
{

	var inp;
	inp = qmv_find_update_tree_value("css","#qm[i] a","padding","",false,true);
	qmv_evt_update_tree_value(inp);
	inp = qmv_find_update_tree_value("css","#qm[i] a","margin","",false,true)
	qmv_evt_update_tree_value(inp);

}

function qmv_evt_update_item_extra(value,sname,cname,rule,dtype,inp)
{



	if (rule=="image")
	{
		
		var g = qmv.cur_item.getElementsByTagName("IMG");
		var img;

		for (var i=0;i<g.length;i++)
		{
			if (g[i].className.indexOf("qm-is")+1)
			{
				img = g[i];
				break;			
			}
		}


		value = qmv_lib_parse_value(value,dtype);		
		if (value || cname!="staticimage")
		{
			if (!img)
			{

				if (cname=="staticimage")
				{


					var ni = document.createElement("IMG");
					ni.setAttribute("src",value);
					ni.setAttribute("width",100);
					ni.setAttribute("height",25);
					ni.setAttribute("qmvafter",1);
				
					var nic = "qm-is";
					if (qmv_lib_parse_value(qmv_find_update_tree_value("iextra",rule,"hoverimage",null,true),dtype))
						nic += " qm-ih";

					if (qmv_lib_parse_value(qmv_find_update_tree_value("iextra",rule,"activeimage",null,true),dtype))
						nic += " qm-ia";

					ni.className = nic;

					var t;
					if (t = qmv_lib_parse_value(qmv_find_update_tree_value("iextra",rule,"width",null,true),dtype))
						ni.setAttribute("width",t);

					var t;
					if (t = qmv_lib_parse_value(qmv_find_update_tree_value("iextra",rule,"height",null,true),dtype))
						ni.setAttribute("height",t);

					var t;
					if (t = qmv_lib_parse_value(qmv_find_update_tree_value("iextra",rule,"alt",null,true),dtype))
						ni.setAttribute("alt",t);


					qmv.cur_item.appendChild(ni);
			
					
					qmv.cur_item.qmvstext = qmv_set_texturl_field(qmv.cur_item,true);
					qmvi_change_item_text(qmv.cur_item,"");


					qm_image_switch(qmv.cur_item,false,false,true);
					qm_image_switch(qmv.cur_item,true,false);

				
					if (qm_a(qmv.cur_item[qp]) && (qmv_find_update_tree_value("css","#qm[i] a","padding",null,true) || qmv_find_update_tree_value("css","#qm[i] a","margin",null,true)))
						qmv_show_dialog("question-yesno",null,"Your main menu items contain margins or padding values, these values will create a gap between your image based items.<br><br>Would you like to remove all padding and margin values.",450,"qmv_evt_update_item_extra_remove_margin_padding()");

					
					qmv.addons.image["on"+qmv.id] = true;
						
				}
				else
					qmv_show_dialog("alert",null,"First specify a static image, without a static image defined, additional item specific image settings will not be saved.",450);
				
			

			}
			else
			{

				if (cname=="staticimage")
				{
					
					img.setAttribute("src",value);
					qm_oo(new Object(),qmv.cur_item,false);
					
				}
				else if (cname=="hoverimage")
				{
					
					if (value && img.className.indexOf("qm-ih")==-1)
					{
						qm_arc("qm-ih",img,true);
						qm_image_switch(qmv.cur_item,false,false,true);
						qm_image_switch(qmv.cur_item,true,false);
					}
					else
					{
						qm_arc("qm-ih",img);
						qm_image_switch(qmv.cur_item,false,true);
						qm_image_switch(qmv.cur_item,true,false);	
					}
					
				}
				else if (cname=="activeimage")
				{

					if (value && img.className.indexOf("qm-ia")==-1)
					{
						qm_arc("qm-ia",img,true);
						qm_image_switch(qmv.cur_item,true,false);
					}
					else
					{
						qm_arc("qm-ia",img);
						qm_image_switch(qmv.cur_item,false,true);
						qm_image_switch(qmv.cur_item,false,false,true);
						
					}
					
				}
				else if (cname=="width")
				{
					
					img.setAttribute("width",value);

				}
				else if (cname=="height")
				{
					
					img.setAttribute("height",value);

				}
				else if (cname=="alt")
				{
					if (value)
						img.setAttribute("alt",value);
					else
						img.removeAttribute("alt");

				}
				

			}

		}
		else
		{
			
			if (img)
			{

				qmv.cur_item.removeChild(img);
				if (!qmv_set_texturl_field(qmv.cur_item,true)) qmvi_change_item_text(qmv.cur_item,qmv.cur_item.qmvstext);
				
				var keep = false;
				var ims = document.getElementById("qm"+qmv.id).getElementsByTagName("IMG");
				for (var k=0;i<ims.length;k++)
				{
					if (ims[k].className.indexOf("qm-is")+1)
					{
						keep = true;
						break;
					}

				}

				
				if (!keep) qmv.addons.image["on"+qmv.id]= false;
					
			}
			

		}
	



	}
	else if (rule=="sopen")
	{

		

		value = qmv_lib_parse_value(value,dtype);
		var ca = qmv.cur_item[qp].idiv;

		if (ca)
		{
			if (value)
			{
				qmv.addons.sopen["on"+qmv.id] = true;
				qm_arc("qm-startopen",ca,true)
			}
			else
			{
				qm_arc("qm-startopen",ca);
				qmv_update_extra_check_sopen_on();
			}

		}
		else
		{
			
			qmv_show_dialog("alert",null,"The main menu container is visible by default, please select a sub menu container before applying this value.",480);
			inp.value = "";
		}


	}
	
	
}

function qmv_evt_update_item_title_innerHTML(a,val)
{

	
	if (qmad.br_ie)
	{	
		
		var b = a.cloneNode(true);
		
		b.onclick = a.onclick;
		b.className = a.className;
		b.ondblclick = a.ondblclick;
		b.oncontextmenu = a.oncontextmenu;
				
		b.innerHTML = val;

		a.parentNode.replaceChild(b,a);	

	}
	else
	{
		a.innerHTML = val;

	}
		
}

function qmv_update_extra_check_sopen_on()
{

	var a = document.getElementById("qm"+qmv.id);
	a = a.getElementsByTagName("DIV");
	var on = false;
	for (var i=0;i<a.length;i++)
	{
		if (a[i].idiv && a[i].idiv.className.indexOf("qm-startopen")+1)
			on = true;

	}

	qmv.addons.sopen["on"+qmv.id] = on;
	
}


function qmv_load_item_extras_to_tree()
{




	var a = document.getElementById("qmvtree_item_extra_settings").getElementsByTagName("DIV");
	for (var i=0;i<a.length;i++)
	{

		var tr = a[i].getAttribute("rule");

		var aa = a[i].childNodes;
		for (var j=0;j<aa.length;j++)
		{

			if (aa[j].tagName=="A")
			{
				var inp = aa[j].getElementsByTagName("INPUT")[0];
				if (inp)
				{
					
					inp.rule = tr;					

					var cname = inp.getAttribute("cname");
					if (tr=="image")
					{

						inp.value = "";
						var img = qmv.cur_item.getElementsByTagName("IMG");
						for (var i=0;i<img.length;i++)
						{
							if (img[i].className.indexOf("qm-is")+1)
							{
								if (cname=="staticimage")
								{
									inp.value = qm_image_base(img[i],true);
									break;
								}
		
								if (cname=="width")
								{
									inp.value = img[i].getAttribute("width");
									break;
								}

								if (cname=="height")
								{
									inp.value = img[i].getAttribute("height");
									break;
								}

								if (cname=="alt")
								{
									inp.value = img[i].getAttribute("alt");
									break;
								}

								if (cname=="hoverimage")
								{
									if (img[i].className.indexOf("qm-ih")+1)
										inp.value = "true";
									else 
										inp.value = "false";
	
									break;
								}

							
								if (cname=="activeimage")
								{
									if (img[i].className.indexOf("qm-ia")+1)	
										inp.value = "true";
									else
										inp.value = "false";

									break;
								}
							}

						}


					}
					else if (tr=="sopen")
					{
						var cname = inp.getAttribute("cname");
						if (cname=="sopen")
						{
							var ca = qmv.cur_item[qp].idiv;
							if (ca)
							{
								if (ca.className.indexOf("qm-startopen")+1)
								{
									qmv.addons.sopen["on"+qmv.id] = true;
									inp.value = "true";
								}
								else
									inp.value = "false";

							}
							else
								inp.value = "";
						}
						
		
				
					}
				}	

			}



		}


	}


}

function qmv_load_inline_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_inline_styles").getElementsByTagName("DIV");
	for (var i=0;i<a.length;i++)
	{
		var tr = a[i].getAttribute("rule");

		var obj = qmv.cur_item;
		if (tr.indexOf("parent")+1)
			obj = obj.parentNode;


		if (!obj) continue;

		var aa = a[i].childNodes;
		for (var j=0;j<aa.length;j++)
		{

			if (aa[j].tagName=="A")
			{
				
				var inp = aa[j].getElementsByTagName("INPUT")[0];
				if (inp)
				{
					var cname = inp.getAttribute("cname");
					if (!cname) continue;

					var val = obj.style[cname];
					if (val)
					{
						if (qmad.br_ie)
							inp.value = val;
						else
							inp.value = qmv_load_css_styles_firefox_fix(val,inp.getAttribute("dtype"))
						
					}
					else
						inp.value = "";



					var dtype = inp.getAttribute("dtype");
					if (dtype == "color")
						qmv_color_build_button_set(inp);
										
			

					inp.rule_obj = obj;
					inp.prev_value = inp.value;
				}
			}

		}
		
	}

}

function qmv_load_title_applied_to_tree()
{
	var a = document.getElementById("qmvtree_item_titles").childNodes;
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].tagName=="A")
		{
				
			var inp = a[i].getElementsByTagName("INPUT")[0];
			if (inp)
			{
				var cname = inp.getAttribute("cname");
				if (!cname) continue;

				if (cname=="apply")
				{	
					

					var sd;
					if (sd = qmv_lib_get_previoussibling_span(qmv.cur_item,"qmtitle"))
						inp.value = true;
					else
						inp.value = false;



				}
				else if (cname=="text")
				{
					
					var sd;
					if (sd = qmv_lib_get_previoussibling_span(qmv.cur_item,"qmtitle"))
					{
						if (!sd.innerHTML)
							inp.value = "";
						else
							inp.value = sd.innerHTML;

					}
					else 
						inp.value = "";


				}
				

				inp.prev_value = inp.value;

			}

		}

	}
	
}


function qmv_load_cbox_applied_to_tree()
{
	var a = document.getElementById("qmvtree_content_boxes").childNodes;
	
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].tagName=="A")
		{
				
			var inp = a[i].getElementsByTagName("INPUT")[0];
			if (inp)
			{
				var cname = inp.getAttribute("cname");
				if (!cname) continue;

				if (cname=="apply")
				{	
					
					
					var sd;
					if (sd = qmv_lib_get_previoussibling_span(qmv.cur_item,"qmtitle"))
						inp.value = true;
					else
						inp.value = false;



				}
				else if (cname=="text")
				{
					
					var sd;
					if (sd = qmv_lib_get_previoussibling_span(qmv.cur_item,"qmtitle"))
					{
						if (!sd.innerHTML)
							inp.value = "";
						else
							inp.value = sd.innerHTML;

					}
					else 
						inp.value = "";


				}
				

				inp.prev_value = inp.value;

			}

		}

	}
	
}


function qmv_load_divider_applied_to_tree()
{



	var a = document.getElementById("qmvtree_item_dividers").childNodes;
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].tagName=="A")
		{
				
			var inp = a[i].getElementsByTagName("INPUT")[0];
			if (inp)
			{
				var cname = inp.getAttribute("cname");
				if (!cname) continue;

				if (cname=="apply")
				{	

					var sd;
					if (sd = qmv_lib_get_previoussibling_span(qmv.cur_item,"qmdivider"))
						inp.value = true;
					else
						inp.value = false;
	

				}

				inp.prev_value = inp.value;

			}

		}

	}
	
}

function qmv_load_box_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_box").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}

function qmv_load_ritem_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}

function qmv_load_hoverfill_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_hoverfill").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}

function qmv_load_title_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_item_titles").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}

function qmv_load_cbox_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_content_boxes").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}

function qmv_load_stripe_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_item_stripes").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}



function qmv_load_divider_styles_to_tree()
{
	
	var a = document.getElementById("qmvtree_item_dividers").getElementsByTagName("DIV");	
	qmv_load_styles_to_tree(null,a);
}

function qmv_load_styles_to_tree(id,tree_obj)
{
	

	var rules = qmv.style_rules;
	if (!id) id = qmv.id;

	var a;
	if (!tree_obj)
		a = document.getElementById("qmvtree_css_styles").getElementsByTagName("DIV");	
	else
		a = tree_obj;

	for (var i=0;i<a.length;i++)
		a[i].stylesloaded = null;

	for (var i=0;i<rules.length;i++)
	{

		var st = rules[i].selectorText.toLowerCase();
		if (st.indexOf(".qmmc")==0 || st.indexOf(".qmclear")==0)
			continue;

		
		if (st.indexOf("#qm")+1 && st.indexOf("#qm"+id)==-1)
			continue;


		
		qmv_load_styles_to_tree_node(rules[i],st,null,a);

	}
	
	
	for (var i=0;i<a.length;i++)
	{

		var tr = a[i].getAttribute("rule");
		if (tr)
		{
			var tr = tr.replace("[i]",qmv.id);
			qmv_load_style_set_rule_desc(a[i],tr);
			
			if (!a[i].stylesloaded)
				qmv_load_styles_to_tree_node(null,tr,true,a);

		}
	}
	

}

function qmv_load_style_set_rule_desc(a,tr)
{

	if (a.idiv.getAttribute("ruledesc"))
	{
		var as = a.idiv.getElementsByTagName("SPAN");
		for (var j=0;j<as.length;j++)
		{
			if (as[j].getAttribute("isruledesc"))
				as[j].innerHTML = a.idiv.getAttribute("ruledesc")+"&nbsp;&nbsp;<span class='qmvtree-rule'>[&nbsp;"+tr.replace("body","")+"&nbsp;]</span>";

		}
					
	}


}


function qmv_load_styles_to_tree_node(rule,st,force_noval,a,test)
{

	
	st = st.split(",");
	st = st[0];	
		
	for (var i=0;i<a.length;i++)
	{
		var origrule = a[i].getAttribute("rule");
		var tr = origrule;
		if (tr && tr!="addon")
		{

			tr = tr.replace("[i]",qmv.id);
			
			

			if (tr==st)
			{
				
				
				a[i].stylesloaded = 1;

				var aa = a[i].childNodes;
				for (var j=0;j<aa.length;j++)
				{
					if (aa[j].tagName=="A")
					{

						var cname = aa[j].getAttribute("cname");
						if (!cname)
							continue;
						
						var val = "";
						if (!force_noval)
							var val = rule.style[cname];

						var inp = aa[j].getElementsByTagName("INPUT")[0];
						var dtype = inp.getAttribute("dtype");
						if (val)
						{
							if (qmad.br_ie)
								inp.value = val;
							else
								inp.value = qmv_load_css_styles_firefox_fix(val,inp.getAttribute("dtype"));

							
							if (dtype == "color")
								qmvi_color_recent_add(inp);
												
							
						}
						else
							inp.value = val;


						if (dtype=="color")
							qmv_color_build_button_set(inp);

						var ir;
						if (ir = a[i].getAttribute("inheritrule"))
							inp.setAttribute("inheritrule",ir);
						
						
						inp.origrule = origrule;
						inp.rule = tr;
						inp.prev_value = inp.value;

						

					}


				}


			}	


		}


		
		
	}	

}





function qmv_color_build_button_set(inp)
{



	a = inp[qp];
	while (a && a.tagName && a.tagName!="A")
		a = a[qp];

	
	var s = a.getElementsByTagName("SPAN");

	if (s.length>0)
	{
		s = s[s.length-1];

		if (inp.value)
		{
			s.style.backgroundColor = inp.value;
			s.style.borderColor = "#333333";
			s.innerHTML = "";
		}
		else
		{
			s.style.backgroundColor = "";
			s.style.borderColor = "";
			s.innerHTML = "...";
		}
	}

}


function qmv_convert_color_to_hex(value)
{

	var rval = value;
	var cv = value.split(") ");
	if (cv.length==4)
	{
			
		if (cv[0]==cv[1] && cv[0]==cv[2] && cv[3].indexOf(cv[0])+1)
			rval = cv[0];
			
	}

	var rl = rval.toLowerCase();
	if (rl!="transparent" && rl.indexOf("rgb")+1)
		rval = qmv_color_parse_split(cv[0],true);
	

	return rval;
}


function qmv_load_css_styles_firefox_fix(value,dtype)
{

	

	var rval = value;


	if (dtype=="color")
	{
		
		rval = qmv_convert_color_to_hex(value);
			

	}

	var cv = value.split(" ");
	if (cv.length==4)
	{
		if (cv[0]==cv[1] && cv[0]==cv[2] && cv[0]==cv[3])
			rval = cv[0];	
	}
	


	return rval;

}



//************************** Visual Interface Event Handlers




function qmv_a(o)
{

	
	if (qmv.preview_mode)
		return;

	
	
	
	var m = qm_get_menu(o);
	if (m.id=="qm99" || m.id=="qm98") return;
	if (qmv.anchor_dialog_visible) qmv_save_anchor_settings();


	qmv.cur_item = o;
		
	qmv_set_texturl_field(o);
	if (qmv.anchor_dialog_visible)qmv_url_init();
	qmv_load_inline_styles_to_tree()
	qmv_load_item_extras_to_tree();
	qmv_load_title_applied_to_tree();
	qmv_load_cbox_applied_to_tree();
	qmv_load_divider_applied_to_tree();

	var id;
	if (m.id && (id = m.id.substring(2)) && !isNaN(id = parseInt(id)))
	{	

		if (qmv.id==-1 || qmv.id != id)
		{
			

			qmv.force_id_update = false;
			qmvi_save_report_object();
			
			qmv.color_recent = new Array();

			qmv.id = id;
			qmv_load_styles_to_tree();
			qmv_load_menu_settings_to_tree();
			qmv_load_addon_settings_to_tree();
			qmv_load_title_styles_to_tree();
			qmv_load_cbox_styles_to_tree();
			qmv_load_stripe_styles_to_tree();
			qmv_load_divider_styles_to_tree();
			qmv_load_box_styles_to_tree();
			qmv_load_ritem_styles_to_tree();
			qmv_load_hoverfill_styles_to_tree();
			qmv_load_custom_styles_to_tree();

			

			if (document.getElementById("qmvtree_filter").cdiv.style.display=="block")
				qmv_filter_init2();
				
			var a = document.getElementById("qmvtree_color_shortcuts");
			if (a.style.display=="block")
				qmv_shortcut_init(a);

			qmv_setbox_update_quick_color();
			qmvi_initialize_report_object();
			

		}
	
	}


	qmv_position_pointer(true);
	qmv_hide_context();
	qmv_setbox_update_individual();


	



	if (document.getElementById("qmvacc_apply_allitems"))
		qmv_custom_class_list_change(new Object());


	if (!qmv.qmvi_kb_focus_menu)
		qmv.qmvi_kb_focus_menu = document.getElementById("qmvi_kb_focus_menu");

	qmv.qmvi_kb_focus_menu.focus();

}



function qmv_hide_pointer(id)
{
	
	var po;
	if ((po = qmv.pointer) && (po = po[id]) && (po = po.a))
		po.style.display = "none";

}

function qmv_position_pointer(show)
{



	if (!qmv) return;

	var po = qmv.pointer["qm"+qmv.id].a;


	if (!qmv.cur_item.offsetWidth)
		return;

	//position the pointer
	var lt = qmv_lib_get_position_relative_to_main_menu_container(qmv.cur_item);
	po.style.left = (lt[0]-1)+"px";
	po.style.top = (lt[1]-1)+"px";
	

	var sp = po.getElementsByTagName("SPAN");
	var sw = qmv.cur_item.offsetWidth;
	var sh = qmv.cur_item.offsetHeight;
	
	sp[0].style.width = (sw+1)+"px";

	sp[1].style.width = (sw+1)+"px";
	sp[1].style.top = (sh+1)+"px";
	
	if (sw-1>=0)
	{
		sp[2].style.height = (sh-1)+"px";
		sp[2].style.top = "1px";

		sp[3].style.height = (sh-1)+"px";
		sp[3].style.top = "1px";
		sp[3].style.left = (sw+1)+"px";
	}


	if (show && !qmv.interface_hide_selected_box)
	{
		if (!qmv.addons.pointer["on"+qmv.id])
			po.style.display = "block";

		for (i in qmv.pointer)
		{
			if (i+""!="qm"+qmv.id && qmv.pointer[i]!=null)
				 qmv_hide_pointer(i+"");
		}
	
	}


}

function qmv_check_texturl_build()
{

	if (qmv.texturl_state=="text" && qmv.cur_item.className.indexOf("qmdivider")+1)
	{
		qmv_show_dialog("alert",null,"Custom text may not be applied to divider items.",400);
		return false;
	}


	return true; 

}



function qmv_set_texturl_field(a,gettext,publish,for_undo)
{
	
	
	

	var tuf = document.getElementById("qmv_texturl_field");
	

	if (qmv.texturl_state=="text" || gettext || publish)
	{
		var b = a.cloneNode(true);
		var after = qmv_atag_text_remove_objects(b,publish,for_undo);
	

		if (gettext)
		{
			if (for_undo)
				return b.innerHTML.replace(/\n/g,"")+after;
			else
				return b.innerHTML.replace(/\n/g,"");
		}
		else if (publish)
			return b.innerHTML.replace(/\n/g,"")+after;
		else
		{

			var sv = b.innerHTML;
			sv = sv.replace(/\n/g,"");

			tuf.value = sv;
			tuf.prev_value = tuf.value;

								
			if (a.className.indexOf("qmdivider")+1 && !tuf.value)
				qmv_texturl_enable_disable(tuf,true);
			else
				qmv_texturl_enable_disable(tuf,false);

		}

	
	}
	else
	{
		var tv1 = a.getAttribute("href",2);
		if (tv1==null)
			tv1 = "";		
		
		tuf.value = tv1;
		tuf.prev_value = tuf.value;

		if (a.className.indexOf("qmdivider")+1 || a.className.indexOf("qmtitle")+1 || a.className.indexOf("qmcbox")+1)
			 qmv_texturl_enable_disable(tuf,true);
		else
			 qmv_texturl_enable_disable(tuf,false);

	}

}

function qmv_texturl_enable_disable(tuf,disable)
{

	if (disable)
	{
		tuf[qp].style.backgroundColor = "#eeeeee";
		tuf[qp].style.borderStyle = "dotted";
		tuf.disabled = true;
	}
	else
	{
		tuf.disabled = false;
		tuf[qp].style.backgroundColor = "";
		tuf[qp].style.borderStyle = "";	

	}

}

function qmv_atag_text_remove_objects(a,publish,for_undo)
{
	
	
	var rval = "";
	var s = a.childNodes;
	for (var i=0;i<s.length;i++)
	{
		

		
		if (s[i].getAttribute && (s[i].getAttribute("qmvbefore") || s[i].getAttribute("qmvafter")))
		{



			if (publish || for_undo)
			{
				
				

				if (s[i].getAttribute("qmvafter"))
				{
					
					if (s[i].className && s[i].className.indexOf("qm-is")+1)
					{
						
						if (for_undo)
						{
							//used for reporting string
							rval += '[image: '+qm_image_base(s[i],true)+']';

						}
						else
						{
							
							rval = '<img ';
						
							talt = s[i].getAttribute("alt",2);
							if (!talt)
								talt = "";
							else
								talt = ' alt="'+talt+'"';							

							rval += ' class="'+s[i].className+'" src="'+qm_image_base(s[i],true)+'" width="'+s[i].getAttribute("width",2)+'" height="'+s[i].getAttribute("height",2)+'"'+talt+'>';
						}

					}
					

				}


			}


			a.removeChild(s[i]);
			i--;
		}
		

	}

	return rval;

}


function qmv_evt_update_tree_value(a,fromspin,skip_validate,skip_update,skip_inherit,is_quickcolor,skip_filter_update,skip_mirror,is_undo,skip_update_addons)
{


		
	
	if (a.value==a.prev_value)
		return;


	try
	{
		var dt = a.getAttribute("dtype");
		

		if (!skip_validate)
		{
		
			
			if (a.value && dt)
			{
		
				var range = a.getAttribute("range");
				var oops = false;
				var oops_range = false;
			
				var t;
				var es;
				if (dt=="int")
				{
					t = parseInt(a.value);
					if (isNaN(t))
						oops = true;		

					a.value = t;

				
					if (!oops && range)
					{
						es = range.replace("x",t);
						es = es.replace("x",t);		
						if (eval(es))
							oops_range=true;

					}
			
				}
				else if (dt=="unit")
				{
					if (a.value.toLowerCase()!="auto")
					{
				
						t = parseInt(a.value);
						var r = parseFloat(a.value);
						if (isNaN(t) && isNaN(r))
							oops = true;
						else if (!qmv_lib_get_units(a.value))
							a.value = a.value+"px";

						if (isNaN(t))
							t = r;
					
						if (!oops && range)
						{
							es = range.replace("x",t);
							es = es.replace("x",t);	
							if (eval(es))
								oops_range=true;

						}
					
					}

				}
				else if (dt=="bool")
				{
					t = a.value.toLowerCase();
					if (t && t!="false")
						a.value = "true";

				}
				else if (dt=="float")
				{

					t = parseFloat(a.value);
					if (isNaN(t))
						oops = true;


				
					if (!oops && range)
					{
						es = range.replace("x",t);
						es = es.replace("x",t);	
						if (eval(es))
							oops_range=true;
					
					}
				}
				else if (dt.indexOf("edge")+1)
				{
					

					if (dt.indexOf("borderwidth")+1 || dt.indexOf("margin")+1 || dt.indexOf("padding")+1)
					{	
						
						if (t = a.value.replace(/\,/g," "))
						{
							if (isNaN(parseInt(t)) && isNaN(parseFloat(t)))
							{
								oops = true;

							}
							else
							{
						
								if (t.indexOf(" ")==-1)
								{
								
									if (!qmv_lib_get_units(t))
										a.value = t+"px";
								}
								else
								{
									var tt = "";
									t = t.split(" ");
									for (var k=0;k<t.length;k++)
									{
										if (t[k] && !qmv_lib_get_units(t[k]))
											t[k] = t[k]+"px";

									}
	
									var count = 0;
									for (var k=0;k<t.length;k++)
									{
										if (count>3 || !t[k]) continue;
									
										tt+=t[k]+" ";
										count++	
									}	
		
									a.value = tt.substring(0,tt.length-1);
	
								}
							}
						}

					}
				}
				else if (dt == "styleimage")
				{
				
					if (a.value && a.value.toLowerCase().indexOf("url(")==-1)
						a.value = "url("+a.value+")";

					if (a.value && a.value.indexOf(")")==-1)
						a.value = a.value+")";
					

				}
				else if (dt == "color")
				{

					if (!isNaN(parseInt(a.value,16)))
					{
						
						a.value = "#"+a.value;
					}


				}

			
				if (oops || oops_range)
				{

				
					a.value = a.prev_value;
	
					var show_range = "";	
					if (oops_range)
					{
						if (range=="x<0 || x>1")
							show_range = "<br><br>The valid range for this settings is between 0 and 1.";
						else if (range=="x<0")
							show_range = "<br><br>The value for this setting must be greater than 0.";
						else if (range=="x<0 || x>50")
							show_range = "<br><br>The valid range for this settings is between 0 and 50.";
						else if (range=="x<0 || x>20")
							show_range = "<br><br>The valid range for this settings is between 0 and 20.";
						else if (range=="x<0 || x>10")
							show_range = "<br><br>The valid range for this settings is between 0 and 10.";
				
					}

					if (!fromspin)
					{
						qmv_show_dialog("alert",null,"The value you selected or entered is invalid."+show_range,450);	
						return;
					}
	
				}
	
			
			}
		
		}

		
		
		
		var cat = a.getAttribute("category");
		

		if (a.iseditcolor)
		{
		
					
			var compare = a.prev_value.toLowerCase();
			for (var i=0;i<qmv.color_recent.length;i++)
			{
					
				if (qmv.color_recent[i].value==compare)
				{
							
					qmv.color_recent[i].inp.value = a.value;
					qmv_evt_update_tree_value(qmv.color_recent[i].inp,false,false,false,true,true);

					if (!a.value || a.value.toLowerCase()=="transparent")
						i--;

				}

			}

			a.prev_value = a.value;

			
			var ta = document.getElementById("qmvtree_color_shortcuts");
			if (ta.style.display=="block")
				qmv_shortcut_init(ta);	
			
			
			
			qmv_setbox_update_quick_color();
			return;

		}

		if (dt && dt=="color")
			qmv_color_build_button_set(a);
						
		
		var undo_inp = a;
		
		

		if (cat=="create")
			qmv_evt_update_menu_settings(a.value,a.rule,a.getAttribute("sname"),a.getAttribute("cname"),a.getAttribute("dtype"));
		else if (cat=="inline")
			qmv_evt_update_inline_style(a.value,a.rule_obj,a.getAttribute("sname"),a.getAttribute("cname"));
		else if (cat=="texturl")
		{

							

			var dlg = a.getAttribute("dlginp");
			if (!dlg || dlg=="text")
				qmv_evt_update_texturl(a);
			else
				qmvi_update_anchor_settings(a,dlg);


					
		}
		else if (cat=="addon")
		{
			

			if (!skip_mirror)
				qmv_evt_update_addon(a.value,a.rule_obj,a.getAttribute("sname"),a.getAttribute("cname"),a.getAttribute("dtype"),a,skip_update);
			//else
				//return;

		}
		else if (cat=="css")
		{

			if (!skip_mirror)
				qmv_evt_update_css_style(a.value,a.rule,a.getAttribute("sname"),a.getAttribute("cname"),null,null,fromspin);

			if (a.isfilter)
			{
				var rinp = qmv_find_update_tree_value("css",a.origrule,a.getAttribute("cname"),a.value,false,true);
				rinp.prev_value = a.value;
				undo_inp = rinp;
			}
			else if (!skip_filter_update && document.getElementById("qmvtree_filter").cdiv.style.display=="block")
			{
				qmv_filter_init2();
			}
			

			if (a.origrule.indexOf("qmpersistent")+1 && !qmv.addons.sopen_auto["on"+qmv.id])
			{
			
				qmv_show_dialog("question-yesno",null,"Persistent styles apply to all menu items which have URL links which match the location of the web page displaying the menu.<br><br>The persistent state add-on must be enabled and published with your menu for the styles to display, would you like to enable the persistent state add-on?",500,"qmv_context_cmd(new Object(),'addon_sopen_auto')");	

			}

			
			
		}
		else if (cat=="iextra")
		{
			if (!skip_mirror)
				qmv_evt_update_item_extra(a.value,a.getAttribute("sname"),a.getAttribute("cname"),a.rule,a.getAttribute("dtype"),a);
			//else
				//return;
		}
		


		
		
		if (!is_undo && !a.mirror)
		{
						
			qmvi_report_add_line("edits","undo","tree",cat,"",undo_inp,a.prev_value);
		}


		

		if (!skip_inherit && !fromspin && !is_quickcolor)
		{
			var ir = a.getAttribute("inheritrule");
			if (ir)
				qmv_inherit_style_question(ir,a.getAttribute("cname"),a.value,a);
			
		}


		
		
		if (cat!="addon" && !skip_update_addons)
		{
			var iefix = false;
			if (cat=="css" && qmad.br_ie)
				iefix = true;

			qmv_set_all_subs_to_default_position(true,iefix);
			qmv_update_all_addons();
		}


		if (!skip_mirror)
		{
			if (a.mirror)
			{
				
				a.mirror.value = a.value;
				qmv_evt_update_tree_value(a.mirror,null,null,null,null,null,null,true);
			}
			else
			{

				
				var sb = document.getElementById("qmvi_setbox");
				if (sb.style.visibility == "visible")
				{
					var sbi = sb.getElementsByTagName("INPUT");
					for (var i=0;i<sbi.length;i++)
					{
						if (sbi[i].mirror==a)
						{
							sbi[i].value = a.value;
							qmv_evt_update_tree_value(sbi[i],null,null,null,null,null,null,true);

							break;
						}

					}

				}

			}
		}


		
		
		qmv_position_pointer();
		a.prev_value = a.value;


				
		if (dt && !a.iseditcolor && !a.isfilter && !a.mirror)
		{
			
			if (dt=="color")
			{
				if (a.value)
					qmvi_color_recent_add(a,true);
				else
					qmvi_color_recent_remove(a);
			}

		}

		

		if (dt && dt=="color" && !is_quickcolor && !a.mirror)
		{
			
			var ta = document.getElementById("qmvtree_color_shortcuts");
			if (ta.style.display=="block")
				qmv_shortcut_init(ta);

			qmv_setbox_update_quick_color();
			
		}


	
	}
	catch(e)
	{
		
		if (a.prev_value)
		{
			
			qmv_show_dialog("warning-undo",a,"Invalid Value: The value you entered is not valid.",450)
			a.value = a.prev_value;
			return true;
		}

	}
	
	

	var code = a.getAttribute("code");
	if (!is_undo && code)
		eval(code);


	if (qmv.vdesign_tab!="design")
		qmvi_vd_tab_update_content();

			
	qmv.changed = true;
	
}




function qmv_evt_update_tree_value_enter(e,a)
{

	e = e || window.event;


	if (e.keyCode==13)
		qmv_evt_update_tree_value(a);
		
	

}



function qmv_evt_title_mousedown(e,src,type,isrel)
{
	

	
	e = e || window.event;
				
	qmv.title_mdown = true;
	qmv.title_prev_x = e.screenX;
	qmv.title_prev_y = e.screenY;
	qmv.title_move_shadow = false;
	qmv.title_type = type;
	qmv.title_relative = isrel;

	if (!type)
	{
		if (qmv.interface_full)
			return;

		qmv.title_obj = document.getElementById("qmvi");
		qmv.title_adjust_floating_window = true;
	}
	else
	{
		if (type==1)
		{
			qmv.title_obj = document.getElementById("qmvi_dialog");
			qmv.title_move_shadow = document.getElementById("qmvi_dialog_shadow");;
		}
		else if (type==2)
		{
			qmv.title_obj = document.getElementById("qmvi_msg_dialog");
			qmv.title_move_shadow = document.getElementById("qmvi_msg_dialog_shadow");
		}
		else if (type==3)
		{
			qmv.title_obj = document.getElementById("qmvi_help_dialog");
			qmv.title_move_shadow = document.getElementById("qmvi_help_dialog_shadow");
		}
		else if (type==4)
		{
			qmv.title_obj = document.getElementById("qmvi_setbox");
			qmv.title_move_shadow = document.getElementById("qmvi_setbox_shadow");
		}
		else if (type==5)
		{
			qmv.title_obj = document.getElementById("qmvi_logon");
			qmv.title_move_shadow = document.getElementById("qmvi_logon_shadow");
		}
		else
		{
			qmv.title_obj = type;
			
		}
	}

	
	src.style.cursor = "move";

	qm_kille(e);
	return false;

}



function qmv_evt_title_mousemove(e,src)
{
	
	e = e || window.event;	
	var m = qmv.title_obj;	
	if (!m) return;

	if (qmv.title_mdown)
	{
		
				
		var xdif = qmv.title_prev_x-e.screenX;
		var ydif = qmv.title_prev_y-e.screenY;
	
		if (qmv.title_relative)
		{

			m.style.left = (parseInt(m.style.left)-xdif)+"px";
			m.style.top = (parseInt(m.style.top)-ydif)+"px";

		}
		else
		{
			m.style.left = (m.offsetLeft-xdif)+"px";
			m.style.top = (m.offsetTop-ydif)+"px";
		}
		

		if (qmv.title_move_shadow)
		{
			
			qmv.title_move_shadow.style.left = parseInt(m.style.left)+3+"px";
			qmv.title_move_shadow.style.top =  parseInt(m.style.top)+3+"px";
		}

		
		qmv.title_prev_x = e.screenX;
		qmv.title_prev_y = e.screenY;


		qmv.title_moved = true;		

		if (qmad.br_ie)
			src.setCapture(true);

		
		qm_kille(e);
		return false;
		
	}

}


function qmv_evt_title_mouseup(e,src)
{
	
	if (qmv.title_adjust_floating_window) qmv_auto_size_interface_height();
		

	qmv.title_mdown = false;
	if (qmv.title_moved && qmad.br_ie)
		src.releaseCapture(true);
	
	
	src.style.cursor = "";
	
	
	
}


function qmv_evt_move_fixcapture(e)
{
	e = e || widow.event;	
	

	if (qmv.title_mdown)
	{
		
		qmv_evt_title_mousemove(e,document.getElementById("qmvi_title"))
	}
	
	if (qmv.container_moved)
		qmv_container_mouse_move(e,qmv.container_obj);


}

function qmv_evt_fix_mouse_up(e)
{

	if (!qmv.preview_mode) qm_la = null;
	
	if (qmv.color_vals && qmv.color_vals.bright_down)
		qmv_color_brightness_mouseup(e,document.getElementById("qmvi_color_bright_bar"))

	if (qmv.color_vals && qmv.color_vals.hs_down)
		qmv_color_huesaturation_mouseup(e,document.getElementById("qmvi_color_hs_div"))

}


function qmv_evt_kill_click(e)
{

	e = e || event;

	qm_kille(e,true);
	return false;

}


function qmv_evt_bb_click(type)
{


	if (type=="add" || type=="insert" || type=="delete" || type=="addsub" || type=="moveup" || type=="movedown" || type=="copyitem" || type=="pasteitem")
	{

		qmv_modify_items(type);

	}
	else if (type=="addmenu")
	{

		qmv_add_new_menu();

	}
	else if (type=="deletemenu")
	{

		qmv_delete_menu();
	}
	else if (type=="save")
	{

		qmv_evt_menu_item_click('save');

	}
	else if (type=="publish")
	{

		qmv_evt_menu_item_click('quick_publish');

	}
	else if (type=="preview")
	{

		qmv_evt_menu_item_click('preview');

	}
	else if (type=="specs")
	{
		qmv_context_cmd(new Object(),'specs');

	}
	else if (type=="insert_divider")
	{
		qmv_context_cmd(new Object(),'insert_divider');

	}
	else if (type=="insert_cbox")
	{
		qmv_context_cmd(new Object(),'insert_cbox');

	}
	else if (type=="insert_title")
	{
		qmv_context_cmd(new Object(),'insert_title');

	}	
	else if (type=="style_divider")
	{
		qmv_context_cmd(new Object(),'divider_styles');

	}
	else if (type=="style_title")
	{
		qmv_context_cmd(new Object(),'title_styles');
	}
	else if (type=="style_cbox")
	{
		qmv_context_cmd(new Object(),'cbox_styles');
	}
	else if (type=="quickcolors")
	{
		qmv_context_cmd(new Object(),'quick_color_edits');
	}
	


}

function qmv_evt_addremove_addon(e,a)
{

	e = e || event;
	

	var at = a.parentNode;
	while (at.tagName!="A")
		at = at.parentNode;

	
	var add_type = at.cdiv.getAttribute("addontype");


	

	if (a.checked)
	{
		
		
		var inp = at.cdiv.getElementsByTagName("INPUT");
		for (var i=0;i<inp.length;i++)
		{

			var ad = inp[i].getAttribute("addondefault");
			if (ad)
			{
				
				if ((ad!="blank" && !inp[i].value) || (!isNaN(parseInt(inp[i].value)) && !parseInt(inp[i].value)))
				{
					inp[i].value = ad;
					qmv_evt_update_tree_value(inp[i],null,true,true)
					
				}

			}	


		}

		
		if (add_type=="ritem")
		{

			qmv_show_dialog("alert",null,"Rounded items are recommended for advanced users. Each rounded item sits on top of the standard menu item, tweaking the position and look of the rounded items requires a good working knowledge of adjusting menu padding, margins, and colors.<br><br>Because the rounded items are position absolute, you will have to adjust the standard setting margins and padding to adjust how the items appear next to each other. If your rounded items are bigger than the standard items, they may overlap in the subs, use padding to increase the standard item sizing which will also adjust the rounded item positioning.<br><br>Because rounded items sit within the existing menu items, any item square borders or colors will be visible at the rounded corners edges, these options are typically turned off to achieve the desired effect.  You can use the CSS styles or the included quick options in the rounded item add-on settings to adjust these styles.<br><br>It's easiest to work from a rounded item template rather than applying this add-on to an existing menu.",500);


		}


		if (qmv_check_addon_compatability(qmv.addons[add_type]))
		{
			
			a.checked = false;
			qmv_setbox_update_addon_check(a);

			qm_kille(e,true);
			return;
		}

		
		qmv.addons[add_type]["on"+qmv.id] = true;

		
		if (window["qmv_update_"+add_type])
			eval("qmv_update_"+add_type+"()");


		
		if (a[qp].cdiv.style.display!="block")
			qm_vtree_item_click(a[qp].cdiv);
		

	}
	else
	{
		
		if (window["qmv_update_"+add_type])
			eval("qmv_update_"+add_type+"(true)");


		qmv.addons[add_type]["on"+qmv.id] = false;
		
		

	}

	
	qmv_setbox_update_addon_check(a);

	qmv_position_pointer();
	qmv_update_all_addons(add_type);

	
	qm_kille(e,true);

}


function qmv_evt_menu_item_click(type)
{

	

	
	if (type=="options")
	{
		qmv_show_dialog("options");

	}
	else if (type=="new")
	{
		
		qmvi_template_show_dialog_new();

	}
	else if (type=="open")
	{
		
		qmv_show_dialog("open");

	}	
	else if (type=="preview")
	{
		qmv_preview_menu();

	}
	else if (type=="publish")
	{

		qmv_show_dialog("publish1");

	}
	else if (type=="quick_publish")
	{

		qmv_show_dialog("quick_publish");

	}
	else if (type=="save")
	{

		qmv_show_dialog("save");

	}
	else if (type=="quick_publish_inline")
	{

		qmv_show_dialog("quick_publish_inline");
		

	}
	else if (type=="create_component")
	{
		qmv_show_dialog("create_component");
	}
	else if (type=="import")
	{


		
		var ir = document.createElement("SPAN");
		ir.style.position = "absolute";
		ir.style.visibility = "hidden";
		document.body.appendChild(ir);
		ir.innerHTML = '<iframe onreadystatechange="qmvi_iframe_loaded(event)" id="qmvi_temp_iframe" src="http://www.opencube.com"></iframe>'
		
	}
	else if (type=="help")
	{
		
		qmv_show_dialog("help-index",null,"help-index.html");

	}
	else if (type.indexOf("iface_switch")+1)
	{
		if (type.indexOf("full")+1 && !qmv.interface_full)
			qmv_set_interface_mode("full");
		else if (type.indexOf("inpage")+1 && qmv.interface_full)
			qmv_set_interface_mode("inpage");
	}
	else if (type=="dev_tplate_css")
	{

		qmv_show_dialog("devpubcss");


	}
	else if (type=="save_images")
	{

		qmv_show_dialog("save_images");


	}
	else if (type=="html_page")
	{

		qmv_view_html_page();


	}


	
}

function qmvi_iframe_loaded(e)
{

	e = e || window.event;
	var ifobj = document.getElementById("qmvi_temp_iframe");
	var iwin = null;

	if (ifobj.readyState && ifobj.readyState!="interactive")
		return;

	

}




function qm_kille(e,skip_default)
{

	
	if (!e) e = event;
	e.cancelBubble = true;
	if (e.stopPropagation)
		 e.stopPropagation();

	
	if (!skip_default)
	{
		
		if (e.preventDefault)
			e.preventDefault();

		e.returnValue = false;
	}
}


function qmv_tree_oo(e,o,nt)
{
	e = e || window.event;
	if (e.button!=0) return;

	if (!o) o=this;

	qmv_hide_context();

	
	if (window.qmwait) return;
		
	var a = o;
	if (a[qp].isrun) return;
	
		
	var b = o;	
	if (b.cdiv)
	{
	
				
		qm_arc("qmactive",o,true);
		
		qm_vtree_item_click(b.cdiv);
		qmv_ibullets_active(o,false);
		b.cdiv.style.visibility ="inherit";
		

	}
	


	
	qm_kille(e);
	

}

function qmv_tree_uo(a,go)
{
	
	
	if (!go && a.qmtree) return;

	
	qmv_ibullets_active(a,true);

	a.style.visibility = "";
	qm_arc("qmactive",a.idiv);
	

}


function qmv_evt_build_button_click(a,spin)
{

	var fa = a.parentNode;
	while (fa.tagName!="A" && fa.tagName!="TBODY")
		fa = fa.parentNode;


	var inp = fa.getElementsByTagName("INPUT")[0];


	
	if (!spin)
	{
		qmv_show_build_dialog(inp.getAttribute("dtype"),inp);

	}
	else
	{

		inp.prev_value = inp.value;
		inp.value = qmv_spin_value(spin,inp.getAttribute("dtype"),inp.value);
		qmv_evt_update_tree_value(inp,true);

	}

}



//************************** utilites library


function qmv_lib_get_position_relative_to_main_menu_container(obj)
{

	var l = obj.offsetLeft;
	var t = obj.offsetTop;	

	while (!qm_a(obj = obj[qp]))
	{
		var bs = qm_lib_get_computed_style(obj,"border-style","borderStyle");
				
		var bt = 0;
		var bl = 0;
		if (qmad.br_fox || (bs && bs.toLowerCase()!="none"))
		{
			bt = qm_lib_get_computed_style(obj,"border-top-width","borderTopWidth",true);
			bl = qm_lib_get_computed_style(obj,"border-left-width","borderLeftWidth",true);
		}
		
		
		l += obj.offsetLeft+bl;
		t += obj.offsetTop+bt;
		
	}


	return new Array(l,t);

}

function qm_lib_get_computed_style(obj,sname,jname,isint)
{
	var v;
	if (document.defaultView && document.defaultView.getComputedStyle)
		v = document.defaultView.getComputedStyle(obj, null).getPropertyValue(sname);
	else if (obj.currentStyle)
		v = obj.currentStyle[jname];		

	if (isint)
	{
		if (v && !isNaN(v = parseInt(v)))
			return v;
		else
			return 0;
	}

	return v;
}

function qmv_lib_get_units(checkval)
{

	checkval = checkval.toLowerCase();

	if (checkval.indexOf("px")+1)
		return "px";
	else if (checkval.indexOf("em")+1)
		return "em";
	else if (checkval.indexOf("cm")+1)
		return "cm";
	else if (checkval.indexOf("mm")+1)
		return "mm";
	else if (checkval.indexOf("in")+1)
		return "in";
	else if (checkval.indexOf("pt")+1)
		return "pt";
	else if (checkval.indexOf("ex")+1)
		return "ex";
	else if (checkval.indexOf("pc")+1)
		return "pc";
	else if (checkval.indexOf("%")+1)
		return "%";	
	
	return "";

}


function qmv_lib_get_menu_count()
{

	var count = 0;

	for (var i=0;i<10;i++)
	{

		if (document.getElementById("qm"+i))
			count++;
	}
	

	return count;
}

function qmv_lib_get_new_menu_id()
{

	var i = 0;
	while (document.getElementById("qm"+i))
		i++;
	

	return i;
}

function qmv_lib_update_add_rule_styles(style,rules,search,value,append)
{
	
	for (var i=0;i<rules.length;i++)
	{

		if (rules[i].selectorText.toLowerCase() == search)
		{
			if (append)
			{
				rules[i].style.cssText+=value;
			}
			else
				rules[i].style.cssText = value;

			return;
		}	

	}	
	

	var ss = search.split(",");
	for (var i=0;i<ss.length;i++)
	{
		

		if (style.addRule)
			style.addRule(ss[i],value);
		else if (style.insertRule)
			style.insertRule(ss[i]+" {"+value+"}",0);

	}
	

	qmv_update_styles_object();

}

function qmv_lib_update_remove_rule(style,rules,search,value)
{

		
	for (var i=0;i<rules.length;i++)
	{

		if (rules[i].selectorText.toLowerCase().split(",")[0] == search)
		{
			if (qmad.br_s3)
			{
				rules[i].style.cssText = null;
			}
			else
			{
				if (style.removeRule)
					style.removeRule(i);
				else
					style.deleteRule(i);
			}
			
				
			return;
		}	

	}	

	
	


}



function qmv_lib_parse_value(value,dtype,rfalse,rnull)
{

	var rv;

	if (dtype=="int")
	{
		
		if (value)
		{
			
			rv = parseInt(value);
			if (!isNaN(rv)) return rv;
			
		}
		
		if (rfalse)		
			return false;
		else if (rnull)
			return null;
		else
			return 0

	}
	else if (dtype=="float")
	{

		if (value)
		{
			
			rv = parseFloat(value);
			if (!isNaN(rv)) return rv;

		}
				
		if (rfalse)		
			return false;
		else if (rnull)
			return null;
		else
			return 0


	}
	else if (dtype=="bool")
	{

		if (value+"".toLowerCase()=="false")
			return false;
		else if (value+"".toLowerCase()=="true")
			return true;
		else if (value)
			return true;

		if (rnull)
			return null;
		else
			return false;

	}
	else if (dtype=="corners-bool-array")
	{
		if (value)
			return eval("new Array("+value+")");
		else if (rnull)
			return null;
		else if (rfalse)
			return false;
		else
			return "";	

	}

	return value;


}



function qm_get_level(a)
{

	lev = 0;
	while (!qm_a(a) && (a=a[qp]))
		lev++;


	return lev;

}

function qm_index(a)
{
		
	return qm_get_menu(a).id.substring(2);


}

function qm_get_menu(a)
{

	while (!qm_a(a) && (a=a[qp]))
		continue;


	return a;

}


function qmv_lib_get_qm_stylesheet(searchfor)
{

	if (!searchfor)
		searchfor = ".qmmc";

	var ss = document.styleSheets;
	

	for (var i=0;i<ss.length;i++)
	{
		if (qmad.br_ie)
		{
			
			if (ss[i].cssText && ss[i].cssText.toLowerCase().indexOf(searchfor)+1)
				return ss[i]
		}
		else
		{
			var rules = ss[i].cssRules;
			if (rules)
			{
				for (var j=0;j<rules.length;j++)
				{
					if (rules[j].selectorText.toLowerCase().indexOf(searchfor)+1)
						return ss[i];

				}
			}

		}


	}


	

}



function qmv_lib_is_menu_vertical(id)
{
	var fa = document.getElementById("qm"+id).getElementsByTagName("A");
	var isv = fa[0].style.styleFloat || fa[0].style.cssFloat;

	return isv;
	

}


function qmv_lib_get_window_dimensions()
{

	var dh = 0;
	var dw = 0;
	if (window.innerHeight)
	{
		dh = window.innerHeight;
		dw = window.innerWidth;

	}
	else
	{
		dh = document.documentElement.clientHeight;
		dw = document.documentElement.clientWidth;
	}
		
	return new Array(dw,dh);

}

function qmv_lib_center_element_in_window(a)
{
	
	var wd = qmv_lib_get_window_dimensions();
	var dw = wd[0];
	var dh = wd[1];


	var qw = a.offsetWidth;
	var qh = a.offsetHeight;

	var d;
	var st = 0;
	var sl = 0;
	if (d = document.documentElement)
	{
		st = d.scrollTop;
		sl = d.scrollLeft;
	}


	if (qmad.br_ie && !qmad.br_strict)
	{
		a.style.top = 50+"px";
		a.style.left = 50+"px";

	}
	else
	{
		a.style.top = (parseInt((dh-qh)/2)+st)+"px";
		a.style.left = (parseInt((dw-qw)/2)+sl)+"px";
	}

}


function qmv_lib_insert_after(ins,obj)
{

	if (obj.nextSibling)
		return obj.parentNode.insertBefore(ins,obj.nextSibling);
	else
		return obj.parentNode.appendChild(ins);

	

}

function qmv_lib_get_nextsibling_atag(a)
{

	ps = a.nextSibling;
	while (ps && ps.tagName!="A")
		ps = ps.nextSibling;


	return ps;
}

function qmv_lib_get_previoussibling_atag(a)
{

	ps = a.previousSibling;
	while (ps && ps.tagName!="A")
		ps = ps.previousSibling;


	return ps;
}


function qmv_lib_get_nextsibling_atag_or_span(a)
{

	ps = a.nextSibling;
	while (ps)
	{
		
		if (ps.tagName=="SPAN")
		{
			
			if (ps.className.indexOf("qmtitle")+1)
				break;	

			if (ps.className.indexOf("qmdivider")+1)
				break;	
				
		}

		if (ps.tagName=="A")
			break;

		ps = ps.nextSibling;

	}

	if (!ps || (ps.tagName!="SPAN" && ps.tagName!="A")) ps = null;

	return ps;
}

function qmv_lib_get_previoussibling_atag_or_span(a)
{

	ps = a.previousSibling;
	while (ps)
	{
		
		if (ps.tagName=="SPAN")
		{
			
			if (ps.className.indexOf("qmtitle")+1)
				break;	

			if (ps.className.indexOf("qmdivider")+1)
				break;	
				
		}

		if (ps.tagName=="A")
			break;

		ps = ps.previousSibling;

	}

	
	if (!ps || (ps.tagName!="SPAN" && ps.tagName!="A")) ps = null;
	

	return ps;

}


function qmv_lib_get_nextsibling_span(a,classname)
{

	ps = a.nextSibling;
	while (ps && ps.tagName!="A")
	{
		
		if (ps.tagName=="SPAN")
		{
			
			if (classname && ps.className.indexOf(classname)+1)
				break;	

			if (!classname)
				break;
		
		}

		ps = ps.nextSibling;

	}

	if (!ps || ps.tagName!="SPAN") ps = null;

	return ps;
}

function qmv_lib_get_previoussibling_span(a,classname)
{

	ps = a.previousSibling;
	while (ps && ps.tagName!="A")
	{
		
		if (ps.tagName=="SPAN")
		{
			
			if (classname && ps.className.indexOf(classname)+1)
				break;	

			if (!classname)
				break;
		
		}

		ps = ps.previousSibling;

	}

	if (!ps || ps.tagName!="SPAN") ps = null;

	return ps;
}




//dialog functions


function qmv_show_build_dialog(dtype,owner)
{

	var type = "zoom";

	
	if (dtype=="color")
		type = "color";
	else if (dtype=="texturl")
	{
		if (qmv.texturl_state=="url")	
			type = "url";
	}
	else if (dtype.indexOf("edge")+1)
	{


		type = "edge";
		qmv.edge = new Object();
		qmv.edge.title = "Edge Properties";
		qmv.edge.width = 280;
		qmv.edge.dtype = "unit";


		if (dtype.indexOf("borderwidth")+1)
		{
			qmv.edge.title = "Border Width"
	
		}
		else if (dtype.indexOf("padding")+1)
		{
			qmv.edge.title = "Padding"


		}
		else if (dtype.indexOf("margin")+1)
		{
			qmv.edge.title = "Margin"

		}
		
		
	}
	else if (dtype=="bool")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("true","false");
		qmv.multi.vals = new Array("true","false");
		qmv.multi.title = "True / False";
		qmv.multi.desc = "True / False"

	}	
	else if (dtype=="styleimagerepeat")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("repeat","no-repeat");
		qmv.multi.vals = new Array("repeat","no-repeat");
		qmv.multi.title = "Background Repeat";
		qmv.multi.desc = "Repeat"



	}
	else if (dtype=="visibility")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("visible","inherit","hidden");
		qmv.multi.vals = new Array("visible","inherit","hidden");
		qmv.multi.title = "Set Visibility";
		qmv.multi.desc = "Visibility"



	}
	else if (dtype=="styleimageposition")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("top left","top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right");
		qmv.multi.vals  = new Array("top left","top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right");
		qmv.multi.title = "Background Position";
		qmv.multi.desc = "Background"


	}
	else if (dtype=="fontfamily")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("Arial","Times New Roman", "Verdana", "Georgia", "Comic Sans MS", "Courier New");
		qmv.multi.vals  = new Array("Arial","Times New Roman", "Verdana", "Georgia", "Comic Sans MS", "Courier New");
		qmv.multi.title = "Font Family";
		qmv.multi.desc = "Font"
	}				
	else if (dtype=="textdecoration")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("none","underline","overline","line-through" ,"blink");
		qmv.multi.vals  = new Array("none","underline","overline","line-through" ,"blink");
		qmv.multi.title = "Text Decoration";
		qmv.multi.desc = "decoration"
	}
	else if (dtype=="onclick")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("false","all","all-always-open","lev2","main");
		qmv.multi.vals  = new Array("false","all","all-always-open","lev2","main");
		qmv.multi.title = "onClick";
		qmv.multi.desc = "onClick Options"
	}
	else if (dtype=="fontweight")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("normal","bold","bolder","lighter");
		qmv.multi.vals  = new Array("normal","bold","bolder","lighter");
		qmv.multi.title = "Font Weight";
		qmv.multi.desc = "Weight"

	}
	else if (dtype=="fontstyle")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("normal","italic","oblique");
		qmv.multi.vals  = new Array("normal","italic","oblique");
		qmv.multi.title = "Font Style";
		qmv.multi.desc = "Style"

	}
	else if (dtype=="borderstyle")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("none","dotted","dashed","solid","double","groove","ridge","inset","outset");
		qmv.multi.vals  = new Array("none","dotted","dashed","solid","double","groove","ridge","inset","outset");
		qmv.multi.title = "Border Style";
		qmv.multi.desc = "Style"

	}
	else if (dtype=="ibullets-apply")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("parents","non-parent","all");
		qmv.multi.vals  = new Array("parent","non-parent","all");
		qmv.multi.title = "Apply Bullets To These Items";
		qmv.multi.desc = "Apply"

	}
	else if (dtype=="hoverfill-apply")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("parents","non-parent","all");
		qmv.multi.vals  = new Array("parent","non-parent","all");
		qmv.multi.title = "Apply hover fill effect To These Items";
		qmv.multi.desc = "Apply"

	}
	else if (dtype=="hoverfill-direction")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("center","up","down","right","left");
		qmv.multi.vals  = new Array("center","up","down","right","left");
		qmv.multi.title = "Hover Fill Direction";
		qmv.multi.desc = "Direction"

	}
	else if (dtype=="hoverfill-type")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("none","grow","fade");
		qmv.multi.vals  = new Array("none","grow","fade");
		qmv.multi.title = "Hover Fill Animation Type";
		qmv.multi.desc = "Animation Type"

	}
	else if (dtype=="tabscss-type")
	{
		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("angled","rounded");
		qmv.multi.vals  = new Array("angled","rounded");
		qmv.multi.title = "Tab Style Type";
		qmv.multi.desc = "Type"

	}
	else if (dtype=="corners-bool-array")
	{

		type = "edge";
		qmv.edge = new Object();
		qmv.edge.title = "Apply to Corners";
		qmv.edge.width = 330;
		qmv.edge.dtype = "bool";
		qmv.edge.corners = true;
		qmv.edge.array = true;
	}
	else if (dtype=="treeanimationtype")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("none", "acceleration", "deceleration", "normal");
		qmv.multi.vals  = new Array(0,1,2,3);
		qmv.multi.title = "Tree Animation Styles";
		qmv.multi.desc = "Animation"

	}
	else if (dtype=="textalign")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("left", "center", "right");
		qmv.multi.vals  = new Array("left", "center", "right");
		qmv.multi.title = "Text Alignment";
		qmv.multi.desc = "Alignment"

	}
	else if (dtype=="verticalalign")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("top", "middle", "bottom");
		qmv.multi.vals  = new Array("top", "middle", "bottom");
		qmv.multi.title = "Vertical Alignment";
		qmv.multi.desc = "Alignment"

	}
	else if (dtype=="ibcss-type")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("none","arrow", "arrow head", "arrow head (separated)","open v arrow","open v arrow head","opan v arrow head (separated)","square","square w/ inner","raised square");
		qmv.multi.vals  = new Array("none","arrow","arrow-head","arrow-gap","arrow-v","arrow-head-v","arrow-gap-v","square","square-inner","square-raised");
		qmv.multi.title = "Bullet Shapes";
		qmv.multi.desc = "Shape"

	}
	else if (dtype=="ibcss-direction")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("up","down","right","left");
		qmv.multi.vals  = new Array("up","down","right","left");
		qmv.multi.title = "Bullet Direction";
		qmv.multi.desc = "Direction"

	}
	else if (dtype=="bump-direction")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("none","up","down","right","left");
		qmv.multi.vals  = new Array("none","up","down","right","left");
		qmv.multi.title = "Bump Direction";
		qmv.multi.desc = "Direction"

	}
	else if (dtype=="palign")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("top or left","bottom or right");
		qmv.multi.vals  = new Array("top-or-left","bottom-or-right");
		qmv.multi.title = "Pointer Location";
		qmv.multi.desc = "Location"

	}
	else if (dtype=="box-position")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("center","top","left","top-left");
		qmv.multi.vals  = new Array("center","top","left","top-left");
		qmv.multi.title = "Pointer Location";
		qmv.multi.desc = "Location"

	}
	else if (dtype=="ritem-apply")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("main","sub","main-sub","parents","titles","dividers");
		qmv.multi.vals  = new Array("main","sub","main-sub","parents","titles","dividers");
		qmv.multi.title = "Apply Rounding";
		qmv.multi.desc = "Apply Rounded Items"

	}
	else if (dtype=="font-variant")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("normal","small-caps");
		qmv.multi.vals  = new Array("normal","small-caps");
		qmv.multi.title = "Font Variant";
		qmv.multi.desc = "Font Variant"

	}
	else if (dtype=="display")
	{

		type="multi";
		qmv.multi = new Object();
		qmv.multi.show = new Array("block","inline","none");
		qmv.multi.vals  = new Array("block","inline","none");
		qmv.multi.title = "Display";
		qmv.multi.desc = "Display"

	}		
	else if (dtype.indexOf("image")+1)
	{

		type="image";
		

	}


	


	qmv_show_dialog(type,owner);

}

function qmv_set_publish_menus_object()
{
	
	if (!qmv.publish)
	{
		qmv.publish = new Object();
		
		
		qmv.publish.css_type = "inpage";
		qmv.publish.code_type = "inpage";
		qmv.publish.structure_type = "inpage";
		
	}

	qmv.publish.smenus = new Array();
	qmv.publish.smenus_pos=0;

	for (var i=0;i<10;i++)
	{

		if (document.getElementById("qm"+i))
			qmv.publish.smenus.push(i);
			
	}


}


function qmv_show_dialog(type,owner,message,w,code,code1,defbutton,defval,from_event_log)
{

	
	var ih = "";
	var title = "Visual QuickMenu";
	var width = w;
	if (!width) width = 300;

	
	var mg = "";
	if (message) mg = "msg_";
	if (message && message.indexOf("help-")+1) mg = "help_";

	
	if (defval==null || defval==undefined) defval = "";

	var buttons = "ok|cancel|apply";


	if (type=="color")
	{
		buttons = "OK|Cancel|Apply";
		title = "Color Picker";
		width = 420;
	
		
			ih += '<div style="padding:5px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 width=100%><tr>';

				ih += '<td style="text-align:left;vertical-align:top;padding-right:15px;">';

					ih += '<table cellpadding=0 cellspacing=0 border=0><tr>';
					
						//hue saturation rainbow

						ih += '<td style="padding-right:15px;">';
						ih += '<div style="position:relative;">'
						ih += '<img id="qmvi_color_hs_down" width=8 height=6 src="'+qmv.base+'images/color_arrow_down.gif" style="position:absolute;display:block;margin-top:-8px;margin-left:-3px">';
						ih += '<img id="qmvi_color_hs_right" width=6 height=8 src="'+qmv.base+'images/color_arrow_right.gif" style="position:absolute;display:block;margin-top:-3px;margin-left:-8px">';
						ih += '<div class="qmvi-colordialog-border" style="position:relative;">';

						ih += '<div id="qmvi_color_hs_div" onselectstart="qm_kille(event)" onmouseup="qmv_color_huesaturation_mouseup(event,this)" onmousedown="qmv_color_huesaturation_mousedown(event,this)" onmousemove="qmv_color_huesaturation_mousemove(event,this)" style="position:relative;display:block;background-image:url('+qmv.base+'images/rgb.jpg);width:175px;height:187px;position:relative;overflow:hidden;">';	
						ih += '<div id="qmvi_color_hs_crosshair" style="width:19px;height:19px;background-image:url('+qmv.base+'images/color_crosshair.gif);position:absolute;display:block;margin-top:-10px;margin-left:-10px"></div>';
						ih += '</div>';

						ih += '</div>'
	
						ih += '</div>';
						ih += '</div>';
						ih += '</td>';


						//brightness rainbow

						ih += '<td style="">';
						ih += '<div class="qmvi-colordialog-border" style="position:relative;">';	
						ih += '<img id="qmvi_color_bright_right" width=6 height=8 src="'+qmv.base+'images/color_arrow_right.gif" style="position:absolute;margin-top:-3px;margin-left:-8px">';	
						ih += '<div onselectstart="qm_kille(event)" id="qmvi_color_bright_bar" onmouseup="qmv_color_brightness_mouseup(event,this)" onmousedown="qmv_color_brightness_mousedown(event,this)" onmousemove="qmv_color_brightness_mousemove(event,this)" style="position:relative;width:10px;height:187px;">';

							for (k=0;k<17;k++)
								ih += '<div class="qmvi-colordialog-brightbar-parts">&nbsp;</div>';

						ih += '</div>';
						ih += '</div>';
						ih += '</td>';

					ih += '</tr></table>';
					

				ih += '</td>';	



				ih += '<td style="vertical-align:top;width:100%;">';

					//color indicator
					ih += '<div onclick="qmvi_color_open_recent(this)" id="qmvi_color_indicator" class="qmvi-colordialog-border" style="text-align:right;height:25px;background-color:#000000;">';

					if (qmv.color_recent && qmv.color_recent.length)
						ih += '<img style="margin-top:3px;margin-right:3px;" src="'+qmv.base+'images/color_plus.gif" width=11 height=11>';

					ih += '</div>';

					ih += '<div id="qmvi_color_recent" class="qmvi-colordialog-border" style="border-top-width:0px;visibility:hidden;position:absolute;background-color:#888888;">';
					ih += '</div>';
				

					ih += '<div style="font-size:1px;height:20px;"></div>';


					//value display
					ih += '<div>';
						ih += '<table cellpadding=0 cellspacing=0 border=0 width="100%" style=""><tr>';



							//rgb values
							
							ih += '<td style="">';

								
								ih += '<form id="qmvi_color_switches" style="display:block;margin:0px;padding:0px;">';
								ih += '<table cellpadding=0 cellspacing=0 border=0>';

									ih += '<tr>';
									ih += '<td id="qmvi_cdialog_rtext" class="qmvi-common qmvi-colordialog-titles" style="width:45px;padding-right:10px;text-align:right;">Red:</td>';
									ih += '<td style="width:35px;"><input onkeypress="qmv_color_field_onchange_enter(event,this)" onfocus="this.pvalue = this.value" onchange="qmv_color_field_onchange(event,this)" class="qmvi-common qmvi-colordialog-inputs" id="qmv_cdialog_r" type="text" style="width:30px;"></td>'
									ih += '<td style="width:15px">&nbsp;</td>';
									ih += '<td style="padding-right:2px;"><input onfocus="if (!qmad.br_ie)blur()" tabindex=-1 onclick="qmv_color_set_fields()" name="qmvi_color_switch" type="radio" checked value="RGB"></td>'
									ih += '<td style="width:20px;" class="qmvi-common qmvi-colordialog-titles" style="text-align:left;">RGB</td>';
									ih += '</tr>';
									
									ih += '<tr><td style="font-size:1px;height:2px;">&nbsp;</td></tr>';

									ih += '<tr>';
									ih += '<td id="qmvi_cdialog_gtext" class="qmvi-common qmvi-colordialog-titles" style="padding-right:10px;text-align:right;">Green:</td>';
									ih += '<td><input onkeypress="qmv_color_field_onchange_enter(event,this)" onfocus="this.pvalue = this.value" onchange="qmv_color_field_onchange(event,this)" class="qmvi-common qmvi-colordialog-inputs" id="qmv_cdialog_g" type="text" style="width:30px;"></td>'
									ih += '<td style="width:15px">&nbsp;</td>';
									ih += '<td style="padding-right:2px;"><input onfocus="if (!qmad.br_ie)blur()" tabindex=-1 onclick="qmv_color_set_fields()" name="qmvi_color_switch" type="radio" value="HEX"></td>'
									ih += '<td class="qmvi-common qmvi-colordialog-titles" style="text-align:left;">HEX</td>';
									ih += '</tr>';
									
									ih += '<tr><td style="font-size:1px;height:2px;">&nbsp;</td></tr>';

									ih += '<tr>';
									ih += '<td id="qmvi_cdialog_btext" class="qmvi-common qmvi-colordialog-titles" style="padding-right:10px;text-align:right;" >Blue:</td>';
									ih += '<td><input onkeypress="qmv_color_field_onchange_enter(event,this)" onfocus="this.pvalue = this.value" onchange="qmv_color_field_onchange(event,this)" class="qmvi-common qmvi-colordialog-inputs" id="qmv_cdialog_b" type="text" style="width:30px;"></td>'
									ih += '<td style="width:15px">&nbsp;</td>';
									ih += '<td style="padding-right:2px;"><input onfocus="if (!qmad.br_ie)blur()" tabindex="-1" onclick="qmv_color_set_fields()" name="qmvi_color_switch" type="radio" value="HSB"></td>'
									ih += '<td class="qmvi-common qmvi-colordialog-titles" style="text-align:left;">HSB</td>';
									ih += '</tr>';
																	
								
								ih += '</table>';
								ih += '</form>';
									
							ih += '</td>';
							
						ih += '</tr></table>';

					ih += '</div>';


					
					if (qmad.br_ie)
						ih += '<div style="font-size:1px;height:5px;"></div>';	
					else
						ih += '<div style="font-size:1px;height:15px;"></div>';	
					

					ih += '<div>';

						ih += '<fieldset class="qmvi-colordialog-border qmvi-colordialog-titles" style="margin:0px;padding:10px;text-align:center;"><legend class="qmvi-common" style="color:#0033dd;margin:0px;">Apply Value As</legend>';

						if (qmad.br_ie)
							ih += '<div style="font-size:1px;height:5px;"></div>';	

						ih += 'HEX:&nbsp;<input onfocus="if (!qmad.br_ie)blur()" tabindex="-1" id="qmvi_color_apply_type_hex" name="qmvi_color_apply_type" value="HEX" checked type="radio" style="margin-bottom:-1px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB:&nbsp;<input onfocus="if (!qmad.br_ie)blur()" tabindex="-1" id="qmvi_color_apply_type_rgb" name="qmvi_color_apply_type" value="RGB" type="radio" style="margin-bottom:-1px;">';

						ih += '</fieldset>';

					ih += '</div>'


				ih += '</td>';	

			

			ih += '</tr></table>';
			ih += '</div>';


			
		

	}
	else if (type=="save")
	{

		
		buttons = "Done";
		title = "Save Menu";
		width = 600;

		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Copy QuickMenu Contents to a New HTML Document</div>';

			

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste the contents below to a blank document with a .html extension (use NotePad, FrontPage, Dreamweaver, or similar).  Open in a browser to test and visually edit the saved menu.</div>';



			ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_save_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';

			ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
			ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_save_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;"></textarea>';
			ih += '</div>';

			

		ih += '</div>';


		


	}
	else if (type=="preview")
	{
		
		
		buttons = "Close";
		title = "Preview Menu";
		
		
		var wd = qmv_lib_get_window_dimensions();
		width = wd[0]-100;
		var ihh = wd[1]-200;
		var ihw = width-42;

		
		ih += '<div style="padding:10px;">';

			ih += '<div style="margin-bottom:5px;">';			
				ih += '<table cellpadding=0 cellspacing=0 border=0 style="width:100%"><tr>';
				ih += '<td style="vertical-align:middle;white-space:nowrap;"><img src="'+qmv.base+'images/qmv_v_b_down_hover.gif" width=13 height=14 style="margin-bottom:-3px;"></td>';
				ih += '<td><div style="font-size:1px;width:5px;"></div></td>';
				ih += '<td style="vertical-align:middle;padding-top:1px;white-space:nowrap;"><div class="qmvi-dialog-input-title">Preview Menu</div></td>';

				ih += '<td style="width:100%;"></td>';

				


				if (!(qmad.br_ie && !qmad.br_ie7))
				{
					ih += '<td style="vertical-align:middle;white-space:nowrap;"><div class="qmvi-dialog-input-title">JavaScript Enabled:&nbsp;</div></td>';
					ih += '<td style="vertical-align:middle;"><input id="qmvi_preview_javascript_enabled" type="radio" onclick="qmv_preview_update(event,this)" name="qmvi_je_1" checked></input></td>';
					ih += '<td style=""><div style="font-size:1px;width:10px;"></div></td>';
					ih += '<td style="vertical-align:middle;white-space:nowrap;"><div class="qmvi-dialog-input-title">JavaScript Disabled:&nbsp;</div></td>';
					ih += '<td style="vertical-align:middle;"><input id="qmvi_preview_javascript_disabled" onclick="qmv_preview_update(event,this)" name="qmvi_je_1" type="radio"></input></td>';
				}


				ih += '<td style=""><div style="font-size:1px;width:5px;"></div></td>';
				ih += '</tr></table>';
			ih += '</div>';
			
			ih += '<div class="" style="border-style:solid;border-width:1px;border-color:#777777;">';
			ih += "<iframe id='qmvi_preview_iframe' onmouseover='qmv_fix_iframe_title_drag()'  frameborder=none style='border-style:none;background-color:#ffffff;width:"+ihw+"px;height:"+ihh+"px;margin:0px;padding:0px;'></iframe>";
			ih += '</div>';

		ih += '</div>';


	}
	else if (type=="create_component")
	{

		
		buttons = "Done";
		title = "Create Component";
		width = 600;

		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Create a New HTML Document With a Manually Customizable Menu</div>';
			

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste the contents below to a blank document with a .html extension (use NotePad, FrontPage, Dreamweaver, or similar).</div>';


			ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_component_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';

			ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
			ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_component_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;"></textarea>';
			ih += '</div>';

			

		ih += '</div>';


		


	}
	else if (type=="save_images")
	{

		

		buttons = "Done";
		title = "Publish Images";
		width = 500;
		
		var st = "Save Image As...";
		if (qmad.br_ie)
			st = "Save Picture As...";	

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Publish Template Based Menu Images</div>';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:20px;color:#333333;"><font style="font-weight:bold;color:#0033dd;">1:</font>&nbsp;&nbsp;Create a new folder, titled \'qmimages\', in the same location as the HTML pages containing your menu.<br><br><font style="font-weight:bold;color:#0033dd;">2:</font>&nbsp;&nbsp;Save the images below to the new folder by right clicking each image and selecting the \''+st+'\' option.</div>';

			ih += '<div id="qmvi_save_images_container" onselectstart="qm_kille(event);return false;" class="qmvtree-input-container-dialog qmvi-no-focus" style="-moz-user-select:none;height:200px;overflow-y:scroll;">';
			ih += '</div>';


		ih += '</div>';


	}	
	else if (type=="devpubcss")
	{

		
		buttons = "Done";
		title = "Developer Publish CSS";
		width = 600;

		

		ih += '<div style="padding:5px;">';

		
			ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_devpub_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';

			ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
			ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_devpub_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;"></textarea>';
			ih += '</div>';

			

		ih += '</div>';


		


	}
	else if (type=="import")
	{

		
		buttons = "Generate Menu|Cancel";
		title = "Import Menu";
		width = 600;

		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Import Third Party Menu Structures</div>';

			
			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste the contents of an existing list based (&lt;UL&gt;&lt;LI&gt;) menu structure below.  Note: Not all structures can be imported, some structures will be limited to the main menu items only.</div>';

			ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
			ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_import_stucture_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;"></textarea>';
			ih += '</div>';

			

		ih += '</div>';


	}
	else if (type=="open")
	{

		
		buttons = "Open|Cancel";
		title = "Open Menu";
		width = 460;

		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Open Published or Saved Menu</div>';
			
			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:10px;color:#333333;">Type the URL address (http://www.my_domain.com/my_document.html) of a saved menu document or page containing a published menu.</div>';

			ih += '<div class="qmvtree-input-container-dialog">';
			ih += '<input id="qmvi_open_menu_url" class="qmvtree-input qmvtree-input-dialog" value="http://www.my_domain.com/my_document.html"></input>';
			ih += '</div>';

			

		ih += '</div>';


	}	
	else if (type=="publish1")
	{



		qmv_set_publish_menus_object();
		
		/*
		if (!qmv.publish)
		{
			qmv.publish = new Object();
			
			qmv.publish.css_type = "inpage";
			qmv.publish.code_type = "inpage";
			qmv.publish.structure_type = "inpage";

		}


		qmv.publish.smenus = new Array();
		qmv.publish.smenus_pos=0;

		for (var i=0;i<10;i++)
		{

			if (document.getElementById("qm"+i))
				qmv.publish.smenus.push(i);
			
		}
		*/

		buttons = "Next|Cancel";
		title = "Publish Wizard";
		width = 600;
		
		qmv.publish.page = 1;


		ih += '<div style="padding:15px 10px 10px 10px;">';
		

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">This wizard produces the code sections necessary to run QuickMenu in your documents.</div>';

			ih += '<div style="padding-bottom:10px;">';

				ih+='<div style="width:100px;text-align:center;white-space:nowrap;position:absolute;left:250px;font-size:12px;padding:2px 0px 2px 0px;background-color:#d3d1dd;border-width:1px;border-color:#aaaaaa;border-style:solid;">In Page</div>';
				ih+='<div style="width:100px;text-align:center;white-space:nowrap;position:absolute;left:400px;font-size:12px;padding:2px 0px 2px 0px;background-color:#d3d1dd;border-width:1px;border-color:#aaaaaa;border-style:solid;"">External File</div>';

			ih += '</div>';

			ih += '<div style="padding:30px 20px 10px 20px;">'


				ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


					ih += '<tr>';
 
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;width:180px;text-align:right;">CSS Style Sheet:</td>';
						ih += '<td><div style="width:70px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input id="qmvi_publish_css_inpage" name="qmvi_publish_css" type="radio"></td>';
						ih += '<td><div style="width:55px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input id="qmvi_publish_css_external" name="qmvi_publish_css" type="radio"></td>';

					ih += '</tr>';

					ih += '<tr><td><div style="font-size:1px;height:15px;"></div></td></tr>'

					ih += '<tr>';

						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;width:180px;text-align:right;">Menu Code / Add-ons:</td>';
						ih += '<td><div style="width:70px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input id="qmvi_publish_code_inpage" name="qmvi_publish_code" type="radio"></td>';
						ih += '<td><div style="width:55px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input id="qmvi_publish_code_external" name="qmvi_publish_code" type="radio"></td>';

					ih += '</tr>';
					
					ih += '<tr><td><div style="font-size:1px;height:15px;"></div></td></tr>'

					ih += '<tr>';

						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;width:180px;text-align:right;">Menu Structure:</td>';
						ih += '<td><div style="width:70px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input id="qmvi_publish_structure_inpage" name="qmvi_publish_structure" type="radio"></td>';
						ih += '<td><div style="width:55px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input onclick="qmv_warn_external_pure(\'qmvi_publish_structure_type_pure\')" id="qmvi_publish_structure_external" name="qmvi_publish_structure" type="radio"></td>';

					ih += '</tr>';

					


				ih += '</table>';

			ih += '</div>'


			ih += '<div style="font-size:1px;height:25px;"></div>';
			
			ih += '<div style="padding-bottom:10px;">';

				ih+='<div style="width:100px;text-align:center;white-space:nowrap;position:absolute;left:250px;font-size:12px;padding:2px 0px 2px 0px;background-color:#d3d1dd;border-width:1px;border-color:#aaaaaa;border-style:solid;">Pure CSS</div>';
				ih+='<div style="width:100px;text-align:center;white-space:nowrap;position:absolute;left:400px;font-size:12px;padding:2px 0px 2px 0px;background-color:#d3d1dd;border-width:1px;border-color:#aaaaaa;border-style:solid;"">Hybrid</div>';

			ih += '</div>';

			ih += '<div style="padding:30px 20px 10px 20px;">'


				ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


					ih += '<tr>';
 
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;width:180px;text-align:right;">(<span style="cursor:help;color:#ff3300;" onclick="qmv_html_structure_help()">?</span>) HTML Structure Type:</td>';
						ih += '<td><div style="width:70px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input onclick="qmv_warn_external_pure(\'qmvi_publish_structure_external\')" id="qmvi_publish_structure_type_pure" name="qmvi_publish_struct_type" type="radio"></td>';
						ih += '<td><div style="width:55px;">&nbsp;</div></td>';
						ih += '<td style="width:100px;"><input id="qmvi_publish_structure_type_hybrid" name="qmvi_publish_struct_type" type="radio" checked></td>';

					ih += '</tr>';

				ih += '</table>';

			ih += '</div>'

			ih += '<div style="font-size:1px;height:10px;"></div>';

		ih += '</div>';


		qmv_track_it("publish_type");


	}
	else if (type=="publish2")
	{

		
		buttons = "Previous|Next|Cancel";
		title = "Publish Wizard";
		width = 600;

		qmv.publish.page = 2;


		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">CSS Stylesheet</div>';

			if (qmv.publish.css_type=="external")
			{

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">1:</font> Copy this stylesheet file reference to your documents head (&lt;HEAD&gt;&lt;/HEAD&gt;).  Change the file name and location reference (href=\'<font style="color:#dd3300;">quickmenu_styles.css</font>\') to match the new .css file you will create below.</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_stylesheet_file_reference\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container" style="height:16px;">';
					ih += '<input id="qmvi_publish_stylesheet_file_reference" class="qmvtree-input qmvtree-input-dialog" style="" value="<link rel=\'stylesheet\' type=\'text/css\' href=\'quickmenu_styles.css\'/>">';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:30px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">2:</font> Paste the styles below to a new plain text file with a name, location and .css extension to match the file reference in step 1.  (Use Notepad or similar to ensure a plain text format.)</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_stylesheet_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_stylesheet_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_css(true)+'</textarea>';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:10px;"></div>';
			}
			else
			{

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste the style sheet below within the head (&lt;HEAD&gt;paste here&lt;/HEAD&gt;) of your HTML document. </div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_stylesheet_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off"onkeypress="qm_kille(event,true)" id="qmvi_publish_stylesheet_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_css(false)+'</textarea>';
					ih += '</div>';
				ih += '</div>';

			}

		ih += '</div>';

		qmv_track_it("publish_css");


	}
	else if (type=="publish3")
	{

		
		buttons = "Previous|Next|Cancel";
		title = "Publish Wizard";
		width = 600;

		qmv.publish.page = 3;


		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Menu Code / Add-on\'s</div>';

			if (qmv.publish.code_type=="external")
			{

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">1:</font> Copy this JavaScript file reference to your documents head (&lt;HEAD&gt;&lt;/HEAD&gt;). Change the file name and location reference (src=\'<font style="color:#dd3300;">quickmenu.js</font>\') to match the new .js file you will create below.</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_file_reference\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container" style="height:16px;">';
					ih += '<input type="text" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_file_reference" class="qmvtree-input qmvtree-input-dialog" style="" value="<scr'+'ipt type=\'text/javascript\' src=\'quickmenu.js\'></scr'+'ipt>">';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:30px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">2:</font> Paste the script below to a new plain text file with a name, location and .js extension to match the file reference in step 1.  (Use Notepad or similar to ensure a plain text format.)</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_javascript(true)+'</textarea>';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:10px;"></div>';
			}
			else
			{

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste the script below within the head (&lt;HEAD&gt;&lt;/HEAD&gt;) of your HTML document. </div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off"onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_javascript(false)+'</textarea>';
					ih += '</div>';
				ih += '</div>';

			}

		ih += '</div>';

		qmv_track_it("publish_code");

	}
	else if (type=="publish4")
	{

				
		buttons = "Previous|Next|Cancel";
		title = "Publish Wizard";
		width = 600;

		qmv.publish.page = 4;


		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Menu Structure ['+qmv_pubgen_get_number_word(qmv.publish.smenus_pos+1)+' Menu]</div>';

			if (qmv.publish.structure_type=="external")
			{

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">1:</font> Paste the JavaScript file reference below inside a valid HTML tag within the body (&lt;BODY&gt;&lt;/BODY&gt;) of your web page.  The menu will position itself as a block level element at the point of insertion, similar to a table or div.<br><br>Change the file reference (src=\'<font style="color:#dd3300">qm_structure'+(qmv.publish.smenus_pos+1)+'.js</font>\') to correctly point to the location and name of the new .js file you will create in step 2.</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_file_reference\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container" style="height:16px;">';
					ih += '<input type="text" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_file_reference" class="qmvtree-input qmvtree-input-dialog" style="" value="<scr'+'ipt type=\'text/javascript\' src=\'qm_structure'+(qmv.publish.smenus_pos+1)+'.js\'></scr'+'ipt>">';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:30px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">2:</font> Paste the script below to a new plain text file with a name, location and .js extension to match the file reference in step 1.  (Use Notepad or similar to ensure a plain text format.)</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_structure_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_structure_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;"></textarea>';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:10px;"></div>';
			}
			else
			{

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste this HTML inside a valid tag within the body (&lt;BODY&gt;&lt;/BODY&gt;) of your web page.  The menu positions itself as a block level element at the point of insertion, similar to a table or div.</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_structure_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off"onkeypress="qm_kille(event,true)" id="qmvi_publish_structure_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;"></textarea>';
					ih += '</div>';
				ih += '</div>';

			}

		ih += '</div>';

		qmv_track_it("publish_structure");


	}
	else if (type=="publish5")
	{

		buttons = "Previous|Next|Cancel";
		title = "Publish Wizard";
		width = 600;

		qmv.publish.page = 5;


		ih += '<div style="padding:5px;">';


			if (!qmv.pure)
			{
				ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Optional Noscript Support</div>';
				ih += '<div style="padding:10px;">';

					ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Noscript support allows users to navigate the entire menu structure when JavaScript is turned off in the browser.  The noscript version of the menu appears as a hierarchial list in a scrollable window with a default height of 200px.  You can modify the height by editing the hieght setting within the noscript tag.</div>';
					ih += '<div style="font-size:1px;height:10px;"></div>';

					ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">To add noscript support paste the following tag wihtin the head of your HTML document. The tag may be used in a server side include for delivery to multiple pages.</div>';

					ih += '<div style="padding:0px 15px 0px 15px;">';
						ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_structure_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
						ih += '<div class="qmvtree-input-container-dialog" style="height:65px;">';
						ih += '<textarea wrap="off"onkeypress="qm_kille(event,true)" id="qmvi_publish_structure_content" class="qmvtree-input qmvtree-input-dialog" style="height:65px;">'+qmv_pubgen_noscript_tag()+'</textarea>';
						ih += '</div>';
					ih += '</div>';

				ih += '</div>';
			}


			
			if (qmv.free_use)
			{

				ih += '<div style="font-size:1px;height:20px;"></div>';
				ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Optional <span style="color:#dd3300;">Free Use</span> Link</div>';
				ih += '<div style="padding:10px;">';

					ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">To disable the purchase reminder and use the menu for free (no time limits or restrictions!) add this link anywhere within the body of your web page.</div>';

					ih += '<div style="padding:0px 15px 0px 15px;">';
						ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_structure_content_free\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
						ih += '<div class="qmvtree-input-container-dialog" style="height:65px;">';
						ih += '<textarea wrap="off"onkeypress="qm_kille(event,true)" id="qmvi_publish_structure_content_free" class="qmvtree-input qmvtree-input-dialog" style="height:65px;">'+qmv_pubgen_free_use_link()+'</textarea>';
						ih += '</div>';
					ih += '</div>';

				ih += '</div>';

			}

		ih += '</div>';

		


	}
	else if (type=="publish6")
	{

		buttons = "Previous|Finished";
		title = "Publish Wizard";
		width = 600;

		qmv.publish.page = 6;


		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Finished</div>';


			ih += '<div style="padding:10px;">';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;font-weight:bold;color:#dd3300;">Congratulations!</div>';
				ih += '<div style="font-size:1px;height:10px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Your menu is ready to view, open your document in a browser to test the menu.  If the menu is not working, double check all file references and your insertion point within the body for accuracy.</div>';
				ih += '<div style="font-size:1px;height:20px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;text-decoration:underline;">Optional Visual Interface</div>';
				ih += '<div style="font-size:1px;height:10px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">The QuickMenu visual interface may optionally be added to your document by pasting this script reference directly before the closing body tag (paste here..&lt/BODY&gt)</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_congrats_visual_tag\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container" style="height:16px;">';
					ih += '<input onblur="qmv_publish_blur_input(event,this)" onfocus="qmv_publish_focus_input(event,this)" type="text" onkeypress="qm_kille(event,true)" class="qmvtree-input qmvtree-input-dialog" style="" id="qmvi_publish_congrats_visual_tag" value="<sc'+'ript type=\'text/javascript\' src=\'http://www.opencube.com/qmv6/qm_visual.js\'></scr'+'ipt>">';
					ih += '</div>';
				ih += '</div>';

			ih += '</div>';

		ih += '</div>';


		qmv_track_it("publish_done");


	}
	else if (type=="publish10")
	{

		


		buttons = "Previous|Next|Cancel";
		title = "Publish Wizard";
		width = 600;

		qmv.publish.page = 10;


		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Compact Publish to Single External File</div>';
			
			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">1:</font> Paste the JavaScript file reference below inside a valid HTML tag within the body (&lt;BODY&gt;&lt;/BODY&gt;) of your web page.  The menu will position itself as a block level element at the point of insertion, similar to a table or div.<br><br>Change the file reference (src=\'<font style="color:#dd3300">quickmenu.js</font>\') to correctly point to the location and name of the new .js file you will create below.</div>';

			ih += '<div style="padding:0px 15px 0px 15px;">';
				ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_file_reference\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
				ih += '<div class="qmvtree-input-container" style="height:16px;">';
				ih += '<input type="text" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_file_reference" class="qmvtree-input qmvtree-input-dialog" style="" value="<scr'+'ipt type=\'text/javascript\' src=\'quickmenu.js\'></scr'+'ipt>">';
				ih += '</div>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:20px;"></div>';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">2:</font> Paste the script below to a new plain text file with a name, location and .js extension to match the file reference in step 1.  (Use Notepad or similar to ensure a plain text format.)</div>';

			ih += '<div style="padding:0px 15px 0px 15px;">';
				ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
				ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
				ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_all_external(true)+'</textarea>';
				ih += '</div>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';
			
		ih += '</div>';


		qmv_track_it("publish_external");

	}
	else if (type=="quick_publish")
	{

		qmv_set_publish_menus_object();

		buttons = "Previous|Next|Cancel";
		title = "Quick Publish (external file)";
		width = 600;



		var c = qmv_lib_get_menu_count();
		if (c>1)
		{

			buttons = "Close";
			title = "Quick Publish";
			width = 500;


			ih += '<div style="padding:5px;">';	

				ih += 'Warning! Quick publish is not compatible with multiple menu systems, to publish multiple menus instead use the \'Custom Publish Wizard\'.';			

			ih += '</div>';

		}
		else
		{

			buttons = "Done";
			title = "Quick Publish (external file)";
			width = 640;
			
			var spure = qmv.pure;
			qmv.pure = false;
		
			ih += '<div style="padding:5px;">';	

				ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Compact Publish to Single External File</div>';
			
				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">1:</font> Paste the JavaScript file reference below inside a valid HTML tag within the body (&lt;BODY&gt;&lt;/BODY&gt;) of your web page.  The menu will position itself as a block level element at the point of insertion, similar to a table or div. Point the reference (src=\'<font style="color:#dd3300">quickmenu.js</font>\') to the location and name of the new .js file you will create below.</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_file_reference\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container" style="height:16px;">';
					ih += '<input type="text" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_file_reference" class="qmvtree-input qmvtree-input-dialog" style="" value="<scr'+'ipt type=\'text/javascript\' src=\'quickmenu.js\'></scr'+'ipt>">';
					ih += '</div>';
				ih += '</div>';

				ih += '<div style="font-size:1px;height:20px;"></div>';

				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">2:</font> Paste the script below to a new plain text file with a name, location and .js extension to match the file reference in step 1.  (Use Notepad or similar to ensure a plain text format.)</div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_content\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_content" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_all_external(true)+'</textarea>';
					ih += '</div>';
				ih += '</div>';


				ih += '<div style="font-size:1px;height:20px;"></div>';
				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">Warning:</font> This quick publish option does not save search friendly content to your pages or use pure CSS for no-script browsers.  Use the custom publish wizard to enable these features.</div>';
				ih += '<div style="font-size:1px;height:10px;"></div>';
			
			ih += '</div>';


			qmv.pure = spure;
		}

		

	}
	else if (type=="quick_publish_inline")
	{

		qmv_set_publish_menus_object();

		buttons = "Previous|Next|Cancel";
		title = "Quick Publish";
		width = 600;



		var c = qmv_lib_get_menu_count();
		if (c>1)
		{

			buttons = "Close";
			title = "Quick Publish";
			width = 500;


			ih += '<div style="padding:5px;">';	

				ih += 'Warning! Quick publish is not compatible with multiple menu systems, to publish multiple menus instead use the \'Custom Publish Wizard\'.';			

			ih += '</div>';

		}
		else
		{

			buttons = "Done";
			title = "Quick Publish (inline HTML)";
			width = 640;
			
			var spure = qmv.pure;
			qmv.pure = false;
		
			ih += '<div style="padding:5px;">';	

				ih += '<div class="qmvi-publish-title" style="margin-bottom:20px;">Compact Inline Publish Direct to HTML Source Code</div>';
			
				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;">Paste the script below between the body tags of your documents source HTML.  The menu will position itself within the flow of your document at the point of insertion, this is similar to manually adding an IMG, DIV, or Table tag in your HTML.<br><br></div>';

				ih += '<div style="padding:0px 15px 0px 15px;">';
					ih += '<table celpadding=0 cellspacing=0><tr><td><div class="qmvi-common qmvi-dialog-input-title" onclick="qmv_publish_focus_input(event,document.getElementById(\'qmvi_publish_javascript_content_inline\'))" style="color:#0033dd;margin:10px 6px 4px 0px;cursor:default;"><img src="'+qmv.base+'images/color_arrow_right.gif" width=6 height=8 style="margin-right:4px;">Select Contents</div></td></tr></table>';
					ih += '<div class="qmvtree-input-container-dialog" style="height:200px;">';
					ih += '<textarea wrap="off" onkeypress="qm_kille(event,true)" id="qmvi_publish_javascript_content_inline" class="qmvtree-input qmvtree-input-dialog" style="height:200px;">'+qmv_pubgen_all_external(true,true)+'</textarea>';
					ih += '</div>';
				ih += '</div>';


				ih += '<div style="font-size:1px;height:20px;"></div>';
				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="padding-bottom:4px;color:#333333;"><font style="font-weight:bold;">Warning:</font> This quick publish option does not save search friendly content to your pages or use pure CSS for no-script browsers.  Use the custom publish wizard to enable these features.</div>';
				ih += '<div style="font-size:1px;height:10px;"></div>';
			
			ih += '</div>';


			qmv.pure = spure;
		}

		

	}
	else if (type=="url")
	{


		buttons = "OK|Cancel|Apply";
		title = "Anchor Properties";
		width = 350;
		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">Text / HTML</div>';
			ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
			ih += '<input type="text" onkeypress="qm_kille(event,true)" category="texturl" dlginp="text" id="qmvi_df_urlp_text" class="qmvtree-input" style="">';
			ih += '</div>';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">URL</div>';
			ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
			ih += '<input type="text" onkeypress="qm_kille(event,true)" category="texturl" dlginp="url"  id="qmvi_df_urlp_url" class="qmvtree-input" style="">';
			ih += '</div>';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">Target</div>';
			ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
			ih += '<input type="text" onkeypress="qm_kille(event,true)" category="texturl" dlginp="target"  id="qmvi_df_urlp_target" class="qmvtree-input" style="">';
			ih += '</div>';
			
			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">Title Text (Displays as Tooltip)</div>';
			ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
			ih += '<input type="text" onkeypress="qm_kille(event,true)" category="texturl" dlginp="title"  id="qmvi_df_urlp_title" class="qmvtree-input" style="">';
			ih += '</div>';

		ih += '</div>';


	}
	else if (type=="multi")
	{

		buttons = "OK|Cancel|Apply";
		title = qmv.multi.title;
		width = 330;
		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">'+qmv.multi.desc+'</div>';
			ih += '<div style="margin-bottom:10px;">';
				ih += '<select id="qmvi_multi_value" class="qmvi-common qmvtree-input-container" style="width:300px;height:20px;font-size:12px">';


					for (var k=0;k<qmv.multi.show.length;k++)
					{

						ih += '<option value="'+qmv.multi.vals[k]+'">'+qmv.multi.show[k]+'</option>';

					}

				ih += '</select>';
			ih += '</div>';

		ih += '</div>';

	}
	else if (type=="edge")
	{
		

		buttons = "OK|Cancel|Apply";
		title = qmv.edge.title;
		width = qmv.edge.width;
		

		ih += '<div style="padding:5px;">';


			ih += '<table cellpadding=0 cellspacing=0 border=0 width="100%" style="">';

				ih += '<tr>';

					if (qmv.edge.corners)
					{
						ih += qmv_dialog_edge_part("Top",qmv.edge.dtype,"Top Left");
						ih += '<td><div style="width:20px;"></div></td>'					
						ih += qmv_dialog_edge_part("Left",qmv.edge.dtype,"Bottom Left");

					}
					else
					{
						ih += qmv_dialog_edge_part("Top",qmv.edge.dtype);
						ih += '<td><div style="width:20px;"></div></td>'					
						ih += qmv_dialog_edge_part("Left",qmv.edge.dtype);
					}

				ih += '<tr>';


				ih += '<tr><td><div style="font-size:1px;height:20px;"></div></td></tr>';

				ih += '<tr>';

					if (qmv.edge.corners)
					{
						ih += qmv_dialog_edge_part("Bottom",qmv.edge.dtype,"Bottom Right");
						ih += '<td><div style="width:20px;"></div></td>'					
						ih += qmv_dialog_edge_part("Right",qmv.edge.dtype,"Top Right");
					}
					else
					{
						ih += qmv_dialog_edge_part("Bottom",qmv.edge.dtype);
						ih += '<td><div style="width:20px;"></div></td>'					
						ih += qmv_dialog_edge_part("Right",qmv.edge.dtype);

					}

				ih += '<tr>';
			
			ih += '</table>';


		ih += '</div>';

	}
	else if (type=="inherit")
	{

		

		buttons = "OK|Cancel|Apply";
		title = "Style Duplication and Inheritance";
		width = 420;
		

		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Apply the <span style="font-weight:bold;">'+qmv.tinherit.rule0.sname+'</span> style to the following.</div>';

			ih += '<div style="padding:10px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				var tic=0;
				var tic_obj;
				while (tic_obj = qmv.tinherit["rule"+tic])
				{
				
					ih += '<tr>';
 
						ih += '<td><input id="qmvi_inherit_options'+tic+'" type="checkbox" '+tic_obj.defstate+' ></td>';
						ih += '<td><div style="width:10px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">'+tic_obj.desc+'</td>';

					ih += '</tr>';

					ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

					tic++;
				}


			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';	

		ih += '</div>';

		

	}
	else if (type=="options")
	{

		buttons = "OK|Cancel|Apply";;
		title = "Options";
		width = 400;
		
		ih += '<div style="padding:5px;">';

			
			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Activate QuickMenu</div>';

			ih += '<div style="padding:5px;">';
	
				ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">Unlock Code</div>';
				ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
				ih += '<input type="text" onkeypress="qm_kille(event,true)" id="qmvi_df_options_unlock" class="qmvtree-input" style="">';
				ih += '</div>';

			ih += '</div>';
			

			//ih += '<div style="padding:5px;">';

				//ih += 'Free Use <span style="color:#333333;">(requires link to opencube in HTML page <span onclick="qmvi_options_free_use_info()" style="cursor:pointer;cursor:hand;text-decoration:underline;color:#dd3300;">?</span>)</span>&nbsp;<input onfocus="if (!qmad.br_ie)blur()" tabindex="-1" id="qmvi_dg_options_free_use" value="HEX" type="checkbox" style="margin-bottom:-1px;">'
				//ih += '<div style="font-size:1px;height:10px;"></div>';	
				
			//ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';			

			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Interface Settings</div>';
			
			ih += '<div style="padding:5px 5px 0px 5px;">';

				ih += '<table cellpadding=0 cellspacing=0><tr>';
				ih += '<td><input onfocus="if (!qmad.br_ie)blur()" tabindex="-1" id="qmvi_dg_options_auto_collapse" value="HEX" type="checkbox"></td><td>&nbsp;Auto Collapse Tree Menu</td>'
				ih += '</tr></table>';
								
			ih += '</div>';
			ih += '<div style="padding:5px 5px 0px 5px;">';

				ih += '<table cellpadding=0 cellspacing=0><tr>';
				ih += '<td><input onfocus="if (!qmad.br_ie)blur()" tabindex="-1" id="qmvi_dg_options_hide_selected_box" value="HEX" type="checkbox"></td><td>&nbsp;Hide Item Selected Box</td>'
				ih += '</tr></table>';
						
			ih += '</div>';
			ih += '<div style="font-size:1px;height:10px;"></div>';	

			ih += '<div style="font-size:1px;height:10px;"></div>';	

		ih += '</div>';


	}
	else if (type=="subposition")
	{

		buttons = "OK|Cancel";;
		title = "Sub Menu Positioning";
		width = 400;
		
		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Positioning Options</div>';

			ih += '<div style="padding:10px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input id="qmvi_pos_options1" name="qmvi_pos_options" type="radio" checked value="select"></td>';
					ih += '<td><div style="width:20px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Apply to the selected sub menu only.</td>';


				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_pos_options2" name="qmvi_pos_options" type="radio" value="all"></td>';
					ih += '<td><div style="width:20px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Apply this positioning to all sub menus.</td>';

				ih += '</tr>';
					
				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_pos_options3" name="qmvi_pos_options" type="radio" value="reset"></td>';
					ih += '<td><div style="width:20px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Reset the selected sub menu to its default position.</td>';


				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_pos_options4" name="qmvi_pos_options" type="radio" value="reset all"></td>';
					ih += '<td><div style="width:20px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Reset the default position to 0,0</td>';


				ih += '</tr>';	


			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';	

		ih += '</div>';


	}
	else if (type=="import_where")
	{


		buttons = "OK|Cancel";;
		title = "Import Menu Options";
		width = 420;
		
		ih += '<div style="padding:5px;">';

			ih += '<div style="padding:5px;">';	

				ih += 'Where would you like to apply the new menu structure?';

			ih += '</div>';

		

			ih += '<div style="padding:10px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input name="qmviiw001" id="qmvi_import_where_selected" type="radio" checked></td>';
					ih += '<td><div style="width:10px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Apply to the selected menu.</td>';

				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'
				
				ih += '<tr>';
 
					ih += '<td><input name="qmviiw001" id="qmvi_import_where_additional" type="radio"></td>';
					ih += '<td><div style="width:10px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Apply as an additional menu.</td>';


				ih += '</tr>';
	

			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';	

		ih += '</div>';
		

		
	}
	else if (type=="hoverfill_on")
	{


		buttons = "OK|Cancel";;
		title = "Apply Item Transparency";
		width = 400;
		
		ih += '<div style="padding:5px;">';

			ih += '<div style="padding:5px;">';	

				ih += 'The Hover Fill effect works by animating elements below the menu items.  Item background colors must be set transparent or they will block the Hover Fill from displaying.<br><br>Select the sections of your menu to remove item colors from, or you may manually set colors transparent with the CSS style settings.';			

			ih += '</div>';

		

			ih += '<div style="padding:10px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input id="qmvi_hoverfill_main" type="checkbox" checked></td>';
					ih += '<td><div style="width:10px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Main Menu Items</td>';


				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'
				
				ih += '<tr>';
 
					ih += '<td><input id="qmvi_hoverfill_sub" type="checkbox" checked></td>';
					ih += '<td><div style="width:10px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Sub Menu Items</td>';


				ih += '</tr>';
	

			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';	

		ih += '</div>';


	}
	else if (type=="structure")
	{

		buttons = "OK|Cancel";;
		title = "Menu Structure";
		width = 300;
		
		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">HTML Structure Type (<span style="cursor:help;color:#ff3300;" onclick="qmv_html_structure_help()">?</span>)</div>';

			ih += '<div style="padding:10px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input id="qmvi_structure_type1_pure" name="qmvi_structure_type1" type="radio" checked value="select"></td>';
					ih += '<td><div style="width:20px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Pure CSS Structure (&lt;UL&gt;&lt;LI&gt;)</td>';


				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_structure_type1_hybrid" name="qmvi_structure_type1" type="radio" value="all"></td>';
					ih += '<td><div style="width:20px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Hybrid Structure (&lt;DIV&gt;&lt;A&gt;)</td>';

				ih += '</tr>';
					
				


			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:10px;"></div>';	

		ih += '</div>';


	}
	else if (type=="custom_rule")
	{

		if (owner)
		{
			buttons = "Delete Rule|Update Rule|Cancel";
			title = "Edit Custom CSS Rule";
		}
		else
		{
			buttons = "Add Rule|Cancel";
			title = "Add Custom CSS Rule";
		}

		
		width = 510;
		

		ih += qmv_custom_rule_dialog_content();


	}
	else if (type=="apply_custom_class")
	{

		buttons = "Add|Remove|Close";
		title = "Add / Remove Custom Classes";
		
		
		width = 400;
		

		ih += qmv_custom_class_dialog_content();


	}
	else if (type=="applydividers")
	{

		

		buttons = "OK|Apply|Cancel";;
		title = "Globally Apply Dividers";
		width = 410;
		
		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Dividers are applied to your existing items only, if your menu changes after using this feature you can re-apply the dividers with this dialog at any time.  Before the dividers are applied, any existing dividers are automatically removed.<br><br>Apply Dividers Where?</div>';

			ih += '<div style="padding:5px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input id="qmvi_gld_main" name="qmvi_gld_main" type="checkbox" onclick="qmvi_gld_submain_checked(this)" value="select"></td>';
					ih += '<td><div style="width:7px;">&nbsp;</div></td>';
					ih += '<td nowrap class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;white-space:nowrap;">Main Menu</td>';

					ih += '<td><div style="width:40px;">&nbsp;</div></td>';	

					ih += '<td><input id="qmvi_gld_sub" name="qmvi_gld_sub" type="checkbox" onclick="qmvi_gld_submain_checked(this)" checked value="select"></td>';
					ih += '<td><div style="width:7px;">&nbsp;</div></td>';
					ih += '<td nowrap class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;white-space:nowrap;">Sub Menus</td>';

					ih += '<td><div style="width:40px;">&nbsp;</div></td>';	

					ih += '<td><input id="qmvi_gld_none" name="qmvi_gld_none" type="checkbox" onclick="qmvi_gld_none_checked(this)" value="select"></td>';
					ih += '<td><div style="width:7px;">&nbsp;</div></td>';
					ih += '<td nowrap class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;white-space:nowrap;">None</td>';


				ih += '</tr>';
	

			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:30px;"></div>';	


			
			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Add Extra Dividers...</div>';

			ih += '<div style="padding:5px 20px 00px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input id="qmvi_gld_above" name="qmvi_gld_above" type="checkbox" value="select"></td>';
					ih += '<td><div style="width:8px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Before the first item in the group.</td>';


				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_gld_below" name="qmvi_gld_below" type="checkbox" value="all"></td>';
					ih += '<td><div style="width:8px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">After the last item in the group.</td>';

				ih += '</tr>';
	

			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:20px;"></div>';	


		ih += '</div>';


	}
	else if (type=="applystripes")
	{



		buttons = "OK|Apply|Cancel";;
		title = "Globally Apply Sub Striping";
		width = 410;
		
		ih += '<div style="padding:5px;">';

			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:10px;">Striping applies unique styles to every other item, this helps the user individualize a vertical list of options.</div>';
			ih += '<div style="font-size:1px;height:10px;"></div>';	
			
			ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;">Apply Stripes Starting With...</div>';
			ih += '<div style="padding:5px 20px 0px 20px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';


				ih += '<tr>';
 
					ih += '<td><input id="qmvi_stripe_where_first" name="qmvi_stripe_where" type="radio" value="select"></td>';
					ih += '<td><div style="width:8px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">The First Item in the Group</td>';


				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_stripe_where_second" name="qmvi_stripe_where" type="radio" value="all"></td>';
					ih += '<td><div style="width:8px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">The Second Item in the Group</td>';

				ih += '</tr>';

				ih += '<tr><td><div style="font-size:1px;height:5px;"></div></td></tr>'

				ih += '<tr>';

					ih += '<td><input id="qmvi_stripe_where_remove" name="qmvi_stripe_where" type="radio" value="all"></td>';
					ih += '<td><div style="width:8px;">&nbsp;</div></td>';
					ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Remove All Stripes</td>';

				ih += '</tr>';
	

			ih += '</table>';
			ih += '</div>';

			ih += '<div style="font-size:1px;height:20px;"></div>';	


		ih += '</div>';


	}
	else if (type=="splash")
	{
		
		
		buttons = "<< Previous|Next >>|Close";
		title = "Welcome To Visual QuickMenu (v6.2)";
		width = 612;
		

		qmv.dyk_num = 1;
		qmv.dyk_max = 20;
		
		
		ih += '<div style="padding:10px;">';

			ih += '<div style="margin-bottom:15px;">';			
				ih += '<table cellpadding=0 cellspacing=0 border=0><tr>';
				ih += '<td style="vertical-align:top;"><div style="font-size;1px;height:16px;width:16px;background-image:url('+qmv.base+'help/images/oc_logo.gif);"></div></td>';
				ih += '<td><div style="font-size:1px;width:5px;"></div></td>';
				ih += '<td style="vertical-align:top;padding-top:1px;"><div class="qmvi-dialog-input-title">Did You Know?</div></td>';
				ih += '</tr></table>';
			ih += '</div>';
			
			ih += '<div class="" style="border-style:solid;border-width:1px;border-color:#777777;">';
			ih += "<iframe id='qmvi_dyk_tips' onmouseover='qmv_fix_iframe_title_drag()'  frameborder=none style='border-style:none;background-color:#ffffff;width:570px;height:300px;margin:0px;padding:0px;'></iframe>";
			ih += '</div>';

		ih += '</div>';


	}
	else if (type=="specs")
	{
		
		
		buttons = "Close";
		title = "QuickMenu Specs [All Menus]";
		width = 400;
		var tsize = 0;
		var t;	
		var is_addons = false;	


		ih += '<div style="padding:5px;">';


			ih += '<div class="qmvi-dialog-input-title" style="margin-bottom:15px;">The minimum total size is the size of the menu if using the \'Quick Publish\' feature, custom publish options may add 1-2k of extra size to your menu.</div>';

			ih += '<div class="qmvi-publish-title" style="border-width:1px;padding:3px;border-style:solid;border-color:#888888;background-color:#d5d5d5;color:#333333">CSS</div>';
			ih += '<div style="padding:10px 10px 10px 10px;background-color:#ffffff;border-color:#888888;border-width:0px 1px 0px 1px;border-style:solid;">';
			ih += '<table cellpadding=0 cellspacing=0 width=100%>';	

			t = qmv_pubgen_get_core_css().length;
			t = qmv_lib_get_kilobytes(t,true);
			tsize += parseFloat(t);	
			ih += '<tr>';
			ih += '<td style="vertical-align:top;color:#444444;width:100%;">Core CSS:</td>'
			ih += '<td><div style="font-size:1px;width:15px;"></div></td>'
			ih += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap;" nowrap>'+t+'</td>'
			ih += '</tr>';

			t = qmv_pubgen_css().length;
			t = qmv_lib_get_kilobytes(t,true);
			tsize += parseFloat(t);
			ih += '<tr>';

			ih += '<td style="vertical-align:top;color:#444444;">Custom Menu Styles (All):</td>'
			ih += '<td><div style="font-size:1px;width:15px;"></div></td>'
			ih += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap;">'+t+'</td>'
			ih += '</tr>';

			ih += '</table>';
			ih += '</div>';



			ih += '<div class="qmvi-publish-title" style="border-width:1px;padding:3px;border-style:solid;border-color:#888888;background-color:#d5d5d5;color:#333333">JavaScript</div>';
			ih += '<div style="padding:10px 10px 10px 10px;background-color:#ffffff;border-color:#888888;border-width:0px 1px 0px 1px;border-style:solid;">';
			ih += '<table cellpadding=0 cellspacing=0 width=100%>';
			
			t = qmv_get_source_code_core().length;
			t = qmv_lib_get_kilobytes(t,true);
			tsize += parseFloat(t);	
			ih += '<tr>';
			
			ih += '<td style="vertical-align:top;color:#444444;width:100%;">Core Menu Code:</td>'			
			ih += '<td><div style="font-size:1px;width:15px;"></div></td>'
			ih += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap;" nowrap>'+t+'</td>'
			
			ih += '</tr>';


			if (qmv.pure)
			{	
				

				t = qmv_get_pure_css_javascript().length;
				t = qmv_lib_get_kilobytes(t,true);
				tsize += parseFloat(t);	
				ih += '<tr>';
			
				ih += '<td style="vertical-align:top;color:#444444;width:100%;">Pure CSS / Hybrid Converter:</td>'			
				ih += '<td><div style="font-size:1px;width:15px;"></div></td>'
				ih += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap;" nowrap>'+t+'</td>'
			
				ih += '</tr>';
			}

			if (qmv.unlock_type && qmv.unlock_type=="single")
			{	
				

				t = qmv_get_unlock_statement().length;
				t = qmv_lib_get_kilobytes(t,true);
				tsize += parseFloat(t);	
				ih += '<tr>';
			
				ih += '<td style="vertical-align:top;color:#444444;width:100%;">Single Site Unlock:</td>'			
				ih += '<td><div style="font-size:1px;width:15px;"></div></td>'
				ih += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap;" nowrap>'+t+'</td>'
			
				ih += '</tr>';
			}


			t = qmv_specs_get_addon_html();
			if (t[1]) is_addons = true;
			tsize += t[1];
			ih += t[0];


			ih += '</table>';
			ih += '</div>';


			
			ih += '<div class="qmvi-publish-title" style="border-width:1px;padding:3px;border-style:solid;border-color:#888888;background-color:#d5d5d5;color:#333333">HTML</div>';
			ih += '<div style="padding:10px 10px 15px 10px;background-color:#ffffff;border-color:#888888;border-width:0px 1px 0px 1px;border-style:solid;">';
			ih += '<table cellpadding=0 cellspacing=0 width=100%>';	

			for (var p=0;p<10;p++)
			{
				if (document.getElementById("qm"+p))
				{
					t = qmv_pubgen_structure(null,null,null,null,p+"l").length;
					t = qmv_lib_get_kilobytes(t,true);
					tsize += parseFloat(t);
					ih += '<tr>';
					ih += '<td style="vertical-align:top;color:#444444;">Menu Structure '+p+':</td>'
					ih += '<td><div style="font-size:1px;width:15px;"></div></td>'
					ih += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap;" nowrap>'+t+'</td>'

					ih += '</tr>';
				}
			}

			ih += '</table>';
			ih += '</div>';
	
			ih += '<div class="qmvi-publish-title" style="font-weight:normal;border-width:1px;padding:3px;padding-right:15px;border-style:solid;border-color:#888888;background-color:#d5d5d5;color:#333333;text-align:right;">Minimum Total Size</div>';
			ih += '<div style="padding:10px 10px 10px 10px;background-color:#ffffff;border-color:#888888;border-width:0px 1px 1px 1px;border-style:solid;">';
			ih += '<table cellpadding=0 cellspacing=0 width=100%>';	


			var spure = qmv.pure;
			qmv.pure = false;
			qmv_set_publish_menus_object();
			var tquick = qmv_lib_get_kilobytes(qmv_pubgen_all_external(true).length,true);
			qmv.pure = spure;


			//t = qmv_lib_get_kilobytes(parseInt(tsize*1024),true);
			ih += '<tr>';
			ih += '<td align=right style="color:#dd3300;width:100%;text-align:right;vertical-align:top;white-space:nowrap;">'+tquick+'</td>'
			ih += '</tr>';

			ih += '</table>';
			ih += '</div>';


		ih += '</div>';


	}
	else if (type=="zoom")
	{
		

		buttons = "OK|Cancel|Apply";
		title = "Text Zoom";
		width = 560;
		
		
		ih += '<div class="qmvtree-input-container-dialog" style="height:290px;">';
		ih += '<textarea  onkeypress="qm_kille(event,true)" id="qmvi_df_zoomt" class="qmvtree-input" style="height:290px;position:relative;width:100%;"></textarea>';
		ih += '</div>';

	}
	else if (type=="warning-undo")
	{

		buttons = "OK";
		title = "Warning!";
		
		ih = message;

	}
	else if (type=="alert")
	{

		buttons = "OK";
		ih = message;

		if (!from_event_log)
		{
			if (ih.toLowerCase().indexOf("warning")+1)
				qmvi_report_add_line("warnings","warnings","","",ih,width);
			else
				qmvi_report_add_line("info","info","","",ih,width);
		}

	}	
	else if (type=="question-okcancel")
	{

		buttons = "OK|Cancel";
		ih = message;
	}
	else if (type=="question-yesno")
	{

		buttons = "Yes|No";
		ih = message;
	}
	else if (type=="question-yesnocancel")
	{

		buttons = "Yes|No|cancel";
		ih = message;
	}	
	else if (type=="question-okcancel-input")
	{

		buttons = "ok|cancel";
		
		
		ih += '<div style="padding:5px;">';
	
			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">'+message+'</div>';
			ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
			ih += '<input type="text" onkeypress="qm_kille(event,true)" value="'+defval+'" id="qmvi_ok_input" class="qmvtree-input" style="">';
			ih += '</div>';

		ih += '</div>';



	}
	else if (type=="image")
	{

		buttons = "ok|cancel|apply";
		title = "Image URL";
		width = 540;
		
		

		ih += '<div style="padding:5px;">';
	
			ih += '<div class="qmvi-common qmvi-dialog-input-title" style="margin-bottom:2px;">Define images relative to this document or use absolute (http://...) paths.  We recommend using absolute paths if you plan on publishing to a different folder structure.  This way images will be visible while designing and after publishing.<br><br>Image URL</div>';
			ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;">';
			ih += '<input type="text" onkeypress="qm_kille(event,true)" value="'+defval+'" id="qmvi_dg_image" class="qmvtree-input" style="">';
			ih += '</div>';

		ih += '</div>';

	}
	else if (type.indexOf("help")+1)
	{
				
		buttons = "close";
		title = "Help";
		if (qmad.br_fox)
			width = 634;
		else
			width = 630;


		var rn = document.getElementById("qmvi_help_iframe");
		if (rn)
			rn[qp].removeChild(rn);

		
		var uh = 400;
		if (type=="help-about")
			uh = 260;
		
		
		ih += "<div style='padding:5px;'>";
		ih += "<div>";

		if (message.indexOf("about.html")==-1)
		{
		
			ih += "<div class='qmvi-common' style='margin:0px 0px 6px 0px;'>";	

				ih += "<table cellspacing=0 cellpadding=0 border=0><tr>"			
			
					ih+="<td><div title='Back' onclick=\"qmvi_help_navigate('back')\" class='qmv-icon-buttons' style='padding:0px;font-size:1px;width:18px;height:18px;background-image:url("+qmv.base+"images/help_back.gif);'></td>";
					ih+="<td><div title='Forward' onclick=\"qmvi_help_navigate('forward')\" class='qmv-icon-buttons' style='padding:0px;font-size:1px;width:18px;height:18px;background-image:url("+qmv.base+"images/help_forward.gif);'></td>";
					ih+="<td><div style='font-size:1px;width:5px;'></div></td>";
					ih+="<td><div title='Home' onclick=\"qmvi_help_navigate('home')\" class='qmv-icon-buttons' style='padding:0px;font-size:1px;width:18px;height:18px;background-image:url("+qmv.base+"images/help_home.gif);'></td>";
				
				ih += "</tr></table>";		
		
			ih += "</div>";
		}


		if (!qmv.helpnum)
			qmv.helpnum=1;
		else
			qmv.helpnum++;	

		qmv.base+"help/"+message.substring(5)
		ih += "<iframe src='"+qmv.base+"help/"+message.substring(5)+"' id='qmvi_help_iframe"+qmv.helpnum+"' name='qmvi_help_iframe_window"+qmv.helpnum+"' onmouseover='qmv_fix_iframe_title_drag()' style='background-color:#ffffff;width:600px;height:"+uh+"px;margin:0px;padding:0px;'></iframe>";
				
		ih += "</div>";
		ih += "</div>";

	}

	
	
	document.getElementById("qmvi_"+mg+"dialog_content").innerHTML = ih;
	document.getElementById("qmvi_"+mg+"dialog_title").innerHTML = title;


	//set the buttons
	var bc = document.getElementById("qmvi_"+mg+"dialog_buttons");
	var bs = buttons.split("|");
	var bt = "";
	var addtrue = "";
	if (message) addtrue = ",true";	
	if (message && message.indexOf("help-")+1) addtrue = ",false,true";
		
	for (var i=0;i<bs.length;i++)
		bt += '<input id="qmv_dialog_button'+i+'" onclick="qmv_dialog_button_click(this'+addtrue+')" class="qmvi-common qmvi-dialog-button" type="button" value="'+bs[i]+'">';


	bc.innerHTML = bt;


	var qmd = document.getElementById("qmvi_"+mg+"dialog");
	var shadow = document.getElementById("qmvi_"+mg+"dialog_shadow");



	qmd.buttons = buttons;
	qmd.type = type;
	qmd.owner = owner;
	qmd.code = code;
	qmd.code1 = code1;

	qmd.style.width = width+"px";
	qmv_lib_center_element_in_window(qmd);
	qmd.style.visibility = "visible";

		
	shadow.style.width = qmd.offsetWidth+"px";
	shadow.style.height = qmd.offsetHeight+"px";
	shadow.style.top = parseInt(qmd.style.top)+3+"px";
	shadow.style.left = parseInt(qmd.style.left)+3+"px";
	shadow.style.visibility = "visible";


	qmv.anchor_dialog_visible = false;	

	

	if (type=="color")
		qmv_color_init(owner.value);
	else if (type=="url")
	{
		qmv.anchor_dialog_visible = true;
		qmv_url_init();
	}
	else if (type=="multi")
		qmv_multi_init(qmd);
	else if (type=="edge")
		qmv_edge_init(qmd);
	else if (type=="preview")
	{
		qmv_preview_init();
		
	}
	else if (type.indexOf("publish")+1)
	{

		if (type.indexOf("quick_publish")==-1)
		{
	
			qmv_publish_init(qmd);
			if (type=="publish4")
			{
				var isext = false;
				if (qmv.publish.structure_type=="external") isext = true;

				
				document.getElementById("qmvi_publish_structure_content").value = qmv_pubgen_structure(isext);
			}
	

		}

	}
	else if (type=="options")
		qmv_options_init(qmd);
	else if (type=="image")
		qmv_image_init(qmd);
	else if (type=="save")
	{
		document.getElementById("qmvi_publish_save_content").value = qmv_savegen();
		qmv_track_it("save");
	}
	else if (type=="create_component")
	{
		document.getElementById("qmvi_publish_component_content").value = qmv_savegen(true);
		qmv_track_it("save");
	}
	else if (type.indexOf("devpub")+1)
	{
		if (type.indexOf("css")+1)
			document.getElementById("qmvi_publish_devpub_content").value = qmvi_tplate_devpublish_css();
		
	}
	else if (type=="zoom")
	{
		
		document.getElementById("qmvi_df_zoomt").value = owner.value;		
	}
	else if (type=="splash")
	{

		var tb0 = document.getElementById("qmv_dialog_button0");
		var tb1 = document.getElementById("qmv_dialog_button1");

		if (qmad.br_ie)
		{
			tb0.ondblclick = tb0.onclick;
			tb1.ondblclick = tb1.onclick;

		}


		if (qmv.dyk_num==1)
			tb0.disabled = true;
		else if (qmv.dyk_max==qmv.dyk_num)
			tb1.disabled = true;
		
		var hi = document.getElementById("qmvi_dyk_tips");
		hi.src = qmv.base+"help/dyk_"+qmv.dyk_num+".html";
		
		
	}
	else if (type=="applydividers")
	{
		qmv_gld_init(qmd);
	}
	else if (type=="applystripes")
	{

		qmv_stripe_dialog_init(qmd);
	}
	else if (type=="structure")
	{
		
		if (qmv.pure)
			document.getElementById("qmvi_structure_type1_pure").checked = true;
		else
			document.getElementById("qmvi_structure_type1_hybrid").checked = true;
	}
	else if (type=="custom_rule")
	{

		if (owner)
		{
			qmv_custom_rule_parse_rule(defval);

		}
		else
			qmv_display_rule_result();

	}
	else if (type=="apply_custom_class")
	{
		qmv_custom_class_list_change(new Object());
	
	}
	else if (type=="save_images")
	{


		qmvi_save_images_init();
		
	}

	if (defbutton && !qmad.br_ie)
	{
		var dbu = qmd.getElementsByTagName("INPUT");
		for (var i=0;i<dbu.length;i++)
		{
			
			if (dbu[i].type == "button" && dbu[i].value==defbutton)
			{
				
				dbu[i].focus();
				break;
			}

		}
	}
	

	/*
	var inp = qmd.getElementsByTagName("input")[0];
	if (inp)
	{
		inp.focus();
	}
	*/


}

function qmv_dialog_edge_part(name,dtype,title)
{

	var showname = name;
	if (title)
		showname = title;

	var ih;

	ih = '<td style="vertical-align:top;text-align:right;padding:2px 5px 0px 0px;white-space:nowrap;" class="qmvi-common qmvi-dialog-input-title">'+showname+':</td>';
	ih += '<td style="vertical-align:top;width:50%;">';
		ih += '<div class="qmvtree-input-container" style="height:16px;margin-bottom:10px;padding-right:4px;">';
		
		var t1 = "";
		if (qmad.br_ie && !qmad.br_ie7) t1 = "position:absolute;";

		ih += '<input type="text" onkeypress="qm_kille(event,true)" id="qmvi_df_edge_'+name.toLowerCase()+'" class="qmvtree-input qmvtree-input-dialog" style="text-align:right;'+t1+'">';
		ih += '</div>';
	ih += '</td>';

	var addimg1 = "";
	var addimg2 = "";
	if (qmad.br_ie)
	{
		addimg1 = '<img src="'+qmv.base+'images/spinner_up.gif" width=11 height=7>';
		addimg2 = '<img src="'+qmv.base+'images/spinner_down.gif" width=11 height=7>';
	}

	
	ied1 = "";
	ied2 = "";
	if (qmad.br_ie)
	{
		ied1 = 'ondblclick="qmv_evt_edge_spin(\''+name.toLowerCase()+'\',1,\''+dtype+'\')"';
		ied2 = 'ondblclick="qmv_evt_edge_spin(\''+name.toLowerCase()+'\',2,\''+dtype+'\')"';
	}
	
	ih += '<td style="vertical-align:top;padding-left:2px;">';
		ih += '<span '+ied1+' onclick="qmv_evt_edge_spin(\''+name.toLowerCase()+'\',1,\''+dtype+'\')" class="qmvtree-button qmvtree-button-up" style="width:18px;height:9px;">'+addimg1+'</span>';		
		ih += '<span '+ied2+' onclick="qmv_evt_edge_spin(\''+name.toLowerCase()+'\',2,\''+dtype+'\')" class="qmvtree-button qmvtree-button-down" style="width:18px;height:9px;">'+addimg2+'</span>';
	ih+= '</td>'
	

	return ih;
}

function qmv_hide_dialog(is_msg,is_help,is_setbox,is_logon)
{

	var qmd;
	var shadow;

	if (is_msg)
	{
		qmd = document.getElementById("qmvi_msg_dialog");
		shadow = document.getElementById("qmvi_msg_dialog_shadow");
	}
	else if (is_help)
	{
		qmd = document.getElementById("qmvi_help_dialog");
		shadow = document.getElementById("qmvi_help_dialog_shadow");
		
	}	
	else if (is_setbox)
	{
		qmd = document.getElementById("qmvi_setbox");
		shadow = document.getElementById("qmvi_setbox_shadow");
		
	}
	else if (is_logon)
	{
		qmd = document.getElementById("qmvi_logon");
		shadow = document.getElementById("qmvi_logon_shadow");
		
	}
	else
	{
		document.getElementById("qmvi_dialog_content").innerHTML = "";
		qmd = document.getElementById("qmvi_dialog");
		shadow = document.getElementById("qmvi_dialog_shadow");
		
	}

	qmv.anchor_dialog_visible = false;

	qmd.style.visibility = "hidden";
	shadow.style.visibility = "hidden";


	

}


function qmv_dialog_button_click(src,is_msg,is_help,is_key_press)
{

	var type,val;

	if (!src.value)
		type = src;
	else
		type = src.value.toLowerCase();


	
	
	
	var qmd;
	if (is_msg)
		 qmd = document.getElementById("qmvi_msg_dialog");
	else if (is_help)
		 qmd = document.getElementById("qmvi_help_dialog");
	else
		 qmd = document.getElementById("qmvi_dialog");



	if (!qmd.type) return;
	

	if (qmd.type=="zoom")
	{	

		val = document.getElementById("qmvi_df_zoomt").value;
		val = val.replace(/\n/g,"");

		if (type=="ok" || type=="apply")
		{
			qmv_tree_set_value(qmd.owner,val);
			var bad_val = qmv_evt_update_tree_value(qmd.owner);
			if (bad_val) return;
		}

	}
	else if (qmd.type=="warning-undo")
	{
		
		if (qmd.owner.prev_value)
			qmd.owner.value = qmd.owner.prev_value;

	}
	else if (qmd.type=="question-okcancel" || qmd.type=="question-okcancel-input")
	{

		if (type=="ok")
			eval(qmd.code);


	}
	else if (qmd.type=="question-yesno" || qmd.type=="question-yesnocancel")
	{
		
		
		if (type=="yes")
			eval(qmd.code);
		else if (type=="no")
			eval(qmd.code1);
		

	}
	else if (qmd.type=="color")
	{

		if (type=="ok" || type=="apply")
		{
		


			var o_hex = document.getElementById("qmvi_color_apply_type_hex");
			var o_rgb = document.getElementById("qmvi_color_apply_type_rgb");
			var hval = "#"+qmv.color_vals.hr+qmv.color_vals.hg+qmv.color_vals.hb;




			if (qmd.owner.getAttribute("qmdesignbg"))
			{


				qmvi_set_design_bg_color(hval,qmd.owner);

			}
			else
			{
			

				if (o_hex.checked)
				{
					qmd.owner.value = hval;
					qmv.color_apply_type = "HEX"
				}
				else
				{

					qmd.owner.value = "rgb("+qmv.color_vals.dr+","+qmv.color_vals.dg+","+qmv.color_vals.db+")";
					qmv.color_apply_type = "RGB"				
				}

			


				var bad_val = qmv_evt_update_tree_value(qmd.owner);
				if (bad_val) return;

				var cform = document.getElementById("qmvi_color_switches");

				if (cform)
				{
					if (cform.qmvi_color_switch[0].checked)
						qmv.color_dispaly_type = "HEX"
					if (cform.qmvi_color_switch[1].checked)
						qmv.color_dispaly_type = "RGB"
					if (cform.qmvi_color_switch[2].checked)
						qmv.color_dispaly_type = "HSB"
				}
			}



		}

	}
	else if (qmd.type=="url")
	{
	

		if (type=="ok" || type=="apply")
		{



			qmv_save_anchor_settings();

		}	


	}
	else if (qmd.type=="multi")
	{
		if (type=="ok" || type=="apply")
		{
			var multi = document.getElementById("qmvi_multi_value");
			qmv_tree_set_value(qmd.owner,multi.value);

			var bad_val = qmv_evt_update_tree_value(qmd.owner);
			if (bad_val) return;
		}

	}
	else if (qmd.type=="edge")
	{

		if (type=="ok" || type=="apply")
		{

			var top = document.getElementById("qmvi_df_edge_top").value;
			var bottom = document.getElementById("qmvi_df_edge_bottom").value;
			var left = document.getElementById("qmvi_df_edge_left").value;
			var right = document.getElementById("qmvi_df_edge_right").value;


			var t;
			if (qmv.edge.array)
			{
				t = top+", "+right+", "+bottom+", "+left;


			}
			else
			{			
				if (top==bottom==left==right)
					t = top;
				else
					t = top+" "+right+" "+bottom+" "+left;
			}

	
			qmv_tree_set_value(qmd.owner,t);
	
			var bad_val = qmv_evt_update_tree_value(qmd.owner);
			if (bad_val) return;

		}



	}
	else if (qmd.type.indexOf("publish")+1 && qmd.type!="quick_publish")
	{
		
	
		if (qmv.publish.page==1)
		{

			if (document.getElementById('qmvi_publish_css_external').checked)
				qmv.publish.css_type = "external";
			else
				qmv.publish.css_type = "inpage";

			if (document.getElementById('qmvi_publish_code_external').checked)
				qmv.publish.code_type = "external";
			else
				qmv.publish.code_type = "inpage";

			if (document.getElementById('qmvi_publish_structure_external').checked)
				qmv.publish.structure_type = "external";
			else
				qmv.publish.structure_type = "inpage";	
			

			if (document.getElementById('qmvi_publish_structure_type_pure').checked)
				qmv.pure = true;
			else
				qmv.pure = false;


			if (qmv.publish.css_type=="external" && qmv.publish.code_type=="external" && qmv.publish.structure_type == "external" && qmv.publish.smenus.length==1)
			{
				qmv_show_dialog("publish10");
				return;
			}

		}
		else if (qmv.publish.page==4)
		{
			
			if (type=="next" && qmv.publish.smenus_pos<qmv.publish.smenus.length-1)
			{
				qmv.publish.smenus_pos++;
				qmv_show_dialog("publish4");
				return;
			}

			if (type=="previous" && qmv.publish.smenus_pos>0)
			{
				qmv.publish.smenus_pos--;
				qmv_show_dialog("publish4");
				return;
			}
			
			if ((qmv.pure && !qmv.free_use) && type=="next") qmv.publish.page++;

		}
		else if (qmv.publish.page==5)
		{
			
			if (qmv.was10 && type=="previous")
			{	
				qmv_show_dialog("publish10");
				return;
			}

			

		}
		else if (qmv.publish.page==6)
		{
			
			if ((qmv.pure && !qmv.free_use) && type=="previous") qmv.publish.page--;

		}
		else if (qmv.publish.page==10)
		{

			if (type=="cancel")
			{
				qmv_hide_dialog(is_msg);
				return;
			}

			qmv.was10 = true;
			if (type=="next")
			{
				qmv_show_dialog("publish5");
				return;
			}
			else
			{
				qmv_show_dialog("publish1");
				return;
			}

		}


		if (type=="next")
		{
			
			qmv_show_dialog("publish"+(qmv.publish.page+1));

		}
		else if (type=="previous")
		{

			qmv_show_dialog("publish"+(qmv.publish.page-1));

		}
	
	}
	else if (qmd.type=="options")
	{

		if (type=="ok" || type=="apply")
		{
			
			var tc = document.getElementById("qmvi_dg_options_auto_collapse");

			if (tc.checked)
			{
				qmv.tree_collapse = true;
				qmad.qmvtree.ctype = 0;
				qmad.qmvtree.etype = 0;
			}
			else
			{
				qmv.tree_collapse = false;
				qmad.qmvtree.ctype = 0;
				qmad.qmvtree.etype = 0;
			}

			var tc = document.getElementById("qmvi_dg_options_hide_selected_box");

			if (tc.checked)
			{
				qmv.interface_hide_selected_box = true;
				qmv_hide_pointer("qm"+qmv.id);
			}
			else
			{
				qmv.interface_hide_selected_box = false;
				qmv_position_pointer(true);

			}


			/*
			tc = document.getElementById("qmvi_dg_options_free_use");
			if (tc.checked)
				qmv.free_use = true;
			else
				qmv.free_use = false;
			*/



			ul = document.getElementById("qmvi_df_options_unlock");

			
			if (ul.value && (qmv.unlock_orig!=ul.value))
			{
				if (ul.value=="qmv6=true")
				{
					qmv.unlock_type = "unlimited";
					qmv.unlock_string = ul.value;


					qmv_show_dialog("alert",null,"<font style='color:#0033dd;'>Congratulations, QuickMenu has been unlocked for unlimited sites!</font><br><br>For the unlock to take effect you must re-publish or save your menu.  <br><br><font style='color:#333333;'>*Note:  Because Visual QuickMenu is browser based you must add your unlock code to the options dialog for each new menu you create.</font>",600,null,null,null,null,true);
					
				}
				else
				{
					qmv.unlock_type = "single";
					
					var qb = ul.value.split(",");
					qmv.unlock_string = ""
					for (var i=0;i<qb.length;i++)
						qmv.unlock_string += qb[i]+";"; 

					qmv.unlock_string = "qm_single='"+qmv.unlock_string+"'";


					qmv_show_dialog("alert",null,"<font style='color:#0033dd;'>Congratulations, QuickMenu has been unlocked for your web site(s)!</font><br><br>For the unlock to take effect you must re-publish or save your menu.  <br><br><font style='color:#333333;'>*Note:  Because Visual QuickMenu is browser based you must add your unlock code to the options dialog for each new menu you create.</font>",600,null,null,null,null,true);
				}

				qmv.unlock_orig = ul.value;

			}
			
			
			

		}


	}
	else if (qmd.type=="image")
	{
		if (type=="ok" || type=="apply")
		{
			var t = document.getElementById("qmvi_dg_image");
			qmd.owner.value = t.value;
		
			var bad_val = qmv_evt_update_tree_value(qmd.owner);
			if (bad_val) return;
		}

	}
	else if (qmd.type=="subposition")
	{



		var m = qmv.container_obj;
		m.style.marginTop = "";
		m.style.marginLeft = "";


		if (type=="ok")
		{

			var os = document.getElementById("qmvi_pos_options1");
			if (os.checked)
			{
				m.style.margin = qmv.container_pos;

			}
			else if (document.getElementById("qmvi_pos_options2").checked)
			{

				var inp = qmv_find_update_tree_value("css","#qm[i] div","margin",qmv.container_pos,false,true);
				qmv_evt_update_tree_value(inp);

			}
			else if (document.getElementById("qmvi_pos_options3").checked)
			{

				m.style.margin = "";
				qmv_reset_secondary_object_positions(m);

			}
			else if (document.getElementById("qmvi_pos_options4").checked)
			{

				var inp = qmv_find_update_tree_value("css","#qm[i] div","margin","",false,true);
				qmv_evt_update_tree_value(inp);

			}

			
		}
		else if (type=="cancel")
		{
			qmv_reset_secondary_object_positions(m);	
		}

		

		qmv_position_pointer();

	}
	else if (qmd.type=="applydividers")
	{

		if (type=="ok" || type=="apply")
			qmv_gld_apply_dividers();


	}
	else if (qmd.type=="applystripes")
	{

		if (type=="ok" || type=="apply")
			qmv_gld_apply_stripes();


	}
	else if (qmd.type=="splash")
	{

		if (type.indexOf("next")+1)
			qmv.dyk_num++;
		else if (type.indexOf("previous")+1)
			qmv.dyk_num--;

		if (qmv.dyk_num<1) qmv.dyk_num = 1;
		if (qmv.dyk_num>qmv.dyk_max) qmv.dyk_num = qmv.dyk_max; 
		
		document.getElementById("qmv_dialog_button0").disabled = false;
		document.getElementById("qmv_dialog_button1").disabled = false;

		if (qmv.dyk_num==1)
		{
			var tb = document.getElementById("qmv_dialog_button0");
			tb.disabled = true;
			tb.blur();
		}
		
		
		if (qmv.dyk_num==qmv.dyk_max)
		{
			var tb = document.getElementById("qmv_dialog_button1");
			tb.disabled = true;
			tb.blur();
		}



		var hi = document.getElementById("qmvi_dyk_tips");
		hi.src = qmv.base+"help/dyk_"+qmv.dyk_num+".html";


	}
	else if (qmd.type=="structure")
	{

		if (document.getElementById("qmvi_structure_type1_pure").checked)
			qmv.pure = true;
		else
			qmv.pure = false;


	}
	else if (qmd.type=="import")
	{

		if (type=="generate menu")
		{

			if (qmv_import_menu())
				qmv_hide_dialog(is_msg,is_help);

		}


	}
	else if (qmd.type=="custom_rule")
	{

		if (type=="add rule")
		{
			if (qmv_custom_rule_build())
				qmv_hide_dialog(is_msg,is_help);
		}
		else if (type=="update rule")
		{


			if (qmv_custom_rule_build(null,qmd.owner))
				qmv_hide_dialog(is_msg,is_help);	
		}
		else if (type=="delete rule")
		{


			qmv_custom_rule_delete(new Object(),null,qmd.owner.idiv)
			qmv_hide_dialog(is_msg,is_help);	

		}

	}
	else if (qmd.type=="apply_custom_class")
	{


		if (type=="add")
			qmv_apply_custom_class();
		else if (type=="remove")
			qmv_apply_custom_class(true);



	}
	else if (qmd.type=="inherit")
	{
		if (type=="ok" || type=="apply")
			qmv_inherit_style_question_okapply()

	}
	else if (qmd.type=="save")
	{
		if (type=="done")
			qmv.changed = false;

	}
	else if (qmd.type=="hoverfill_on")
	{



		if (type=="ok" && qmd.owner.length>1)
		{
	
			var m_array = qmd.owner[0];
			var s_array = qmd.owner[1];

			var mc = document.getElementById("qmvi_hoverfill_main");
			if (mc.checked)
			{
				
				for (var i=0;i<m_array.length;i++)
				{
					if (m_array[i])
					{
						m_array[i].value = "";
						qmv_evt_update_tree_value(m_array[i],null,null,false,true,null,null,null,null,true);
					}

				}


			}

			mc = document.getElementById("qmvi_hoverfill_sub");
			if (mc.checked)
			{
				
				for (var i=0;i<s_array.length;i++)
				{
					if (s_array[i])
					{
			
						s_array[i].value = "";
						qmv_evt_update_tree_value(s_array[i],null,null,false,true,null,null,null,null,true);
					}

				}

			}


			

		}

	}
	else if (qmd.type=="import_where")
	{

		if (type=="ok")
		{

			var selcheck = document.getElementById("qmvi_import_where_selected");
			if (selcheck.checked)
			{
				


				var m = document.getElementById("qm"+qmv.id);
				var create = qmv_pubgen_structure_build_menu_settings(qmv.id,m,null,true);
				qmd.owner.id = "qm"+qmv.id;
				qmd.owner.className = "qmmc";
				
				
				m[qp].insertBefore(qmd.owner,m);
				m[qp].removeChild(m);
				
				eval(create);

				//qmv["report"+qmv.id] = null;
				qmv.pointer["qm"+qmv.id] = null;

				document.onmouseover = null;
				qmv_design_menu2(qmd.owner);
			
				
				qm_oo(new Object(),qmd.owner.getElementsByTagName("A")[0]);
				qmv_update_all_addons();

						

			}
			else
			{

				qmv_add_new_menu(qmd.owner);
				
			}



		}

	}
	else if (qmd.type=="open")
	{

		if (type=="open" || type=="ok")
		{

			var url = document.getElementById("qmvi_open_menu_url").value;
			if (url=="http://www.my_domain.com/my_document.html" || !url || url.length<3)
			{
				qmv_show_dialog("alert",null,"First enter a valid URL.",300);
				return;
			}
			else
			{

				
				

				if (qmad.br_s3)
				{
					window.name = "qm_open";
					window.location.href = url;
				}
				else
				{
					var newwindow = window.open(url,"qm_open","scrollbars=no,location=no,status=yes,menu=no,toolbar=no,resizable=yes");
					if (window.focus) {newwindow.focus()}
			
				}

			}

		}

	}
	
	/*
	var tlb = qmd.buttons.toLowerCase();
	if (is_key_press && tlb.indexOf("ok")==-1 && tlb.indexOf("cancel")==-1)
		return;
	*/


	if (type=="ok" || type=="cancel" || type=="done" || type=="no" || type=="yes" || type=="close" || type=="finished")
		qmv_hide_dialog(is_msg,is_help);

}

function qmvi_update_anchor_settings(a,type)
{
	
	if (type=="url" || type=="href")
		qmv.cur_item.setAttribute("href",a.value);
	else if (type=="target")
		qmv.cur_item.setAttribute("target",a.value);
	else if (type=="title")
		qmv.cur_item.setAttribute("title",a.value);
}

function qmv_reset_secondary_object_positions(m)
{

	var n;
	//if (n = m.hasrcorner)
	//{

		//n.style.top = n.origtop;
		//n.style.left = n.origleft;
	//}

	if (n = m.hasshadow)
	{
		n.style.top = n.origtop;
		n.style.left = n.origleft;
	}



}


function qmv_dialog_onkeypress(e)
{

	e = e || event;

	
	if (e.keyCode==13 && !e.shiftKey)
		qmv_dialog_button_click("ok",null,null,true);
	else if (e.keyCode==27)
		qmv_dialog_button_click("cancel",null,null,true);

}

function qmv_tree_set_value(a,value)
{
	a.prev_value = a.value;
	a.value = value;
}



//other functions

function qmv_modify_set_atag_props(a)
{
	
	if (qm_a(a[qp]))
	{
		
		if (a[qp].ch)
		{
			a.style.styleFloat = "";
			a.style.cssFloat = "";
		}
		else
		{
			a.style.styleFloat = "none";
			a.style.cssFloat = "none";
		}

	}

}

function qmv_insert_spanitem(type,a,skip_select,after,skip_update,skip_undo)
{




	var ns = document.createElement("SPAN");
	if (!a) a = qmv.cur_item;

	if (type=="title")
	{
		if (a[qp].ch)
		{

			qmv_show_dialog("alert",null,"Title items may not be applied to horizontally oriented menus. Choose a vertically oriented main or sub menu before inserting a new title.",480);			
			return;
		}
		
		ns.className = "qmtitle";
		qmv_attach_title_events(ns);
		ns.innerHTML = "New Title";
	
		if (a[qp].ch)
		{
			ns.style.width = "200px";

		}


		if (!after)
			ns = a[qp].insertBefore(ns,a);
		else
			ns = qmv_lib_insert_after(ns,a);

		if (!skip_undo)
			qmvi_report_add_line("edits","undo","modify","add_insert","",ns);
		

	}
	if (type=="cbox")
	{
		

		if (a[qp].ch)
		{

			qmv_show_dialog("alert",null,"Content boxes may not be applied to horizontally oriented menus. Choose a vertically oriented main or sub menu before inserting a new content box.",480);			
			return;
		}
		
		
		ns.className = "qmcbox";
		qmv_attach_cbox_events(ns);
		ns.innerHTML = "New Content Box";
	
		if (a[qp].ch)
			ns.style.width = "200px";

		
		if (!after)
			ns = a[qp].insertBefore(ns,a);
		else
			ns = qmv_lib_insert_after(ns,a);

		if (!skip_undo)
			qmvi_report_add_line("edits","undo","modify","add_insert","",ns);
		

	}
	else if (type=="divider")
	{

		
		if(a[qp].ch && !qmv.addons.tree_menu["on"+qmv.id])
		{

			var val = qmv_find_update_tree_value("individuals","#qm[i] .qmdividery","height",null,true,true);
			if (!val)
			{
				var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmdividery","height",a.offsetHeight+"px",false,true);
				if (update_inp)
					qmv_evt_update_tree_value(update_inp);
			}

			var val = qmv_find_update_tree_value("individuals","#qm[i] .qmdividery","borderLeftWidth",null,true,true);
			if (!val)
			{
				var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmdividery","borderLeftWidth","1px",false,true);
				if (update_inp)
					qmv_evt_update_tree_value(update_inp);
			}


			ns.className = "qmdivider qmdividery"
		}
		else
		{
			

			var val = qmv_find_update_tree_value("individuals","#qm[i] .qmdividerx","borderTopWidth",null,true,true);
			if (!val)
			{
				var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmdividerx","borderTopWidth","1px",false,true);
				if (update_inp)
					qmv_evt_update_tree_value(update_inp);
			}	


			ns.className = "qmdivider qmdividerx"
		}

		qmv_attach_divider_events(ns);


		if (!after)
			a[qp].insertBefore(ns,a);
		else
			qmv_lib_insert_after(ns,a);

		if (!skip_undo)
			qmvi_report_add_line("edits","undo","modify","add_insert","",ns);		
		

	}

	if (!skip_update)
		qmv_update_all_addons();

	
	if (!skip_select)
		qm_oo(new Object(),ns,false);
		

	
}


function qmv_modify_items(type,inner,is_undo)
{


	var ci = qmv.cur_item;
	var cc = ci.parentNode;
	var a,new_cur,skip_oo;
	

	if (type=="add" || type=="insert" || type=="insert-after")
	{

		
		a = qm_modify_items_create_atag(null,inner);

		if (type=="add")
		{
			var lasta;
			var ch = cc.childNodes;
			for (var i=0;i<ch.length;i++)
			{
				if (ch[i].tagName=="A" || ((ch[i].tagName=="SPAN") && (ch[i].className.indexOf("qmtitle")+1 || ch[i].className.indexOf("qmdivider")+1 || ch[i].className.indexOf("qmcbox")+1)))
					lasta = ch[i];

			}
		
			if (lasta.cdiv) lasta = lasta.cdiv;
			qmv_lib_insert_after(a,lasta);
		}
		else if (type=="insert")
		{

			cc.insertBefore(a,ci);
					
		}
		else if (type=="insert-after")
		{

			qmv_lib_insert_after(a,ci);

		}

		qmv_modify_set_atag_props(a);

		new_cur = a;


		if (!is_undo)
			qmvi_report_add_line("edits","undo","modify","add_insert","",a);

		

		
	
	}
	else if (type=="delete")
	{
		var preserve_inner = ci.innerHTML;
		var skip = false;
		var count=0;
		var kids = cc.childNodes;
		for (var i=0;i<kids.length;i++)
		{
			if (kids[i].tagName=="A")
				count++;


			if ((kids[i].tagName=="SPAN") && (kids[i].className.indexOf("qmtitle")+1 || kids[i].className.indexOf("qmdivider")+1 || kids[i].className.indexOf("qmcbox")+1))
				count++
		}
		
		var mod = "sub";
		
		if (count<2)
		{

			if (qm_a(cc))
			{
			
				qmv_show_dialog("alert",null,"The last main menu item may not be deleted.",450)
				return;

			}
			else
			{
						
				new_cur = cc.idiv;
								
				cc.idiv.cdiv = null;
				qm_arc("qmparent",cc.idiv);
				qm_arc("qmactive",cc.idiv);
				qm_li = null;
			
								
				if (cc.hasshadow)
					cc.parentNode.removeChild(cc.hasshadow);

				cc.parentNode.removeChild(cc);
				skip = true;

			}
		}
		

		if (!skip)
		{

			
			mod = "next";
			new_cur = qmv_lib_get_nextsibling_atag_or_span(ci);
			if (!new_cur)
			{
				new_cur = qmv_lib_get_previoussibling_atag_or_span(ci);
				mod = "prev";
			}
								
									
			if (ci.cdiv)
			{
				//if (ci.cdiv.hasrcorner)
					//cc.removeChild(ci.cdiv.hasrcorner);

				
				if (ci.cdiv.hasshadow)
					cc.removeChild(ci.cdiv.hasshadow);

				cc.removeChild(ci.cdiv);
				qm_li = null;
			}
			cc.removeChild(ci);
			
	
		}

		
		if (!is_undo)
		{
			var pitem = null;
			if (!qm_a(new_cur[qp]))
				pitem = new_cur[qp].idiv;
		
			
			qmvi_report_add_line("edits","undo","modify","delete","",preserve_inner,ci.className,new_cur,mod,pitem);
		}


	}
	else if (type.indexOf("addsub")+1)
	{

		if (ci.className.indexOf("qmdivider")+1 || ci.className.indexOf("qmtitle")+1 || ci.className.indexOf("qmcbox")+1)
		{
			qmv_show_dialog("alert",null,"Sub menus may not be applied to title, content box, and divider items, select a standard menu item before applying a child sub menu.",480);			
			return;
		}
		
		if (ci.cdiv)
		{
			qmv_show_dialog("alert",null,"The selected item already contains a sub menu.",450);
			return;
		}


		
		
		var d = document.createElement("DIV");

		if (qmad.br_ie && !qmad.br_ie7)
		{
			var s = document.createElement("SPAN");
			s.className = "qmclear";
			s.innerHTML = "&nbsp;";
			d.appendChild(s);
		}

		
		var qty = 1;
		if (type.length>6)
		{
			var qq = type.substring(6);
			if (qq=="contentbox")
				qty = qq;
			else
				qty = parseInt(type.substring(6));

		}

		
		if (qty=="contentbox")
		{
			
			qmv_check_initialize_new_content_box_settings();
			inner = 'This is a new multi line content box.<br><br>Content boxes may contain multiple custom styled <a href="http://www.opencube.com">inline links</a>.<br><br>Content boxes may also contain images, table and div based layouts, multiple columns, or any HTML content you wish to include.<br><br><b>Hint:</b> Double click the content box for quick access to associated properties.';
			a = qm_modify_items_create_atag(null,inner,true);
			d.appendChild(a);
		}
		else
		{
			for (var i=0;i<qty;i++)
			{
				a = qm_modify_items_create_atag(null,inner);
				d.appendChild(a);
			}
		}

		qmv_attach_container_events(d);

		var nsub = qmv_lib_insert_after(d,ci);

		var ra = document.getElementById("qm"+qmv.id);
		nsub.sh = ra.sh;
		nsub.ch = ra.sh;

		nsub.rl = ra.rl;
		nsub.fl = ra.fl;
		nsub.ft = ra.ft;

		if (qmv.addons.tree_menu["on"+qmv.id])
			nsub.qmtree = 1;


		if (cc.style.zIndex)
			nsub.style.zIndex = parseInt(cc.style.zIndex)+1;

		nsub.idiv = ci;
		ci.cdiv = nsub;
		qm_arc("qmparent",ci,true);

		new_cur = ci;

		qm_la = null;
		qm_oo(new Object(),new_cur,false);


		if (qty=="contentbox")
		{
			
			var sps = nsub.getElementsByTagName("SPAN");
			for (var j=0;j<sps.length;j++)
			{
				if (sps[j].className.indexOf("qmcbox")+1)
					new_cur = sps[j];
					

			}

		}
		else
			new_cur = nsub.getElementsByTagName("A")[0];

		if (!is_undo)
			qmvi_report_add_line("edits","undo","modify","add_insert","",new_cur);


	}
	else if (type=="moveup" || type=="movedown")
	{
		if (qmv.addons.tree_menu["on"+qmv.id])
			skip_oo = true;

		if (type=="moveup")
		{
			
			
			var ps = qmv_lib_get_previoussibling_atag_or_span(ci);
			if (ps)
			{
			

				ci = cc.removeChild(ci);
				cc.insertBefore(ci,ps);

				if (ci.cdiv)
				{
					var cd = cc.removeChild(ci.cdiv);
					qmv_lib_insert_after(cd,ci);

					if (qmad.br_ie7 && cd.style.visibility == "inherit")
					{
						cd.style.visibility = "hidden";
						cd.style.visibility = "inherit";
					}

				}

			
				new_cur = ci;

				if (!is_undo)
					qmvi_report_add_line("edits","undo","modify","moveup","",new_cur);
			}
		}
		else
		{
			var ps = qmv_lib_get_nextsibling_atag_or_span(ci);
			
			if (ps)
			{
				if (ps.cdiv) ps = ps.cdiv;
				ci = cc.removeChild(ci);
				qmv_lib_insert_after(ci,ps);


				if (ci.cdiv)
				{
					var cd = cc.removeChild(ci.cdiv);
					qmv_lib_insert_after(cd,ci);

					if (qmad.br_ie7 && cd.style.visibility == "inherit")
					{
						cd.style.visibility = "hidden";
						cd.style.visibility = "inherit";
					}

				}

				
				new_cur = ci;


				if (!is_undo)
					qmvi_report_add_line("edits","undo","modify","movedown","",new_cur);

			}

		}

		
	
	}
	else if (type=="copyitem")
	{
		
		qmv.copyitem = ci.cloneNode(true);
			

	}
	else if (type=="pasteitem")
	{
		if (qmv.copyitem)
		{		
			a = cc.insertBefore(qmv.copyitem,ci);
			qm_modify_items_create_atag(a);

			qm_arc("qmparent",a);
			qm_arc("qmactive",a);
			a.cdiv = null;		

			if (qmv_lib_is_menu_vertical(qmv.id))
			{
				a.style.cssFloat = "none";
				a.style.styleFloat = "none";
			}
			else
			{
				a.style.cssFloat = "";
				a.style.styleFloat = "";
			}


			qmv.copyitem = a.cloneNode(true);
			qmv_modify_set_atag_props(a);
		
			new_cur = a;

			if (!is_undo)
				qmvi_report_add_line("edits","undo","modify","add_insert","",new_cur);

		}
		else
		{
			qmv_show_dialog("alert",null,"Before pasting, you must first copy an item.",350);

		}

	}

	

	qmv_update_all_addons();

	if (new_cur && !skip_oo)
	{
		
		qm_oo(new Object(),new_cur,false);
	}
	else
		qmv_position_pointer();	


	if (qmv.vdesign_tab=="html")
		qmvi_vd_tab_update_content();


	qmv.changed = true;		



		


}

function qmv_check_initialize_new_content_box_settings()
{



	var val = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","width",null,true,true);
	if (!val)
	{
		var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","width","200px",false,true);
		if (update_inp)
			qmv_evt_update_tree_value(update_inp);


		val = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","padding",null,true,true);
		if (!val)
		{
			var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","padding","10px",false,true);
			if (update_inp)
				qmv_evt_update_tree_value(update_inp);
		}

		val = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","fontFamily",null,true,true);
		if (!val)
		{
			var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","fontFamily","Arial",false,true);
			if (update_inp)
				qmv_evt_update_tree_value(update_inp);
		}

		val = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","fontSize",null,true,true);
		if (!val)
		{
			var update_inp = qmv_find_update_tree_value("individuals","#qm[i] .qmcbox","fontSize","12px",false,true);
			if (update_inp)
				qmv_evt_update_tree_value(update_inp);
		}


	}

	


}

function qm_modify_items_create_atag(a,inner,iscbox)
{
	if (!a)
	{
		if (!iscbox)
		{
			a = document.createElement("A");
			a.href = "javascript:void(0);";
		}
		else
		{
			a = document.createElement("SPAN");
			a.className = "qmcbox";
		}

		
		if (inner)
			a.innerHTML = inner;
		else
			a.innerHTML = "New Item";

		if (!iscbox)
			qmv_evt_add_hover_item_in_visual_event(a);
	}
	


	if (!iscbox)
	{
		a.ondblclick = function()
		{
			qmv_show_dialog("url",document.getElementById("qmv_texturl_field"));
		}

		a.oncontextmenu = function(e)
		{
			qmv_show_context(e,"menuitem",this);

		}
	}
	else
		qmv_attach_cbox_events(a);

	a.onclick = qm_oo;

	
	return a;

}



function qm_switch_texturl_state(type)
{

	var iurl = document.getElementById("qmv_texturl_url");
	var itext = document.getElementById("qmv_texturl_text");


	if (type=="text")
	{
	
		if (qmv.texturl_state=="text" && qmv_check_texturl_build())
			qmv_evt_build_button_click(document.getElementById("qmv_texturl_field_bb"));

		iurl.src = qmv.base+"images/qmv_url_off.gif";
		itext.src = qmv.base+"images/qmv_text.gif";
	}
	else
	{

		if (qmv.texturl_state=="url")
			qmv_evt_build_button_click(document.getElementById("qmv_texturl_field_bb"));

		iurl.src = qmv.base+"images/qmv_url.gif";
		itext.src = qmv.base+"images/qmv_text_off.gif";

	}


	qmv.texturl_state = type;
	qmv_set_texturl_field(qmv.cur_item)

}

function qm_arc(name,b,add)
{

	var a = b[qc];
	if (add)
	{
		if (a.indexOf(name)==-1)
			b[qc] += (a?' ':'') + name;	
		
	}
	else
	{
		
		b[qc] = a.replace(" "+name,"");
		b[qc] = b[qc].replace(name,"");
	
	}
}



function qmv_set_all_subs_to_default_position(check_vis,iefix)
{
	
	var divs = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
	for (var i=0;i<divs.length;i++)
	{
		
		if (check_vis && divs[i].style.visibility!="inherit")
		{
			
			continue;
		}

		if (iefix && divs[i].style.visibility=="inherit")
		{
			divs[i].style.visibility="";
			divs[i].style.visibility="inherit";
		}
		
		qmv_set_sub_to_default_position(divs[i]);

	}

}


function qmv_set_sub_to_default_position(b)
{

	
	var aw = b.idiv.offsetWidth;
	var ah = b.idiv.offsetHeight;
	var ax = b.idiv.offsetLeft;
	var ay = b.idiv.offsetTop;
	
	
	if (b[qp].ch)
	{
		
		aw = 0;
		if (b.fl) ax =0;
	}
	else
	{
		if (b.ft) ay=0;	
		if (b.rl)
		{
			ax = ax-b.offsetWidth;
			aw=0;
		}

		ah=0;
	}		



	
	b.style.left = (ax+aw)+"px";
	b.style.top = (ay+ah)+"px";
	
}



//addon updates

function qmv_update_all_addons(except,supress_msgs,force_update)
{

	var i;
	for (i in qmv.addons)
	{
		
		if (i==except)
			continue;

		if (qmv.addons[i].noupdate && !force_update)
			continue;
		
		
		if (window["qmv_update_"+i])
			eval("qmv_update_"+i+"(null,null,"+supress_msgs+")");
		

	}

	/*

	if (qmv.interface_full)
	{
		var a = document.getElementById("qm"+qmv.id);
		if (a[qp].menufloater)
		{

			var twidth = 0;				

			var ch = a.childNodes;
			for (var i=0;i<ch.length;i++)
			{
				if (ch[i].tagName && (ch[i].tagName=="SPAN" || ch[i].tagName=="A"))
					twidth+= ch[i].offsetWidth;
	
			}

			a[qp].style.width = twidth;

		}
	}
	*/


}



function qmv_update_drop_shadow(hide)
{

	
	if (!hide && !qmv.addons.drop_shadow["on"+qmv.id])
		return;

	
	var divs = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
	for (var i=0;i<divs.length;i++)
	{
		
		if ((divs[i].style.visibility=="inherit" && !divs[i].hasshadow) || hide)
		{
			
			qm_drop_shadow(divs[i],hide);

		}
		else if (divs[i].hasshadow)
		{

			
			divs[i].hasshadow.parentNode.removeChild(divs[i].hasshadow);
			divs[i].hasshadow = null;
				
			if (divs[i].style.visibility=="inherit")
				qm_drop_shadow(divs[i],false,true);

			
			
		}


	}
	

}


function qmv_update_keyboard(hide)
{

	if (!hide)
		qmv_show_dialog("alert",null,"To test keyboard access functionality, preview your menu by clicking the preview option in the visual interface menu.",480);			

}


function qmv_update_round_corners(hide,dtype,supress_msg)
{

	

	if (!qmv.addons.round_corners["on"+qmv.id] && !hide)
		return;


	
	
	var divs = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
	for (var i=0;i<divs.length;i++)
	{
		
		if (divs[i].hasrcorner)
		{
			divs[i].hasrcorner.parentNode.removeChild(divs[i].hasrcorner);
			divs[i].hasrcorner = null;
		}

		if (!hide && divs[i].style.visibility=="inherit")
			qm_rcorner(divs[i]);

	}

	if (!supress_msg)
	{

		if (hide)
		{
			qmv.questionasked_rcorner_size = false;
			qmv_updatehandle_round_corner_hide()
		}
		else
			qmv_updatehandle_round_corner_show();
	}
	
	
}

function qmv_update_bump_effect(hide,dtype,supress_msg)
{

	if (!qmv.addons.bump_effect["on"+qmv.id] && !hide)
		return;


	if (!supress_msg)
	{
	
		if (hide)
			qmv.questionasked_bump_effect = false;
		else
		{
			if (!qmv.questionasked_bump_effect)
			{
	
				qmv_ask_and_set_value("The bump effect typically looks best when used in conjunction with a show sub menu delay.  Set the value below or at any time under the 'Menu Settings' tree heading.  A common setting which works well is 250 which is equal to 1/4 second.<br><br>Show Delay (ms - 1/1000th of a second)",400,250,"settings","create","showdelay");	
				qmv.questionasked_bump_effect = true;
			}

		}
	}

}


function qmv_updatehandle_round_corner_hide(isyes,bg,border)
{

	if (!isyes)
	{
		var m = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
		if (m[0])
		{

			var bg = qm_lib_get_computed_style(m[0],"background-color","backgroundColor")+"";
			
			if (!bg || bg=="transparent" || bg=="rgba(0, 0, 0, 0)")
			{		
		
				bg = qmv_find_update_tree_value("addon","round_corners","rcorner_bg_color","",true);
				border = qmv_find_update_tree_value("addon","round_corners","rcorner_border_color","",true);

				if (bg || border)
				{
					
					qmv_show_dialog("question-yesno",null,"Would you like to automatically apply the rounded container styles to the standard settings?<br><br>Your sub menu containers may be transparent if these colors are not applied!",600,"qmv_updatehandle_round_corner_hide(true,'"+bg+"','"+border+"')");	
					
					
	
				}
	
			}

		}
	}
	else
	{
		
		var inp;
		inp = qmv_find_update_tree_value("css","#qm[i] div","backgroundColor",bg,false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] div","borderStyle","solid",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] div","borderColor",border,false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] div","borderWidth","1px",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		if (document.getElementById("qmvtree_filter").cdiv.style.display=="block")
			qmv_filter_init2();

	}


}

function qmv_updatehandle_round_corner_show(a,isyes,bg,border,itembg,force)
{
	
	if (!isyes)
	{
		
		if (qmv.questionasked_rcorner_size && !force) return;

		var m = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
		if (m[0])
		{

			var bg = qm_lib_get_computed_style(m[0],"background-color","backgroundColor")+"";
			var border = qm_lib_get_computed_style(m[0],"border-left-color","borderLeftColor")+"";

			
			if (qmad.br_fox && !qmad.br_s3)
			{
				bg = qmv_convert_color_to_hex(bg);
				border = qmv_convert_color_to_hex(border);
			}
			
			var itembg = "";
			var ma = m[0].getElementsByTagName("A")[0];
			if (ma)
				itembg = qm_lib_get_computed_style(ma,"background-color","backgroundColor")+"";


			if (bg && bg.toLowerCase()!="transparent" && bg!="rgba(0, 0, 0, 0)")
			{

				qmv_show_dialog("question-yesno",null,"Rounded corner subs are additional containers which sit under the sub menu items.  For the best results, set item colors transparent and apply container styles to the rounding add-on only.<br><br>Would you like to automatically move and apply your current color values?",600,"qmv_updatehandle_round_corner_show(null,true,'"+bg+"','"+border+"','"+itembg+"')");	
				//qmv_show_dialog("question-yesno",null,"Each Rounded corners container sits under the existing sub menu container.  To give the appearance of a single sub menu container with rounded corners you must match the colors of both containers, or set the sub menu containers colors to transparent.<br><br>Would you like Visual QuickMenu to blend the container colors for you?",600,"qmv_updatehandle_round_corner_show(null,true,'"+bg+"','"+border+"','"+itembg+"')");	
				qmv.questionasked_rcorner_size = true;
		
			}
			else
			{
				if (force)
					qmv_show_dialog("alert",null,"The rounded container colors have already been blended to match.",500);


			}	
	
		}
	}
	else
	{
		
		var inp;
		inp = qmv_find_update_tree_value("css","#qm[i] div","backgroundColor","transparent",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] div","borderStyle","none",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] div a","backgroundColor","transparent",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		if (document.getElementById("qmvtree_filter").cdiv.style.display=="block")
			qmv_filter_init2();

		var sval;

		if (bg || itembg)
		{
			sval = bg;
			if (!bg)
				sval = itembg;


			inp = qmv_find_update_tree_value("addon","round_corners","rcorner_bg_color",sval);
			qmv_evt_update_tree_value(inp);
		}

		if (border)
		{
			
			inp = qmv_find_update_tree_value("addon","round_corners","rcorner_border_color",border);
			qmv_evt_update_tree_value(inp);

		}
	
	}

}

function qmv_update_over_select(hide)
{

	if (!hide && !qmv.addons.over_select["on"+qmv.id])
		return;


	if (qmad.br_ie && !qmad.br_ie7)
	{

		var divs = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
		for (var i=0;i<divs.length;i++)
		{
		
			if ((divs[i].style.visibility=="inherit" && !divs[i].hasselectfix) || hide)
			{
				
				qm_over_select(divs[i],hide);

			}
			else if (divs[i].hasselectfix)
			{

			
				divs[i].hasselectfix.parentNode.removeChild(divs[i].hasselectfix);
				divs[i].hasselectfix = null;
				
				if (divs[i].style.visibility=="inherit")
					qm_over_select(divs[i],false);

			
			
			}


		}
	}

}


function qmv_update_apsubs(hide)
{

	if (!qmv.addons.apsubs["on"+qmv.id] && !hide)
		return;

	if (!hide)
	{
		var divs = document.getElementById("qm"+qmv.id).getElementsByTagName("DIV");
		for (var i=0;i<divs.length;i++)
		{
			
			if (divs[i].style.visibility=="inherit")
				qm_apsubs(divs[i]);
		}
	}
	else
		qmv_set_all_subs_to_default_position();
	

}

function qmv_update_match_widths(hide)
{

	if (!hide && !qmv.addons.match_widths["on"+qmv.id])
		return;

		
	var divs = document.getElementById("qm"+qmv.id).childNodes;	
	for (var i=0;i<divs.length;i++)
	{
		if (divs[i].tagName=="DIV")
		{	
			if (hide)
				divs[i].style.width = "";
			else
				qm_mwidths_a(divs[i],divs[i].idiv);
			
		}
		
		

	}


	
	qmv_set_all_subs_to_default_position();
	

}

function qmv_update_tabs(hide)
{

	
	if (!hide && !qmv.addons.tabs["on"+qmv.id])
		return;

	
	
	var a = document.getElementById("qm"+qmv.id).childNodes;
	for (var i=0;i<a.length;i++)
	{

		if (a[i].istab)
		{
			
			a[i].parentNode.removeChild(a[i]);

		}
		
	}

	if (!hide)
		qm_tabs_init(null,qmv.id);
	
	

}

function qmv_update_tabscss(hide,dtype,supress_msg)
{
	
	if (!hide && !qmv.addons.tabscss["on"+qmv.id])
		return;


	

	var a = document.getElementById("qm"+qmv.id).childNodes;
	for (var i=0;i<a.length;i++)
	{

		if (a[i].iscsstab)
		{
			
			a[i].parentNode.removeChild(a[i]);
			i--;
		}
		
	}

	if (!hide)
	{
		qm_tabscss_init(null,qmv.id);

		if (!supress_msg)
			qmv_updatehandle_tabscss_show();
	}
	else
	{

		qmv.questionasked_tabscss_on = false;

	}	
		
	
}


function qmv_update_pointer(hide)
{

	if (!hide && !qmv.addons.pointer["on"+qmv.id])
		return;

	var cdiv = document.getElementById("qm"+qmv.id);
	if (cdiv.haspointer)
	{

		cdiv.removeChild(cdiv.haspointer);
		cdiv.haspointer = null;

		if (cdiv.detachEvent)
			cdiv.detachEvent("onmousemove",qm_pointer_move);
		
			
	}

	var divs = cdiv.getElementsByTagName("DIV");
	for (var i=0;i<divs.length;i++)
	{
		
		if (divs[i].haspointer)
		{

			divs[i].removeChild(divs[i].haspointer);
			divs[i].haspointer = null;

			
			if (divs[i].detachEvent)
				divs[i].detachEvent("onmousemove",qm_pointer_move);
			
		}
	}


	if (!hide)
	{
		qmv_hide_pointer("qm"+qmv.id);
		qm_pointer_init(null,qmv.id);
	}
	
	

}


function qmv_updatehandle_tabscss_show(a,isyes,color)
{
	
	if (!isyes)
	{
		

		if (qmv.questionasked_tabscss_on) return;
		if (qmv_find_update_tree_value("addon","tabscss","tabscss_border_color",null,true)) return;

		
		var m = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
		if (m[0])
		{
		
			
	
			var bstyle = qm_lib_get_computed_style(m[0],"border-top-style","borderTopStyle")+"";
			var bwidth = qm_lib_get_computed_style(m[0],"border-top-width","borderTopWidth")+"";
			var bcolor = qm_lib_get_computed_style(m[0],"border-top-color","borderTopColor")+"";
		
		

			if (qmad.br_fox)
				bcolor = qmv_convert_color_to_hex(bcolor);
			
			

			if (bstyle && bwidth && bcolor)
			{
				
				qmv_show_dialog("question-yesno",null,"Would you like to match the tab elements border color to your items border color?<br><br>This color may be changed at any time under the CSS tab addon settings.",600,"qmv_updatehandle_tabscss_show(null,true,'"+bcolor+"')");	
				qmv.questionasked_tabscss_on = true;

			}
	
	
		}
	}
	else
	{
		
		
		var inp;
		inp = qmv_find_update_tree_value("addon","tabscss","tabscss_border_color",color);
		qmv_evt_update_tree_value(inp);

		

		
	}

}

function qmv_update_hoverfill(hide,dtype,supress_msg)
{



	if (!hide && !qmv.addons.hoverfill["on"+qmv.id])
		return;

	

	//kill any existing bullet before recreating
	var a = document.getElementById("qm"+qmv.id).getElementsByTagName("SPAN");
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].ishoverfill)
		{
			
				
			if(a[i].parentNode.removeEventListener)
				a[i].parentNode.removeEventListener("onmouseover",qm_hoverfill_active,false);
			else if (a[i].parentNode.detachEvent)
				a[i].parentNode.detachEvent("onmouseover",qm_hoverfill_active);


			a[i].parentNode.removeChild(a[i]);
			i--;
		}	
		
	}
	
	

	qmad.hoverfill.lasthl = null;

	if (!hide)
	{
		
		qm_hoverfill_init_items(document.getElementById("qm"+qmv.id),qmad["qm"+qmv.id]);

		a = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
		for (var i=0;i<a.length;i++)
		{

			
			if (a[i].className.indexOf("qmactive")+1)
				qm_hoverfill_active(new Object(),a[i],false,true);
			
		}

	}


	if (!supress_msg)
	{
		if (!hide)
			qmv_updatehandle_hoverfill_show();
	}
	

}

function qmv_updatehandle_hoverfill_show(skip)
{



	
	if (qmv.questionasked_hoverfill_on && !skip) return;
		
		
	var m_array = new Array();
	var s_array = new Array();

	m_array.push(qmv_find_update_tree_value("css","#qm[i] a","backgroundColor",null,false,false,true));
	m_array.push(qmv_find_update_tree_value("css","#qm[i] a:hover","backgroundColor",null,false,false,true));
	m_array.push(qmv_find_update_tree_value("css","body #qm[i] .qmactive","backgroundColor",null,false,false,true));
	m_array.push(qmv_find_update_tree_value("css","#qm[i] .qmparent","backgroundColor",null,false,false,true));

	s_array.push(qmv_find_update_tree_value("css","#qm[i] div a","backgroundColor",null,false,false,true));
	s_array.push(qmv_find_update_tree_value("css","#qm[i] div a:hover","backgroundColor",null,false,false,true));
	s_array.push(qmv_find_update_tree_value("css","body #qm[i] div .qmactive","backgroundColor",null,false,false,true));
	s_array.push(qmv_find_update_tree_value("css","#qm[i] div .qmparent","backgroundColor",null,false,false,true));
	

	var go = false;
	for (var i=0;i<m_array.length;i++)
	{
		if (m_array[i] && m_array[i].value && m_array[i].value != "transparent")
		{
			go = true;
			break;
		}
	}
		
	if (!go)
	{
		for (var i=0;i<s_array.length;i++)
		{
			if (s_array[i] && s_array[i].value && s_array[i].value != "transparent")
			{
				go = true;
				break;
			}
		}
	}
		

	if (go)
	{
		var tarray = new Array(m_array,s_array);
		qmv_show_dialog("hoverfill_on",tarray);	
		qmv.questionasked_hoverfill_on = true;
	}
		

}


function qmv_update_item_bullets(hide)
{

	if (!hide && !qmv.addons.item_bullets["on"+qmv.id])
		return;

	//kill any existing bullet before recreating
	var a = document.getElementById("qm"+qmv.id).getElementsByTagName("SPAN");
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].getAttribute("isibullet"))
		{
		
			if(a[i].parentNode.removeEventListener)
				a[i].parentNode.removeEventListener("onmouseover",qm_ibullets_hover,false);
			else if (a[i].parentNode.detachEvent)
				a[i].parentNode.detachEvent("onmouseover",qm_ibullets_hover);

			a[i].parentNode.removeChild(a[i]);
			i--;
		}
		
	}

	if (!hide)
		qm_ibullets_init(null,qmv.id);


	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].getAttribute("isibullet"))
		{
		
			qmv_add_bullet_events(a[i]);
			
			
		}
		
	}
	

}

function qmv_update_ibcss(hide,dtype)
{

	if (!hide && !qmv.addons.ibcss["on"+qmv.id])
		return;

	var a = document.getElementById("qm"+qmv.id).getElementsByTagName("SPAN");
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].getAttribute("isibulletcss"))
		{
		
			if(a[i].parentNode.removeEventListener)
				a[i].parentNode.removeEventListener("onmouseover",qm_ibullets_hover,false);
			else if (a[i].parentNode.detachEvent)
				a[i].parentNode.detachEvent("onmouseover",qm_ibullets_hover);

			a[i].parentNode.removeChild(a[i]);
			i--;
		}
		
	}

	if (!hide)
		qm_ibcss_init(null,qmv.id);


	var init_styles = false;
	if (!qmv.ibcss_ss)
	{
		qmv.ibcss_ss = qmv_lib_get_qm_stylesheet(".qmvibcssmenu");
		if (!qmv.ibcss_ss)qmv.ibcss_ss = qmv_lib_get_qm_stylesheet(".qmvibcssstyles");
		init_styles = true;
	}


	if (dtype=="color" || init_styles)
	{
		
		var tstyles = qmv.ibcss_ss;	
		if (tstyles)
		{
		
			var rules;
			if (tstyles.rules)
				rules = tstyles.rules;
			else if (tstyles.cssRules)
				rules = tstyles.cssRules;

			if (!hide)
			{
				var bgc = "#ffffff";
				var bbc = "#000000";
				var t;



				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_main_bg_color",null,true)) bgc = t;
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_main_border_color",null,true)) bbc = t;
				qmv_lib_update_add_rule_styles(tstyles,rules,"#qm"+qmv.id+" .qm-ibcss-static span","background-color:"+bgc+";border-color:"+bbc+";");

				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_main_bg_color_hover",null,true)) bgc = t;
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_main_border_color_hover",null,true)) bbc = t;
				qmv_lib_update_add_rule_styles(tstyles,rules,"div#qm"+qmv.id+" .qm-ibcss-hover span","background-color:"+bgc+";border-color:"+bbc+";");

				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_main_bg_color_active",null,true)) bgc = t;
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_main_border_color_active",null,true)) bbc = t;
				qmv_lib_update_add_rule_styles(tstyles,rules,"body div#qm"+qmv.id+" .qm-ibcss-active span","background-color:"+bgc+";border-color:"+bbc+";");

				bgc = "#ffffff";
				bbc = "#000000";
			
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_sub_bg_color",null,true)) bgc = t;
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_sub_border_color",null,true)) bbc = t;
				qmv_lib_update_add_rule_styles(tstyles,rules,"#qm"+qmv.id+" div .qm-ibcss-static span","background-color:"+bgc+";border-color:"+bbc+";");
	
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_sub_bg_color_hover",null,true)) bgc = t;
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_sub_border_color_hover",null,true)) bbc = t;
				qmv_lib_update_add_rule_styles(tstyles,rules,"div #qm"+qmv.id+" div .qm-ibcss-hover span","background-color:"+bgc+";border-color:"+bbc+";");

				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_sub_bg_color_active",null,true)) bgc = t;
				if (t = qmv_find_update_tree_value("addon","ibcss","ibcss_sub_border_color_active",null,true)) bbc = t;
				qmv_lib_update_add_rule_styles(tstyles,rules,"body div#qm"+qmv.id+" div .qm-ibcss-active span","background-color:"+bgc+";border-color:"+bbc+";");


			
			}
		}
	}


	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].getAttribute("isibulletcss"))
		{
		
			qmv_add_bullet_css_events(a[i]);
			
			
		}
		
	}
}


function qmv_update_ritem(hide,dtype)
{


	if (!hide && !qmv.addons.ritem["on"+qmv.id])
		return;


	
	var a = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].hasritem)
		{
			
			a[i].removeChild(a[i].hasritem);
			a[i].hasritem = null;

		}
		
	}


	

	a = document.getElementById("qm"+qmv.id).getElementsByTagName("SPAN");
	for (var i=0;i<a.length;i++)
	{
		
		if (a[i].hasritem)
		{
			
			a[i].removeChild(a[i].hasritem);
			a[i].hasritem = null;

		}
		
	}

	if (!hide)
		qm_ritem_init(null,qmv.id);


}



function qmv_update_tree_menu(hide,dtype,supress_msg,kill_styles_only,spec_id)
{

	
	

	if (!hide && !qmv.addons.tree_menu["on"+qmv.id])
		return;

	var tstyles = qmv_lib_get_qm_stylesheet(".qmistreestylesqm"+qmv.id);
	if (!tstyles)tstyles = qmv_lib_get_qm_stylesheet(".qmvistreestyles");

	if (tstyles)
	{
		var rules;
		if (tstyles.rules)
			rules = tstyles.rules;
		else if (tstyles.cssRules)
			rules = tstyles.cssRules;

		if (!hide)
		{
			
			var az = "";
			if (window.showHelp) az = "zoom:1;";

			if (!qmv.addons.tree_menu.initialized)
			{
				qmv_lib_update_add_rule_styles(tstyles,rules,"#qm"+qmv.id+" a","float:none !important;white-space:normal !important;position:static !important;");
				qmv_lib_update_add_rule_styles(tstyles,rules,"#qm"+qmv.id+" div","width:auto !important;left:0px !important;top:0px !important;overflow:hidden !important;"+az+"margin-left:0px !important;margin-top:0px !important;");

			}

			if (!isNaN(qmad["qm"+qmv.id].tree_sub_sub_indent))
				qmv_lib_update_add_rule_styles(tstyles,rules,"#qm"+qmv.id+" div div",'padding-left:'+qmad["qm"+qmv.id].tree_sub_sub_indent+'px;');
			else
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+qmv.id+" div div");
							
			
			
			
			qm_tree_init(null,"qm"+qmv.id);


			if (!qmv.addons.tree_menu.initialized)
			{

				var a = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
				for (var i=0;i<a.length;i++)
				{
					var c;
					if (c = a[i].cdiv)
					{
					
						c.qmtree = 1;
									
						if (c.style.visibility=="inherit")	
						{
							qm_arc("qmfh",c);
							c.style.position = "relative";
						}
					
					
					}
				}	
			}


			qmv.addons.tree_menu.initialized = true;


		}
		else
		{

			
			if (kill_styles_only)
			{
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+spec_id+" div div");
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+spec_id+" div");
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+spec_id+" a");
				qmv.addons.tree_menu.initialized = false;
				return;
			}
			else
			{
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+qmv.id+" div div");
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+qmv.id+" div");
				qmv_lib_update_remove_rule(tstyles,rules,"#qm"+qmv.id+" a");
			}
			
									
			var a = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
			for (var i=0;i<a.length;i++)
			{

				if (a[i].cdiv)
				{
					
					a[i].cdiv.qmtree = null;
					a[i].cdiv.ismove = null;
										
					qm_arc("qmfh",a[i].cdiv);
					qm_arc("qmfv",a[i].cdiv);
					
					
					a[i].cdiv.style.height = "";
					a[i].cdiv.style.position = "";
					

					a[i].cdiv.style.visibility = "";

					
				}

			}


			var cl = qmv.cur_item;
			if (cl.cdiv)
				cl = cl.cdiv;
			else
				cl = cl[qp];

			while (!qm_a(cl))
			{
				if (cl.tagName=="DIV")
					cl.style.visibility = "inherit";

				cl = cl[qp];
			}

			qmv_set_all_subs_to_default_position(true);
			qmv.addons.tree_menu.initialized = false;			

		}
		
		
	}

	

	if (hide) qmv.asked_tree_width = false;
	if (!qmv.asked_tree_width && !supress_msg)
	{
		var tinp = new Object();

		if (hide)
		{

			var vval = qmv_lib_parse_value(qmv_find_update_tree_value("settings","create","isvertical",null,true),'bool');
			if (!vval)
				qmv_input_code_ask_width();
		}
		else
		{
			
			var vval = qmv_find_update_tree_value("css","#qm[i]","width",null,true);
			if (!vval)
				qmv_input_code_ask_width(true);
		}

		if (!hide)
			qmv.asked_tree_width = true;
	}
	

}




function qmv_delete_menu()
{

	if (qmv_lib_get_menu_count()>1)
	{

		var a;
		if (a = document.getElementById("qm"+qmv.id))
			qmv_show_dialog("question-okcancel",a,"The active menu system, and all asociated settings will be deleted!<br><br>Do wish to continue?",450,"qmv_delete_menu_ok(qmv.id,true)");	
			
	
	}
	else
	{

		qmv_show_dialog("alert",a,"The last menu may not be deleted.",450);

	}

}

function qmv_view_html_page(skip_prompt)
{

	

	qmv_addon_set_all_status();

	qmv_hide_dialog(false,false,true);
	qmv_hide_dialog(false,true,false);
	qmv_hide_dialog(true,false,false);



	if (!skip_prompt && !qmv.msg_shown_preview)
	{
		qmv_show_dialog("question-okcancel",a,"The visual interface will be closed while viewing the HTML page. To re-open the interface <font style='color:#dd3300'>double click</font> anywhere in the document.<br><br>Continue with HTML page view?",450,"qmv_view_html_page(true)");
		return;
	}


	if (qmv.interface_full)
	{
		
		qmv_set_interface_mode("inpage");
		qmv.was_full_on_preview = true;
	}
	else
	{

		qmv.was_full_on_preview = false;
	}



	qmv.msg_shown_preview = true;

	qm_th = qmv.ms_hide_timer;
	document.ondblclick = qmv_design_menu;

	
	var a;
	for (var i=0;i<10;i++)
	{
		if (a = document.getElementById("qm"+i))
		{
			qmv_hide_pointer("qm"+i);
			qmv_preview_menu2(a);
			
		}

	}


	qmv.preview_mode = true;
	qmv.qmvi.style.visibility = "hidden";

	
	qmv_2bo();
	
	

}

function qmv_preview_update(e,a)
{
	
	var piw = document.getElementById("qmvi_preview_iframe").contentWindow;

	piw.document.open();

	if (a.id=="qmvi_preview_javascript_disabled")
	{

		piw.document.write(qmv_savegen(false,true,true));	
	}
	else
	{
		piw.document.write(qmv_savegen(false,true));
	}

	piw.document.close();

}


function qmv_preview_init()
{
	
	var piw = document.getElementById("qmvi_preview_iframe").contentWindow;
		
	piw.document.open();
	piw.document.write(qmv_savegen(false,true));
	piw.document.close();
	

}


function qmv_preview_menu(skip_prompt)
{

	
	qmv_show_dialog("preview");	
	

}

function qmv_2bo()
{

	//close all the menus, same as qm_2bo
	var a;
	if ((a = qm_li))	
	{
		
		do
		{
			
			qm_uo(a);
			
			
		}while ((a = a[qp]) && !qm_a(a))

	}

	qm_li = null;


}

function qmv_preview_menu2(b)
{
	


	var clickall = (b.oc.indexOf("all")+1 || qmv.addons.tree_menu["on"+b.id.substring(2)]);

	
	if (b.oc!="all-always-open")
	{
		if (clickall || b.oc=="main")
			document.onclick = qm_bo;
		else
			document.onmouseover = qm_bo;
	}

	if (b.oc.indexOf("all")+1 || b.oc=="main")
		qm_th = 0;

	if (b.oc=="main")
	{
		qm_ib = true;
		b.onclick=function(event){qm_ic = true;qm_oo(new Object(),qm_la,true);qm_kille(event)};
		document.onmouseover = function(){qm_la=null;clearTimeout(qm_tt);qm_tt=null;};
	}


	var sid = b.id.substring(2);
	a = b.getElementsByTagName("A");
	for (var j=0;j<a.length;j++)
	{

		a[j].ondblclick = null;
		

		if (clickall || (b.oc=="lev2" && !qm_a(a[j][qp])))
		{

			a[j].onmouseover=function(){o=this;a=this;if (window.qmad && qmad.bhover) eval(qmad.bhover);clearTimeout(qm_tt);qm_tt=null;qm_la=null;};
			a[j].onclick = function(event)
			{
				qm_oo(event,this);
				qm_kille(event);
			}
		}
		else
		{

			a[j].onmouseover = qm_oo;
			a[j].onclick = qm_oo;

		}
		
		
		a[j].oncontextmenu = function(e){e=e||event;qm_kille(e);return false;};
		
		if (qmv.addons.keyboard["on"+sid])
		{

			a[j].onfocus = null;
			if (a[j].attachEvent)
				a[j].attachEvent("onkeydown",qm_kb_press);
			else if (a[j].addEventListener)
				a[j].addEventListener("keypress",qm_kb_press,true);
		
		}

		a[j].qmts = qmv.ms_show_timer;
	}

	
	
	a = b.getElementsByTagName("SPAN");
	for (var j=0;j<a.length;j++)
	{
		
		if (a[j].className.indexOf("qmdivider")+1)
		{
			a[j].oncontextmenu = function(e){e=e||event;qm_kille(e);return false;};

		}
		else if (a[j].className.indexOf("qmtitle")+1)
		{

			a[j].oncontextmenu = function(e){e=e||event;qm_kille(e);return false;};

		} 
		else if (a[j].getAttribute("isibulletcss"))
		{
			
			a[j].oncontextmenu = function(e){e=e||event;qm_kille(e);return false;};

		}
		else if (a[j].getAttribute("isibullet"))
		{
			a[j].oncontextmenu = function(e){e=e||event;qm_kille(e);return false;};
		
		}
	}	
}

function qmv_click_document_element(e)
{


	qmv_hide_pointer("qm"+qmv.id);
	qmv_hide_context();


}


function qmv_design_menu()
{

	

	qmv.preview_mode = false;

	qm_th = 0;  //set the hide timer to zero
	document.onmouseover = null;

	qm_ib = false;
		
	document.onclick = function()
	{
		qmv_click_document_element();
	}
	
	
	document.ondblclick = null;


	if (qmv.was_full_on_preview && !qmv.interface_full)
		qmv_set_interface_mode("full");

	var a;
	var ac = false;
	for (var i=0;i<10;i++)
	{
		if (a = document.getElementById("qm"+i))
		{
			a.style.visibility = "";
			qmv_design_menu2(a);


			
			if (!ac)
			{
				
				ac = true;
				qm_oo(new Object(),a.getElementsByTagName("A")[0]);
				
			}


			
		}

	}	

	
	//show the interface
	qmv.qmvi.style.visibility = "visible";

	//sync the hoverfill add-on
	qmv_update_hoverfill();

}




function qmv_create_pointer(a)
{

	if (!qmv.pointer[a.id])
	{
		
		qmv.pointer[a.id] = new Object();
		var c = document.createElement("SPAN");
		c.style.display = "none";
		c.style.position = "absolute";
		c.style.zIndex = qmv.base_zindex-200;
		c.style.fontSize = "1px";
		c.isqmv = 1;
		c.isselector=1;

		c.style.width = "1px";
		c.style.height = "1px";

		var iss = "width:1px;height:1px;position:absolute;border-color:#ff0000;font-size:1px;border-style:dashed;"
		var ihp = '<span top=1 style="border-width:1px 0px 0px 0px;'+iss+'"></span>';
		ihp += '<span bottom=1 style="border-width:1px 0px 0px 0px;'+iss+'"></span>';
		ihp += '<span left=1 style="border-width:0px 0px 0px 1px;'+iss+'"></span>';
		ihp += '<span right=1 style="border-width:0px 0px 0px 1px;'+iss+'"></span>';

		c.innerHTML = ihp;

		c.onclick = function(e)
		{
			e = e || event;
			if (e.button==0)
			{
				qm_oo(new Object(),qmv.cur_item)
				qm_kille(e);
			}
		};

		c.ondblclick = function(event)
		{
			qmv_show_dialog("url",document.getElementById("qmv_texturl_field"));
			qm_kille(event);
		}

		c.onmouseover = function()
		{
			qm_image_switch(qmv.cur_item);
		}


		c.oncontextmenu = function(e)
		{
			e = e || event;
			qmv_show_context(e,"menuitem",qmv.cur_item);
	
		}
		

		a.insertBefore(c,a.firstChild);
		qmv.pointer[a.id].a = c;

	}


}



function qmv_design_menu2(b)
{

	qmv_create_pointer(b);

	b.onclick = null;  //cancels the event placed here for onclick=main
					
	a = b.getElementsByTagName("A");
	for (var j=0;j<a.length;j++)
	{


		if (a[j][qp].tagName!="DIV" || (!a[j][qp].idiv && a[j][qp].className.indexOf("qmmc")==-1))
			continue;


		
		a[j].oncontextmenu = function(e)
		{
			qmv_show_context(e,"menuitem",this);
		}
				
		a[j].ondblclick = function(event)
		{
			qmv_show_dialog("url",document.getElementById("qmv_texturl_field"));
			qm_kille(event);
		}

		if (a[j].qmts)
		{
			qmv.ms_show_timer = a[j].qmts;
			a[j].qmts = 0;
		}
		

		a[j].onclick=function(event)
		{
			
			e = event || window.event;
			if (e.button==0)
				qm_oo(event,this);
				
		}

		a[j].onmouseover = function(event)
		{
			clearTimeout(qm_tt);qm_tt=null;qm_la=null;qm_kille(event);
		}

				
			
		if (a[j].attachEvent)
			a[j].detachEvent("onkeydown",qm_kb_press);
		else if (a[j].addEventListener)
			a[j].removeEventListener("keypress",qm_kb_press,true);
			

		qmv_evt_add_hover_item_in_visual_event(a[j]);


	}


	a = b.getElementsByTagName("DIV");
	for (var j=0;j<a.length;j++)
	{

		if (qmad.br_ie)
		{

			a[j].onselectstart = function(e)
			{
				e = e || event;

				qm_kille(e);
				return false;
			}

		}

		
		if (qmad.br_ie)
			a[j].ondragstart = function(){event.returnValue=false;event.cancelBubble = true;return false;}
		
		
		qmv_attach_container_events(a[j]);	
	
	

	}


	a = b.getElementsByTagName("SPAN");
	for (var j=0;j<a.length;j++)
	{


		if (a[j].className.indexOf("qmdivider")+1)
		{
			qmv_attach_divider_events(a[j]);

		}
		else if (a[j].className.indexOf("qmtitle")+1)
		{
			qmv_attach_title_events(a[j]);
		} 
		else if (a[j].className.indexOf("qmcbox")+1)
		{
			qmv_attach_cbox_events(a[j])
		} 
		else if (a[j].getAttribute("isibulletcss"))
		{
			
			qmv_add_bullet_css_events(a[j]);

		}
		else if (a[j].getAttribute("isibullet"))
		{
			qmv_add_bullet_events(a[j]);
		
		}	
		


	}
	
}

function qmv_attach_divider_events(a)
{

	if (qmad.br_ie)
	{

		a.onselectstart = function(e)
		{
			e = e || event;

			qm_kille(e);
			return false;
		}

	}

	a.oncontextmenu = function(e)
	{
				
		//qmv_show_context(e,"divider",qmv_lib_get_nextsibling_atag(this));
		qmv_show_context(e,"divider",this);

	}

	
	a.onclick = function(e)
	{
		e = e || event;
	
		if (e.button==0)
			qm_oo(e,this);

	}

	a.ondblclick = function(e)
	{
		e = e || event;

		var a = document.getElementById("qmvtree_item_dividers").idiv;
		qmv_display_setbox(a,null,null,true,2);

		qm_oo(e,this);
		qm_kille(e);
	}


}


function qmv_attach_title_events(a)
{

	if (qmad.br_ie)
	{

		a.onselectstart = function(e)
		{
			e = e || event;

			qm_kille(e);
			return false;
		}

	}


	a.oncontextmenu = function(e)
	{
				
		qmv_show_context(e,"title",this);

	}

	
	a.onclick = function(e)
	{
		e = e || event;
	
		if (e.button==0)	
			qm_oo(e,this);
	}

	a.ondblclick = function(e)
	{

		e = e || event;

		var a = document.getElementById("qmvtree_item_titles").idiv;
		qmv_display_setbox(a,null,null,true,2);
		
		qm_oo(e,this);
		qm_kille(e);
	}


}


function qmv_attach_cbox_events(a)
{

	if (qmad.br_ie)
	{

		a.onselectstart = function(e)
		{
			e = e || event;

			qm_kille(e);
			return false;
		}

	}


	a.oncontextmenu = function(e)
	{
				
		qmv_show_context(e,"cbox",this);

	}

	
	a.onclick = function(e)
	{
		e = e || event;
	
		if (e.button==0)	
			qm_oo(e,this);
	}

	a.ondblclick = function(e)
	{

		e = e || event;

		var a = document.getElementById("qmvtree_content_boxes").idiv;
		qmv_display_setbox(a,null,null,true,2);
		
		qm_oo(e,this);
		qm_kille(e);
	}


}


function qmv_attach_container_events(obj)
{

	if (obj.attachEvent)
	{
		obj.attachEvent("onmousedown",qmv_container_mouse_down);
		obj.attachEvent("onmousemove",qmv_container_mouse_move);
		obj.attachEvent("onmouseup",qmv_container_mouse_up);
	}
	else if (obj.addEventListener)
	{
		obj.addEventListener("mousedown",qmv_container_mouse_down,false);
		obj.addEventListener("mousemove",qmv_container_mouse_move,false);
		obj.addEventListener("mouseup",qmv_container_mouse_up,false);
	}


}


function qmv_container_mouse_down(e)
{

	e = e || event;
	//if (e.button!=0) return;

	var targ = e.srcElement || e.target;
	qmv.container_rtarg = targ;
	while(targ.tagName!="DIV") targ=targ[qp];



	if(qmv.addons.tree_menu["on"+qmv.id])	
	{
		qm_kille(e);
		return false;
	}

	
	qmv.container_mdown = true;
	qmv.container_prev_x = e.screenX;
	qmv.container_prev_y = e.screenY;
	qmv.orig_x = e.screenX;
	qmv.orig_y = e.screenY;
	qmv.container_obj = targ;

	var n;
	//if (n = targ.hasrcorner)
	//{
		//n.origleft = n.style.left;
		//n.origtop = n.style.top;
	//}
		
	if (n = targ.hasshadow)
	{
		n.origleft = n.style.left;
		n.origtop = n.style.top;
	}	
	
	targ.style.cursor = "move";

	qm_kille(e);
	return false;
}


function qmv_container_mouse_move(e,src)
{

	e = e || event;
	
	var targ;
	if (!qmv.container_moved)
	{
		var targ = e.srcElement || e.target;
		if (src)
			targ = src;
		else
			while(targ.tagName!="DIV") targ=targ[qp];
	}
	else
		targ = qmv.container_obj;


	if (qmv.container_mdown)
	{
		

		qmv_hide_pointer("qm"+qmv.id);

		var m = qmv.container_obj;
	
		var tx = qmv.orig_x-e.screenX;
		var ty = qmv.orig_y-e.screenY;
		if (qmv.container_moved || Math.abs(tx)>5 || Math.abs(ty)>5)
		{
	
		
			var xdif = qmv.container_prev_x-e.screenX;
			var ydif = qmv.container_prev_y-e.screenY;
	

			
			var ml =qm_lib_get_computed_style(m,"margin-left","marginLeft");
			if (ml) ml = parseInt(ml);
			if (!ml || isNaN(ml)) ml = 0;

			var mt = qm_lib_get_computed_style(m,"margin-top","marginTop");
			if (mt) mt = parseInt(mt);
			if (!mt || isNaN(mt)) mt = 0;

						
			m.style.marginLeft = (ml-xdif)+"px";
			m.style.marginTop = (mt-ydif)+"px";

			
			var n;
			//if (n = m.hasrcorner)
			//{	
				//n.style.top = (n.offsetTop-ydif)+"px";
				//n.style.left = (n.offsetLeft-xdif)+"px";
			//}

			if (n = targ.hasshadow)
			{
				n.style.top = (n.offsetTop-ydif)+"px";
				n.style.left = (n.offsetLeft-xdif)+"px";
			}

			qmv.container_prev_x = e.screenX;
			qmv.container_prev_y = e.screenY;

			qmv.container_moved = true;		
		
			
			if (qmad.br_ie)
				qmv.container_obj.setCapture(true);



			qm_kille(e);
			return false;


		}		
		

		
		
	}
}


function qmv_container_mouse_up(e)
{

	e = e || event;
	var targ = e.srcElement || e.target;
	while(targ.tagName!="DIV") targ=targ[qp];

	
	if (qmv.container_moved)
	{
		

		var m = qmv.container_obj;
			
	
		var ml = 0;
		if (m.style.marginLeft)
		{
			ml = parseInt(m.style.marginLeft);
			if (isNaN(ml)) ml = 0;
		}


		var mt = 0;
		if (m.style.marginTop)
		{
			mt = parseInt(m.style.marginTop);
			if (isNaN(mt)) mt = 0;
		}


		var mr = "0px";
		if (m.style.marginRight) mr = m.style.marginRight;

		var mb = "0px";
		if (m.style.marginBottom) mr = m.style.marginBottom;


		
		

		qmv.container_pos = mt+"px "+mr+" "+mb+" "+ml+"px";
		qmv_show_dialog("subposition")


		if (qmad.br_ie)
			qmv.container_obj.releaseCapture(true);


		qmv.container_rtarg = null;

	}



	qmv.container_moved = false;
	qmv.container_mdown = false;
	
	
	targ.style.cursor = "";

}


function qmv_evt_add_hover_item_in_visual_event(a)
{

	
	if (window.detachEvent)
		a.detachEvent("onmouseover",qmv_image_hover);
	else if (window.removeListener)
		a.removeEventListener("mouseover",qmv_image_hover,true);

	
	if (window.attachEvent)
		a.attachEvent("onmouseover",qmv_image_hover);
	else if (window.addEventListener)
		a.addEventListener("mouseover",qmv_image_hover,true);


}

function qmv_evt_hover_item_in_visual(e)
{

	e = e || window.event;

	var targ = e.srcElement || e.target;
	while (targ && targ.tagName!="A")
		targ = targ[qp];
	
	
	qm_image_switch(targ);

}


function qmvi_color_recent_remove(a)
{

	for (var i=0;i<qmv.color_recent.length;i++)
	{
		if (qmv.color_recent[i].inp==a)
		{
			qmv.color_recent.splice(i,1);
			return;		
		}

	}



	

}

function qmvi_color_recent_add(a,update)
{

	if (!a.value) return;

	color = a.value.toLowerCase();
	if (color=="transparent")
	{
		if (update)
			qmvi_color_recent_remove(a)

		return;
	}

	for (var i=0;i<qmv.color_recent.length;i++)
	{
		if (qmv.color_recent[i].inp==a)
		{
			qmv.color_recent[i].value = color;
			return;		
		}
	}


	var tobj = new Object();
	tobj.value = color;
	tobj.inp = a;

	

	qmv.color_recent.push(tobj);

}


function qmvi_color_open_recent(a)
{

	
	if (!qmv.color_recent.length)
		return;

	var robj = document.getElementById("qmvi_color_recent");




	if (robj.style.visibility=="hidden")
	{
		
		var sw = (a.offsetWidth-2);
		robj.style.width = sw+"px";
		
		
		
		var tcolor = new Array();

		var ih = "";
		for (var i=0;i<qmv.color_recent.length;i++)
		{	

			var addm = "";
			if (i<qmv.color_recent.length-1)
				addm = "margin-bottom:1px;";

			var con=false;
			for (var j=0;j<tcolor.length;j++)
			{
				if (tcolor[j]==qmv.color_recent[i].value)
				{
					con = true;
					break;	
				}
			}			
			if (con) continue;
			
			ih += '<div rid='+i+' onclick="qmvi_color_set_recent(this)" style="background-color:'+qmv.color_recent[i].value+';height:25px;width:'+sw+'px;'+addm+'"></div>';
			tcolor.push(qmv.color_recent[i].value);

		}
		robj.innerHTML = ih;

		robj.style.visibility = "inherit";

		var io = document.getElementById("qmvi_color_indicator").getElementsByTagName("IMG")[0];
		if (io)
			io.src = qmv.base+"images/color_minus.gif";

		
	}
	else
		qmvi_color_recent_close();


}

function qmvi_color_recent_close()
{

	var robj = document.getElementById("qmvi_color_recent");
	robj.style.visibility = "hidden";

	var io = document.getElementById("qmvi_color_indicator").getElementsByTagName("IMG")[0];
	if (io)
		io.src = qmv.base+"images/color_plus.gif";


}


function qmvi_color_set_recent(a)
{

	var rid = a.getAttribute("rid");
	qmv_color_init_color(qmv.color_recent[rid].value);

	qmvi_color_recent_close();
}


function qmv_color_brightness_mousedown(e,a)
{

	e = e || event;

	
	qmv.color_vals.bright_down = true;	
	

	qmv_color_brightness_mouse_setxy(e,a)

	qm_kille(e);


}

function qmv_color_brightness_mousemove(e,a)
{

	if (!qmv.color_vals.bright_down)
		return;

	e = e || event;

	qmv_color_brightness_mouse_setxy(e,a)
	qmv_color_brightness_mouse_set(qmv.color_vals.ly,a);	
}

function qmv_color_brightness_mouse_setxy(e,a)
{

	var y;

	if (!isNaN(e.layerY))
		y = e.layerY;
	else if (!isNaN(e.y))
		y = e.y;

	if (!qmad.br_ie)
		y = y-1;
	
	if (y<0) y=0;
	if (y>186) y=186;
	
	qmv.color_vals.ly = y;
}


function qmv_color_brightness_mouse_set(y,a)
{
		
	
	var b = (186-y)/(a.offsetHeight-1);
		
	qmv_color_parse_split("hsb:"+qmv.color_vals.h+","+qmv.color_vals.s+","+b);

	
	qmv_color_set_fields();

	qmv.color_vals.z = y;
	qmv_color_position_arrows("brightbar");


}

function qmv_color_brightness_mouseup(e,a)
{
	e = e || event;

	if (qmv.color_vals.bright_down)
	{
		qmv_color_brightness_mouse_set(qmv.color_vals.ly,a);

		qmv.color_vals.bright_down = false;	

	}
}


function qmv_color_huesaturation_mousedown(e,a)
{
	e = e || event;

	qmv.color_vals.crosshair.style.visibility = "hidden";
	qmv.color_vals.hs_down = true;	

	qmv_color_huesaturation_mouse_setxy(e,a);

	qm_kille(e);
}

function qmv_color_huesaturation_mousemove(e,a)
{



	if (!qmv.color_vals.hs_down)
		return;

	e = e || event;

	
	qmv_color_huesaturation_mouse_setxy(e,a)
	qmv_color_huesaturation_mouse_set(qmv.color_vals.lx,qmv.color_vals.ly,a);

	
	
}

function qmv_color_huesaturation_mouse_setxy(e,a)
{

	var x,y;
	
	if (!isNaN(e.layerX))
	{
		x = e.layerX;
		y = e.layerY;
	}
	else if (!isNaN(e.x))
	{
		x = e.x;
		y = e.y;
	}
	
	if (!qmad.br_ie)
	{
		x = x-1;
		y = y-1;
	}

	if (x<0) x=0;
	if (x>174) x=174;
	if (y<0) y=0;
	if (y>186) y=186;

	qmv.color_vals.lx = x;
	qmv.color_vals.ly = y;



}

function qmv_color_huesaturation_mouse_set(x,y,a)
{

	


	var h = x/(a.offsetWidth-1);
	var s = (186-y)/(a.offsetHeight-1);
	
	qmv_color_parse_split("hsb:"+h+","+s+","+qmv.color_vals.b);
	qmv_color_set_fields();

	qmv.color_vals.x = x;
	qmv.color_vals.y = y;
	qmv_color_position_arrows("arrows");

	
	

}



function qmv_color_huesaturation_mouseup(e,a)
{
	e = e || event;

	if (qmv.color_vals.hs_down)
	{

		qmv_color_huesaturation_mouse_set(qmv.color_vals.lx,qmv.color_vals.ly,a);
		qmv_color_position_arrows("crosshair");

		qmv.color_vals.crosshair.style.visibility = "inherit";
		qmv.color_vals.hs_down = false;	
	}

	
}



function qmv_color_position_arrows(type,all)
{

	if (type=="arrows" || all)	
	{
		qmv.color_vals.hs_arrow_down.style.left = qmv.color_vals.x+"px";
		qmv.color_vals.hs_arrow_right.style.top = qmv.color_vals.y+"px";

		var dd = qmv.color_vals.brightbar_dd
		for (var i=0;i<dd.length;i++)
		{
			dd[i].style.backgroundColor = "rgb("+qmv.color_vals.bbvals[16-i][0]+","+qmv.color_vals.bbvals[16-i][1]+","+qmv.color_vals.bbvals[16-i][2]+")";

		}
		
	}
	
	if (type=="brightbar" || all)
	{
		qmv.color_vals.b_arrow_right.style.top = qmv.color_vals.z+"px";

	}

	if (type=="crosshair" || all)	
	{
		qmv.color_vals.crosshair.style.top = qmv.color_vals.y+"px";
		qmv.color_vals.crosshair.style.left = qmv.color_vals.x+"px";
	}


	qmv.color_vals.indicator.style.backgroundColor = "#"+qmv.color_vals.hr+qmv.color_vals.hg+qmv.color_vals.hb;
		

}

function qmv_color_init(value)
{



	qmv.color_vals = new Object();


	var tval = value.toLowerCase();	
	if (!value || tval.indexOf("transparent")+1)
		value = "#b3c2b9";

	if (tval.indexOf("#")==-1 && tval.indexOf("rgb")==-1)
	{
		var tset = document.createElement("BODY");
		tset.bgColor = value;
		value = tset.bgColor;
	}

	qmv.color_vals.hs_arrow_right = document.getElementById("qmvi_color_hs_right");
	qmv.color_vals.hs_arrow_down = document.getElementById("qmvi_color_hs_down");
	qmv.color_vals.b_arrow_right = document.getElementById("qmvi_color_bright_right");
	qmv.color_vals.indicator = document.getElementById("qmvi_color_indicator");
	qmv.color_vals.crosshair = document.getElementById("qmvi_color_hs_crosshair");
	qmv.color_vals.brightbar = document.getElementById("qmvi_color_bright_bar");
	qmv.color_vals.brightbar_dd = qmv.color_vals.brightbar.getElementsByTagName("DIV");

	qmv.color_vals.robj = document.getElementById("qmv_cdialog_r");
	qmv.color_vals.gobj = document.getElementById("qmv_cdialog_g");
	qmv.color_vals.bobj = document.getElementById("qmv_cdialog_b");
	qmv.color_vals.t_robj = document.getElementById("qmvi_cdialog_rtext");
	qmv.color_vals.t_gobj = document.getElementById("qmvi_cdialog_gtext");
	qmv.color_vals.t_bobj = document.getElementById("qmvi_cdialog_btext");


	var cform = document.getElementById("qmvi_color_switches");

	qmv.color_vals.cform = cform;


	if (qmv.color_dispaly_type=="HEX")
		cform.qmvi_color_switch[0].checked = true;
	else if (qmv.color_dispaly_type=="RGB")
		cform.qmvi_color_switch[1].checked = true;
	else if (qmv.color_dispaly_type=="HSB")
		cform.qmvi_color_switch[2].checked = true;

	var o_hex = document.getElementById("qmvi_color_apply_type_hex");
	var o_rgb = document.getElementById("qmvi_color_apply_type_rgb");

	if (qmv.color_apply_type=="HEX")
		o_hex.checked = true;
	else
		o_rgb.checked = true;

	qmv_color_init_color(value);
	
}

function qmv_color_init_color(value)
{

	
	qmv_color_parse_split(value);
	qmv_color_set_fields();

	qmv.color_vals.x = parseInt(qmv.color_vals.h*174);
	qmv.color_vals.y = 186-parseInt(qmv.color_vals.s*186);
	qmv.color_vals.z = 186-parseInt(qmv.color_vals.b*186);

	qmv_color_position_arrows(null,true);



}


function qmv_color_set_fields()
{


	var cform = qmv.color_vals.cform;

	var type = "RGB";	
	if (cform.qmvi_color_switch[1].checked)
		type = "HEX";
	else if (cform.qmvi_color_switch[2].checked)		
		type = "HSB";

	

	if (type=="RGB")
	{
		qmv.color_vals.t_robj.innerHTML = "Red:"
		qmv.color_vals.t_gobj.innerHTML = "Green:"
		qmv.color_vals.t_bobj.innerHTML = "Blue:"

		qmv.color_vals.robj.value = qmv.color_vals.dr;
		qmv.color_vals.gobj.value = qmv.color_vals.dg;
		qmv.color_vals.bobj.value = qmv.color_vals.db;
	}
	else if (type=="HEX")
	{
		qmv.color_vals.t_robj.innerHTML = "Red:"
		qmv.color_vals.t_gobj.innerHTML = "Green:"
		qmv.color_vals.t_bobj.innerHTML = "Blue:"


		qmv.color_vals.robj.value = qmv.color_vals.hr;
		qmv.color_vals.gobj.value = qmv.color_vals.hg;
		qmv.color_vals.bobj.value = qmv.color_vals.hb;


	}
	else if (type=="HSB")
	{

		qmv.color_vals.t_robj.innerHTML = "Hue:"
		qmv.color_vals.t_gobj.innerHTML = "Sat:"
		qmv.color_vals.t_bobj.innerHTML = "Lum:"
	

		qmv.color_vals.robj.value = parseInt(qmv.color_vals.h*100);
		qmv.color_vals.gobj.value = parseInt(qmv.color_vals.s*100);
		qmv.color_vals.bobj.value = parseInt(qmv.color_vals.b*100);

	}


}



function qmv_color_parse_split(c,rgbonly)
{

	c = c.toLowerCase();
	var dr,dg,db;
	var hr,hg,hb;
	var h,s,b;

	if (c.indexOf("#")+1)
	{
		c = c.replace("#","");
		if (c.length==6)
		{
			hr = c.substring(0,2);
			hg = c.substring(2,4);
			hb = c.substring(4,6);

			eval("dr = 0x"+hr);
			eval("dg = 0x"+hg);
			eval("db = 0x"+hb);

		}
		else
		{
			hr = c.substring(0,1);
			hg = c.substring(1,2);
			hb = c.substring(2,3);

			hr = hr+hr;
			hg = hg+hg;
			hb = hb+hb;

			eval("dr = 0x"+hr);
			eval("dg = 0x"+hg);
			eval("db = 0x"+hb);

		}

		
		var t = qmv_color_rgb_to_hsb(dr,dg,db);
		h  = t[0];
		s  = t[1];
		b  = t[2];



	}
	else if (c.indexOf("rgb")+1)
	{
		c = c.replace("rgb(","");
		c = c.replace(")","");	
		c = c.replace(/\,/g," ");
		var nc = c.split(" ");
		
		c = "";
		for (i=0;i<nc.length;i++)
		{
			if (nc[i])
				c+=nc[i]+",";
		}


		c = c.split(",");
		
		dr = c[0];
		dg = c[1];
		db = c[2];

		hr = qmv_ten_to_hex(dr,16);
		hg = qmv_ten_to_hex(dg,16);
		hb = qmv_ten_to_hex(db,16);

		if (rgbonly)
			return "#"+hr+hg+hb;


		var t = qmv_color_rgb_to_hsb(dr,dg,db);
		h  = t[0];
		s  = t[1];
		b  = t[2];
	

	}
	else if (c.indexOf("hsb:")+1)
	{
		
		c = c.replace("hsb:","");
		c = c.split(",");

		h = parseFloat(c[0]);
		s = parseFloat(c[1]);
		b = parseFloat(c[2]);
		
		
		c = qmv_color_hsb_to_rgb(h,s,b);
		dr = c[0];
		dg = c[1];
		db = c[2];

		

		hr = qmv_ten_to_hex(dr,16);
		hg = qmv_ten_to_hex(dg,16);
		hb = qmv_ten_to_hex(db,16);
		

	}

	

	qmv.color_vals.dr = dr;
	qmv.color_vals.dg = dg;
	qmv.color_vals.db = db;

	qmv.color_vals.hr = hr;
	qmv.color_vals.hg = hg;
	qmv.color_vals.hb = hb;

	qmv.color_vals.h = h;
	qmv.color_vals.s = s;
	qmv.color_vals.b = b;

	
	qmv.color_vals.bbvals = new Array(17);
	for (var i=0;i<17;i++)
	{
		qmv.color_vals.bbvals[i] = qmv_color_hsb_to_rgb(h,s,i/17);
	}

	return qmv.color_vals;	

}


function qmv_color_hsb_to_rgb(H,S,L)
{

	var R,G,B,var_2,var_1;

	if ( S == 0 )
	{
		R = L * 255
		G = L * 255
		B = L * 255
	}
	else
	{
		if ( L < 0.5 )
			var_2 = L * ( 1 + S )
		else
			var_2 = ( L + S ) - ( S * L )

		var_1 = 2 * L - var_2

		R = 255 * qmv_color_rgb_hsb2( var_1, var_2, H + ( 1 / 3 ) ) 
		G = 255 * qmv_color_rgb_hsb2( var_1, var_2, H )
		B = 255 * qmv_color_rgb_hsb2( var_1, var_2, H - ( 1 / 3 ) )
	}

	

	return new Array(Math.round(R),Math.round(G),Math.round(B)); 

}


function qmv_color_rgb_hsb2(v1, v2, vH)
{
   if ( vH < 0 ) vH += 1
   if ( vH > 1 ) vH -= 1
   if ( ( 6 * vH ) < 1 ) return ( v1 + ( v2 - v1 ) * 6 * vH )
   if ( ( 2 * vH ) < 1 ) return ( v2 )
   if ( ( 3 * vH ) < 2 ) return ( v1 + ( v2 - v1 ) * ( ( 2 / 3 ) - vH ) * 6 )
   return ( v1 )
}




function qmv_color_rgb_to_hsb(R,G,B)
{

	var var_R,var_G,var_B,var_Max,var_Min,H,S,L,del_R,del_G,del_B,del_Max;

	var_R = ( R / 255 )
	var_G = ( G / 255 )
	var_B = ( B / 255 )


	

	var_Min = var_R;
	if (var_G<var_Min) var_Min = var_G;
	if (var_B<var_Min) var_Min = var_B;

	var_Max = var_R;
	if (var_G>var_Max) var_Max = var_G;
	if (var_B>var_Max) var_Max = var_B;


	

	del_Max = var_Max - var_Min;

	L = ( var_Max + var_Min ) / 2

	if ( del_Max == 0 )
	{
		H = 0
		S = 0
	}
	else
	{
		if ( L < 0.5 ) 
			S = del_Max / ( var_Max + var_Min );
		else
			S = del_Max / ( 2 - var_Max - var_Min )

		del_R = ( ( ( var_Max - var_R ) / 6 ) + ( del_Max / 2 ) ) / del_Max
		del_G = ( ( ( var_Max - var_G ) / 6 ) + ( del_Max / 2 ) ) / del_Max
		del_B = ( ( ( var_Max - var_B ) / 6 ) + ( del_Max / 2 ) ) / del_Max

		if ( var_R == var_Max )
			H = del_B - del_G
		else if ( var_G == var_Max )
			H = ( 1 / 3 ) + del_R - del_B
		else if ( var_B == var_Max )
			H = ( 2 / 3 ) + del_G - del_R

		if ( H < 0 ) H += 1
		if ( H > 1 ) H -= 1
	}


	return new Array(H,S,L);
}





function qmv_ten_to_hex(value,radix)
{
	var retval = '';
	var ConvArray = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F');
	var intnum;
	var tmpnum;
	var i = 0;

	intnum = parseInt(value,10);
	if (isNaN(intnum))
	{
		retval = 'NaN';
	}
	else
	{
		while (intnum > 0.9)
		{
			i++;
			tmpnum = intnum;
			retval = ConvArray[tmpnum % radix] + retval;  
			intnum = Math.floor(tmpnum / radix);
			if (i > 100)
			{
				retval = 'NaN';
				break;
			}
		}
	}

	if (retval.length<2)
		retval = 0+retval;

	if (!retval || retval=="0")
		retval = "00";
	
	return retval;
}

function qmv_color_field_onchange_enter(e,a)
{

	e = e || event;

	if (e.keyCode==13)
		qmv_color_field_onchange(e,a);


	qm_kille(e,true);

}


function qmv_color_field_onchange(e,a)
{

	

	var new_color = "";
	
	var cform = document.getElementById("qmvi_color_switches");

	var type = "RGB";	
	if (cform.qmvi_color_switch[1].checked)
		type = "HEX";
	else if (cform.qmvi_color_switch[2].checked)		
		type = "HSB";

	var robj = document.getElementById("qmv_cdialog_r");
	var gobj = document.getElementById("qmv_cdialog_g");
	var bobj = document.getElementById("qmv_cdialog_b");

	
	if (type=="RGB")
	{

		if (!a.value || isNaN(parseInt(a.value)) || parseInt(a.value)<0 || parseInt(a.value)>255)
		{
			qmv_show_dialog("alert",null,"The value you entered is not valid.<br><br>RGB values must be between 0 and 255.",450);
			a.value = a.pvalue;
			return;
		}	

		new_color += "rgb(";
		new_color += robj.value+",";
		new_color += gobj.value+",";
		new_color += bobj.value;
		new_color += ")";

	}
	else if (type=="HEX")
	{


		if (!a.value || eval("0x"+a.value)<0 || eval("0x"+a.value)>255)
		{
			qmv_show_dialog("alert",null,"The value you entered is not valid.<br><br>  Hexadecimal values must be between 0 and 255.",450);
			a.value = a.pvalue;
			return;
		}

		new_color += "#";
		new_color += robj.value;
		new_color += gobj.value;
		new_color += bobj.value;

	}
	else if (type=="HSB")
	{

		if (!a.value || isNaN(parseInt(a.value)) || parseInt(a.value)<0 || parseInt(a.value)>100)
		{
			qmv_show_dialog("alert",null,"The value you entered is not valid.<br><br>HSB values must be between 0 and 100.",450);
			a.value = a.pvalue;
			return;
		}

		new_color += "hsb:";
		new_color += (parseInt(robj.value)/100)+",";
		new_color += (parseInt(gobj.value)/100)+",";
		new_color += parseInt(bobj.value)/100;

	}


	qmv_color_init_color(new_color);


}


function qmv_url_init()
{


	var text = document.getElementById("qmvi_df_urlp_text");
	var url = document.getElementById("qmvi_df_urlp_url");
	var target = document.getElementById("qmvi_df_urlp_target");
	var title = document.getElementById("qmvi_df_urlp_title");

	text.value = qmv_set_texturl_field(qmv.cur_item,true);
	text.prev_value = text.value;

	url.value = qmv.cur_item.getAttribute("href",2);
	url.prev_value = url.value;

	target.value = qmv.cur_item.getAttribute("target",2);
	target.prev_value = target.value;

	title.value = qmv.cur_item.getAttribute("title",2);
	title.prev_value = title.value;


	var a = qmv.cur_item;
	if (a.className.indexOf("qmdivider")+1 || a.className.indexOf("qmtitle")+1 || a.className.indexOf("qmcbox")+1)
	{
		 qmv_texturl_enable_disable(url,true);
		 qmv_texturl_enable_disable(target,true);
	}
	else
	{
		 qmv_texturl_enable_disable(url,false);
		 qmv_texturl_enable_disable(target,false);
	}

	
	if (a.className.indexOf("qmdivider")+1)
		 qmv_texturl_enable_disable(text,true);
	else
		 qmv_texturl_enable_disable(text,false);


}



function qmv_multi_init(qmd)
{


	var multi = document.getElementById("qmvi_multi_value");
	multi.value = qmd.owner.value;



}

function qmv_edge_init(qmd)
{
	
	

	var top = document.getElementById("qmvi_df_edge_top");
	var bottom = document.getElementById("qmvi_df_edge_bottom");
	var left = document.getElementById("qmvi_df_edge_left");
	var right = document.getElementById("qmvi_df_edge_right");


	var vals = qmv_lib_parse_edge_values(qmd.owner.value,qmv.edge.dtype);


	top.value = vals.top;
	bottom.value = vals.bottom;
	left.value = vals.left;
	right.value = vals.right;

}


function qmv_evt_edge_spin(name,spin,dtype)
{

	var inp = document.getElementById("qmvi_df_edge_"+name);
	inp.value = qmv_spin_value(spin,dtype,inp.value);
	

}


function qmv_spin_value(spin,dtype,value)
{

	var num;
	
	if (!value)
	{
		if (dtype=="bool")
		{
			return true;


		}
		else
		{
			if (dtype=="unit")
				return "0px";
			else
				return 0;
		}

	}

	if (dtype=="bool")
	{

		if (value.toLowerCase()=="true")
			return false;
		else
			return true;

	}


	var unit = qmv_lib_get_units(value);
	if (dtype!="unit" && dtype!="float")
	{
		unit = "";
		num = parseInt(value);
	}
	else
	{
		num = parseFloat(value);
		if (!unit && dtype!="float") unit = "px";
	}

	if (isNaN(num))
		return 0;


	var isfloat = false;
	if (dtype=="float" || (unit && unit!="px" && unit!="mm" && unit!="%"))
		isfloat = true;


	

	if (isfloat)
	{
		
		if (spin==1)
			num = Math.round((num+.1)*10)/10
		else if (spin==2)
			num =  Math.round((num-.1)*10)/10
	}
	else
	{

		if (spin==1)
			num++;
		else if (spin==2)
			num--;


	}

	
	return num+unit;		


}





function qmv_lib_parse_edge_values(vals,dtype)
{
	
	var rvals = new Object();

	if (dtype=="bool")
	{
		rvals.top=true;
		rvals.right=true;
		rvals.bottom=true;
		rvals.left=true;
	}
	else
	{
		if (dtype=="unit")
		{
			rvals.top="0px";
			rvals.right="0px";
			rvals.bottom="0px";
			rvals.left="0px";
		}
		else		
		{
			rvals.top=0;
			rvals.right=0;
			rvals.bottom=0;
			rvals.left=0;
		}

	}

	if (!vals)
		return rvals;
	
	var svals;
	if (vals.indexOf(",")+1)
		svals = vals.split(",");
	else
		svals = vals.split(" ");

	var pvals = new Object();
	var punits = new Object();
	var len = 0;
	for (var i=0;i<svals.length;i++)
	{
		if (svals[i] || (typeof svals[i] == "number"))
		{
			len++;
			pvals[i] = svals[i];
			if (dtype=="bool")
				punits[i] = "";
			else
				punits[i] = qmv_lib_get_units(svals[i]);
		}	

	}
	pvals.length = len;
	
	
	if (pvals.length==1)
	{
		rvals.top = parseInt(pvals[0])+punits[0];
		rvals.right = parseInt(pvals[0])+punits[0];
		rvals.bottom = parseInt(pvals[0])+punits[0];
		rvals.left = parseInt(pvals[0])+punits[0];
			
	}
	else if (pvals.length==2)
	{
		rvals.left = parseInt(pvals[1])+punits[1];
		rvals.right = parseInt(pvals[1])+punits[1];
		rvals.top = parseInt(pvals[0])+punits[0];
		rvals.bottom = parseInt(pvals[0])+punits[0];
	
	}
	else if (pvals.length==3)
	{

		rvals.top = parseInt(pvals[0])+punits[0];
		rvals.right = parseInt(pvals[1])+punits[1];
		rvals.bottom = parseInt(pvals[2])+punits[2];
		rvals.left = parseInt(pvals[1])+punits[1];

	}
	else if (pvals.length>3)
	{
		if (dtype=="bool")
		{	
			rvals.top = pvals[0];
			rvals.right = pvals[1];
			rvals.bottom = pvals[2];
			rvals.left = pvals[3];
		}
		else
		{
			rvals.top = parseInt(pvals[0])+punits[0];
			rvals.right = parseInt(pvals[1])+punits[1];
			rvals.bottom = parseInt(pvals[2])+punits[2];
			rvals.left = parseInt(pvals[3])+punits[3];

		}
	
	}

	return rvals;

}



function qmv_publish_init(qmd)
{


	var p = qmv.publish;


	if (qmv.publish.page==1)
	{
		
		
		if (qmv.publish.css_type == "external")
			document.getElementById('qmvi_publish_css_external').checked = true;
		else
			document.getElementById('qmvi_publish_css_inpage').checked = true;

		if (qmv.publish.code_type == "external")
			document.getElementById('qmvi_publish_code_external').checked = true;
		else
			document.getElementById('qmvi_publish_code_inpage').checked = true;

		if (qmv.publish.structure_type == "external")
			document.getElementById('qmvi_publish_structure_external').checked = true;
		else
			document.getElementById('qmvi_publish_structure_inpage').checked = true;


		if (qmv.pure)
			document.getElementById('qmvi_publish_structure_type_pure').checked = true;
		else
			document.getElementById('qmvi_publish_structure_type_hybrid').checked = true;	

	}
	



}



function qmv_pubgen_css(is_external,is_scripted,csshtml,dev_template)
{

	


	var t = "\t";
	var rt = "\r\n";
	var wt = "";

	if (is_scripted)
	{
		rt = "";
		t = "";
	}
	

	if (!is_external)
	{


		wt += '<!--%%%%%%%%%%%% QuickMenu Styles [Keep in head for full validation!] %%%%%%%%%%%-->';
		wt += rt;
		wt += '<style type="text/css">';
		wt += rt;
		wt += rt;
		wt += rt;
	}

	
	wt += '/*!!!!!!!!!!! QuickMenu Core CSS [Do Not Modify!] !!!!!!!!!!!!!*/';
	

	wt += rt;
	wt += qmv_pubgen_get_core_css();
	wt += rt;
	wt += rt;
	wt += rt;

	if (!csshtml)
		wt += '/*!!!!!!!!!!! QuickMenu Styles [Please Modify!] !!!!!!!!!!!*/';
	else
		wt += '/*!!!!!!!!!!! QuickMenu Styles !!!!!!!!!!!*/';

	wt += rt;
	

	if (dev_template)
		wt = "";
	

	for (var i=0;i<10;i++)
	{
		if (!document.getElementById("qm"+i))
			continue;

		
		wt += rt;
		wt += rt;

		var rb = new Array();

		var ta = new Object;
		ta.desc = "(MAIN) Container";
		ta.rule = '#qm'+i;
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Items";
		ta.rule = '#qm'+i+" a";
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Hover State";
		ta.rule = '#qm'+i+' a:hover';
		ta.rule_show = '#qm'+i+' a:hover';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Hover State - (duplicated for pure CSS)";
		ta.rule = '#qm'+i+' a:hover';
		ta.rule_show = '#qm'+i+' li:hover>a';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Parent Items";
		ta.rule = '#qm'+i+' .qmparent';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Parent Hover State";
		ta.rule = '#qm'+i+' .qmparent:hover';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Active State";
		ta.rule = 'body #qm'+i+' .qmactive';
		ta.rule_show = 'body #qm'+i+' .qmactive, body #qm'+i+' .qmactive:hover';
		rb.push(ta);

		//var ta = new Object;
		//ta.desc = "(MAIN) Active Hover State";
		//ta.rule = 'body #qm'+i+' .qmactive:hover';
		//rb.push(ta);

		var ta = new Object;
		ta.desc = "(MAIN) Persistent State";
		ta.rule = 'body #qm'+i+' .qmpersistent';
		ta.rule_show = 'body #qm'+i+' .qmpersistent, body #qm'+i+' .qmpersistent:hover';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Container";
		ta.rule = '#qm'+i+" div";
		if (qmv.pure) ta.rule_show = '#qm'+i+" div,"+' #qm'+i+" ul"
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Items";
		ta.rule = '#qm'+i+" div a";
		if (qmv.pure) ta.rule_show = '#qm'+i+" div a,"+' #qm'+i+" ul a";
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Hover State";
		ta.rule = '#qm'+i+" div a:hover";
		if (qmv.pure) ta.rule_show = '#qm'+i+' div a:hover';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Hover State - (duplicated for pure CSS)";
		ta.rule = '#qm'+i+" div a:hover";
		if (qmv.pure) ta.rule_show = '#qm'+i+' ul li:hover>a';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Parent Items";
		ta.rule = '#qm'+i+' div .qmparent';
		if (qmv.pure) ta.rule_show = '#qm'+i+' div .qmparent, #qm'+i+' ul .qmparent';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Parent Hover State";
		ta.rule = '#qm'+i+' div .qmparent:hover';
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(SUB) Active State";
		ta.rule = 'body #qm'+i+' div .qmactive';
		ta.rule_show = 'body #qm'+i+' div .qmactive, body #qm'+i+' div .qmactive:hover';
		rb.push(ta);

		//var ta = new Object;
		//ta.desc = "(SUB) Active Hover State";
		//ta.rule = 'body #qm'+i+' div .qmactive:hover';
		//rb.push(ta);


		var ta = new Object;
		ta.desc = "(SUB) Persistent State";
		ta.rule = 'body #qm'+i+' div .qmpersistent';
		ta.rule_show = 'body #qm'+i+' div .qmpersistent, body #qm'+i+' div .qmpersistent:hover';
		rb.push(ta);

		
		var ta = new Object;
		ta.desc = "Individual Titles";
		ta.rule = '#qm'+i+' .qmtitle';
		ta.spec_tree_obj = document.getElementById("qmvtree_item_titles").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Individual Horizontal Dividers";
		ta.rule = '#qm'+i+' .qmdividerx';
		ta.spec_tree_obj = document.getElementById("qmvtree_item_dividers").getElementsByTagName("DIV");
		rb.push(ta);
		
		var ta = new Object;
		ta.desc = "Individual Vertical Dividers";
		ta.rule = '#qm'+i+' .qmdividery';
		ta.spec_tree_obj = document.getElementById("qmvtree_item_dividers").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Content Box";
		ta.rule = '#qm'+i+' .qmcbox';
		ta.spec_tree_obj = document.getElementById("qmvtree_content_boxes").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Content Box Links";
		ta.rule = '#qm'+i+' .qmcbox a';
		ta.spec_tree_obj = document.getElementById("qmvtree_content_boxes").getElementsByTagName("DIV");
		rb.push(ta);


		var ta = new Object;
		ta.desc = "Content Box Links [hover]";
		ta.rule = '#qm'+i+' .qmcbox a:hover';
		ta.spec_tree_obj = document.getElementById("qmvtree_content_boxes").getElementsByTagName("DIV");
		rb.push(ta);


		var ta = new Object;
		ta.desc = "Item Stripes";
		ta.rule = '#qm'+i+' .qmstripe';
		ta.spec_tree_obj = document.getElementById("qmvtree_item_stripes").getElementsByTagName("DIV");
		rb.push(ta);


		var ta = new Object;
		ta.desc = "Item Stripes - hover";
		ta.rule = '#qm'+i+' .qmstripe:hover';
		ta.spec_tree_obj = document.getElementById("qmvtree_item_stripes").getElementsByTagName("DIV");
		rb.push(ta);


		var ta = new Object;
		ta.desc = "Box Animation Styles";
		ta.rule = '#qm'+i+' .qmbox';
		ta.spec_tree_obj = document.getElementById("qmvtree_box").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(main) Rounded Items";
		ta.rule = '#qm'+i+' .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(main) Rounded Items Content";
		ta.rule = '#qm'+i+' .qmritemcontent';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(main) Rounded Items Hover";
		ta.rule = '#qm'+i+' a:hover .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(main) Rounded Items Active";
		ta.rule = 'body #qm'+i+' .qmactive .qmritem span';
		ta.rule_show = 'body #qm'+i+' .qmactive .qmritem span, body #qm'+i+' .qmactive:hover .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(main) Rounded Items Persistent";
		ta.rule = 'body #qm'+i+' .qmpersistent .qmritem span';
		ta.rule_show = 'body #qm'+i+' .qmpersistent .qmritem span, body #qm'+i+' .qmpersistent:hover .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);	

		var ta = new Object;
		ta.desc = "(sub) Rounded Items";
		ta.rule = '#qm'+i+' div .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);
		
		var ta = new Object;
		ta.desc = "(sub) Rounded Items Content";
		ta.rule = '#qm'+i+' div .qmritemcontent';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(sub) Rounded Items Hover";
		ta.rule = '#qm'+i+' div a:hover .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "(sub) Rounded Items Active";
		ta.rule = 'body #qm'+i+' div .qmactive .qmritem span';
		ta.rule_show = 'body #qm'+i+' div .qmactive .qmritem span, body #qm'+i+' div .qmactive:hover .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);
		
		var ta = new Object;
		ta.desc = "(sub) Rounded Items Persistent";
		ta.rule = 'body #qm'+i+' div .qmpersistent .qmritem span';
		ta.rule_show = 'body #qm'+i+' div .qmpersistent .qmritem span, body #qm'+i+' div .qmpersistent:hover .qmritem span';
		ta.spec_tree_obj = document.getElementById("qmvtree_ritem").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Main Hover Fill Items [Static]";
		ta.rule = '#qm'+i+' .qmhoverfill';
		ta.spec_tree_obj = document.getElementById("qmvtree_hoverfill").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Main Hover Fill Items [Parent]";
		ta.rule = '#qm'+i+' .qmhoverfill.qmhparent';
		ta.spec_tree_obj = document.getElementById("qmvtree_hoverfill").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Sub Hover Fill Items [Static]";
		ta.rule = '#qm'+i+' div .qmhoverfill';
		ta.spec_tree_obj = document.getElementById("qmvtree_hoverfill").getElementsByTagName("DIV");
		rb.push(ta);

		var ta = new Object;
		ta.desc = "Sub Hover Fill Items [Parent]";
		ta.rule = '#qm'+i+' div .qmhoverfill.qmhparent';
		ta.spec_tree_obj = document.getElementById("qmvtree_hoverfill").getElementsByTagName("DIV");
		rb.push(ta);



		
		var cdivs = document.getElementById("qmvtree_custom_rules").getElementsByTagName("DIV");
		for (var j=0;j<cdivs.length;j++)
		{

			if (cdivs[j].ismaster)
			{
				
				var ta = new Object;
				ta.desc = "Custom Rule";
			
				var crr = cdivs[j].getAttribute("rule");
				crr = crr.replace("qm[i]","qm"+qmv.id);
				crr = crr.replace("qm[i]","qm"+qmv.id);

				var crro = cdivs[j].getAttribute("orule");
				crro = crro.replace("qm[i]","qm"+qmv.id);
				crro = crro.replace("qm[i]","qm"+qmv.id);
				
				ta.rule = crr;
				ta.rule_show = crro;
				ta.spec_tree_obj = cdivs;
				rb.push(ta);

			}

		}


		if (!dev_template)
		{
			wt += t+'/* QuickMenu '+i+' */';
			wt += rt;
			wt += rt;
		}

		for (var j=0;j<rb.length;j++)
		{

			var wrules;
			if (dev_template)
			{
				wrules = qmv_genpub_css_rule(rb[j].rule,i,"","",rb[j].spec_tree_obj);
				
				if (rb[j].rule_show)
					var sr = rb[j].rule_show.replace(/qm0/g,'qm[i]');
				else
					var sr = rb[j].rule.replace(/qm0/g,'qm[i]');

				if (wrules)
					wt += '\t\t\tws.styles.s.push("'+sr+'|'+wrules+'");'+rt;
				
				continue;

			}
			else
			{
			
				wrules = qmv_genpub_css_rule(rb[j].rule,i,t+t,rt,rb[j].spec_tree_obj);
						
				if (wrules)
				{
					if (!is_scripted)
						wt += t+'/*"""""""" '+rb[j].desc+'""""""""*/';

					wt += t+rt;
		
					if (rb[j].rule_show)
						wt += t+rb[j].rule_show;
					else
						wt += t+rb[j].rule;

					wt += t+rt;
					wt += t+'{'; 
					wt += t+rt;
					wt += wrules;
					wt += t+'}'; 

					wt += rt;
					wt += rt;
					wt += rt;
				}
			}
		}

		
		
	}


	if (!is_external && !dev_template)
	{
		
		wt += '</style>';
		
	}


	return wt;

}






function qmv_genpub_css_rule(rule,id,tabs,rt,spec_tree_obj)
{
	


	var wt = "";

	
	if (!rt) tabs = "";
	
	var rules = qmv.style_rules;
	var css_rule = null;
	for (var i=0;i<rules.length;i++)
	{

		var st = rules[i].selectorText.toLowerCase();
		st = st.split(",")[0];
	
		if (st.toLowerCase()==rule)
			css_rule = rules[i];
		
	}

	if (!css_rule)
		return wt;

	var a;
	if (!spec_tree_obj)
		a = document.getElementById("qmvtree_css_styles").getElementsByTagName("DIV");
	else
		a = spec_tree_obj;

	for (var i=0;i<a.length;i++)
	{

		var ar = a[i].getAttribute("rule");
		if (ar) 
		{
			ar = ar.replace("[i]",id);

			if (ar==rule)
			{


				var aa = a[i].childNodes;
				for (var j=0;j<aa.length;j++)
				{
					if (aa[j].tagName=="A")
					{
					
						var inp = aa[j].getElementsByTagName("INPUT")[0];
						
						if (inp)
						{
							var cn = inp.getAttribute("cname");
							if (css_rule.style[cn])
							{
								if (qmad.br_ie)
									wt += tabs+inp.getAttribute("sname")+":"+css_rule.style[cn]+";"+rt;
								else
									wt += tabs+inp.getAttribute("sname")+":"+qmv_load_css_styles_firefox_fix(css_rule.style[cn],inp.getAttribute("dtype"))+";"+rt;

							}
						}
					
					}


				}


			}	


		}


	}

	return wt;

}


function qmv_pubgen_noscript_tag()
{

	var wt = "";
	wt += '<!-- QuickMenu Noscript Support [Keep in head for full validation!] -->\r\n';
	wt += '<noscript><style type="text/css">.qmmc {width:200px !important;height:200px !important;overflow:scroll;}.qmmc div {position:relative !important;visibility:visible !important;}.qmmc a {float:none !important;white-space:normal !important;}</style></noscript>';

	return wt;

}

function qmv_pubgen_javascript(is_external,is_preview)
{

	var t = "\t";
	var rt = "\r\n";
	var wt = "";


	if (!is_external)
		wt += "<!-- Core QuickMenu Code -->";
	else
		wt += "//Core QuickMenu Code";

	wt += rt;

	var cc;
	if (!is_preview)
		cc = qmv_get_source_code(true);
	else
		cc = qmv_get_source_code(null,true);
	

	if (!is_external)
		cc = '<scr'+'ipt type="text/javascript">/* <![CDATA[ */'+cc+'/* ]]> */</scr'+'ipt>'; 



	wt += cc;

	wt += rt;
	wt += rt;

	var ac = "";
	if (is_external)
	{
		
		ac += '//Add-On Core Code (Remove when not using any add-on\'s)'	
		ac += rt;
		ac += 'document.write(\''+qmv_pubget_get_core_addon_css()+'\');';
	}
	else
	{

		ac += '<!-- Add-On Core Code (Remove when not using any add-on\'s) -->'
		ac += rt;
		ac += qmv_pubget_get_core_addon_css();
	}

	var ad = "";
	qmv.t = new Object();	


	var go_special_add = false;

	for (var i=0;i<10;i++)
	{
		//add the special addons to the list
		if (qmv.addons.image["on"+i])
		{
			qmv.t.image = true;
			go_special_add = true;
		}

		//if (qmv.addons.sopen["on"+i])
		//{
			//qmv.t.sopen = true;
			//go_special_add = true;
		//}

		
		
		
		if (!document.getElementById("qm"+i))
			continue;

		
		var st = "\t";
		if (!is_external) st = "\t\t";
		var ads = qmv_pubgen_javascript_addons(i,st);
		

		if (ads)
		{

			var y = "";
			if (!is_external)
			{
				y += '\t<!-- Add-On Settings -->';
				y += rt;
				y += '\t<scr'+'ipt type="text/JavaScript">';
				y += rt;
				y += rt;
			}

			
			y += st+'/*******  Menu '+i+' Add-On Settings *******/'
			y += rt;
			y += st+'var a = qmad.qm'+i+' = new Object();';
			y += rt;
			y += rt;
			ad += y+ads;

			if (!is_external)
			{
				ad += '\t</scr'+'ipt>';
				ad += rt;
				ad += rt;
			}
			else
				ad += rt;
		}

	}	


	if (ad || go_special_add) wt = rt+rt+ac+rt+rt+ad+wt;
	

	var j;
	for (j in qmv.addons)
	{
		if (qmv.t[j])
		{
		
			if (is_external)
			{
				wt += "//Add-On Code: "+qmv.addons[j].desc;
				wt += rt;
				wt += qmv.addons[j].code;
				wt += rt;
				wt += rt;
			}
			else
			{
				wt += "<!-- Add-On Code: "+qmv.addons[j].desc+" -->";
				wt += rt;
				wt += '<scr'+'ipt type="text/javascript">/* <![CDATA[ */'+qmv.addons[j].code+'/* ]]> */</scr'+'ipt>';
				wt += rt;
				wt += rt;
			}

		}
	}

	
	return wt;
}


function qmv_pubgen_javascript_addons(id,t)
{

	if (!t) t = "\t";

	var wt = "";
	var track = new Object();



	
	var q;
	if (q = qmad["qm"+id])
	{
	

		var a = document.getElementById("qmvtree_addon_settings").getElementsByTagName("DIV");
		for (var i=0;i<a.length;i++)
		{

			var tr = a[i].getAttribute("rule");
			if (!tr) continue;

			
			if (a[i].idiv)
			{
				var inp = a[i].idiv.getElementsByTagName("INPUT")[0];
				var atype = a[i].getAttribute("addontype");

				if (!atype) continue;
				

				if (qmv.addons[atype]["on"+id]==null && qmv.addons[atype]["on"+id]==undefined || qmv.addons[atype]["on"+id])
				{
					
					var ot = qmv.addons[atype].ontest.split("|");
					var ogo = false;
					for (var e=0;e<ot.length;e++)
					{	
					
						if (q[ot[e]])
							ogo = true;			
					}

					
					if (ogo)
					{

					
						if (track[atype+id])
							continue;

	
						wt += t+'// '+qmv.addons[atype].desc+" Add On";
						wt += '\r\n';

						track[atype+id] = true;	
						qmv.t[atype] = true;


						inp = a[i].getElementsByTagName("INPUT");
						for (var j=0;j<inp.length;j++)
						{
						
							var cname;
							if (cname = inp[j].getAttribute("cname"))
							{
							
								var val = qmad["qm"+id][cname];
								if (val!=null && val!=undefined && val!='')
								{

									var dtype = inp[j].getAttribute("dtype");
									if (dtype.indexOf("array")+1)
									{
										wt += t+'a.'+cname+" = new Array("+val+");";

									}
									else
									{
										var lval = (val+"").toLowerCase();
										if (lval=="true" || lval=="false")
											val = lval;
										else if (isNaN(parseInt(val)))
											val = '"'+val+'"';

										wt += t+'a.'+cname+" = "+val+";";
									}
				
									wt += "\r\n";

								}
							}

						}

	
						wt += '\r\n';


					}
					

				}

						
			}

		}
	}


	return wt;

	

}


function qmv_pubgen_structure(is_external,all,breaks,title_it,spec_id,css_only,is_preview)
{


	var wt = "";
	qmv.wt = "";


	if (!all)
	{

		if (!spec_id)
		{
		
			id = qmv.publish.smenus[qmv.publish.smenus_pos];
		}
		else
			id = parseInt(spec_id);

		
		qmv_pubgen_structure_build(is_external,document.getElementById("qm"+id),id,"\t",true,null,css_only)
		
			
	}
	else
	{
		
		var hit = false;
		for (var i=0;i<10;i++)
		{
			var a;
			if (!(a = document.getElementById("qm"+i)))
				continue;

			if (hit)
				qmv.wt += breaks;


			qmv_pubgen_structure_build(is_external,a,i,"\t",true,title_it,css_only,is_preview)


			hit = true;
		}
	}


	if (is_external)
	{
		qmv.wt = qmv.wt.replace(/\'/g,"\\'");
		wt += "document.write('"+qmv.wt+"');";

	}
	else
		wt += qmv.wt;



	return wt;

}


function qmv_pubgen_structure_build(is_external,a,id,tab,is_root,title_it,css_only,is_preview)
{

	var rt = "\r\n";
	if (is_external)
	{
		rt = "";
		tab = "";
	}

	var istyles = "";
	if (a.style.cssText)
		istyles = qmv_pubgen_structure_build_inline_styles("inline-parent",a);


	var l1 = "";
	var l2 = "";
	var lsp1 = ""
	var d1 = "<div";
	var d2 = "div>";
	if (qmv.pure)
	{
		l1 = "<li>";
		l2 = "</li>";
		d1 = "<ul";
		d2 = "ul>";
		//lsp1 = '<li class="qmspanli">';
		lsp1 = '<li>';	
	}

	if (is_root)
	{	

		if (qmv["pub_content_before"+id])
		{
			if (title_it)
			{
				qmv.wt += '<!-- Starting Page Content [menu nests within] -->';
				qmv.wt += rt;
				
			}

			qmv.wt += qmv["pub_content_before"+id];
			qmv.wt += rt;

			if (title_it)
				qmv.wt += rt;
			
		}

		if (title_it)
		{
			
			qmv.wt += '<!-- QuickMenu Structure [Menu '+id+'] -->';
			qmv.wt += rt;
			
		}

		//var div_classnames = "";
		//div_classnames += qmv_pubgen_structure_build_classname("div",a,true);

		qmv.wt += d1+' id="qm'+id+'" class="qmmc"'+istyles+'>';
		qmv.wt += rt;
		qmv.wt += rt;
	}
	else
	{
		var div_classnames = "";
		div_classnames += qmv_pubgen_structure_build_classname("div",a);		

		var dsp = "";
		if (div_classnames) dsp=" ";

		qmv.wt += rt;
		qmv.wt += tab+d1+dsp+div_classnames+istyles+'>';
		qmv.wt += rt;

	}
	


	var ch = a.childNodes;
	for (var i=0;i<ch.length;i++)
	{
	
		if (ch[i].tagName=="A")
		{

			var href = ch[i].getAttribute("href",2);
			var targ = ch[i].getAttribute("target",2);
			var title = ch[i].getAttribute("title",2);

			if (!href) 
				href = 'href="JavaScript:void(0);"';
			else
				href = 'href="'+href+'"';
					
			if (!targ)
				targ="";
			else
				targ = ' target="'+targ+'"';

			if (!title)
				title="";
			else
				title = ' title="'+title+'"';

			var istyles = "";
			if (ch[i].style.cssText)
				istyles = qmv_pubgen_structure_build_inline_styles("inline",ch[i]);


			var atag_classnames = "";
			atag_classnames = qmv_pubgen_structure_build_classname("atag",ch[i]);

			
			

			qmv.wt += tab+l1+'<a '+atag_classnames+href+targ+title+istyles+'>'+qmv_set_texturl_field(ch[i],false,true)+'</a>';
			if (!ch[i].cdiv) qmv.wt+=l2;

			qmv.wt += rt;
		}
		else if (ch[i].tagName=="SPAN")
		{

			var span_classnames = "";
			span_classnames = qmv_pubgen_structure_build_classname("span",ch[i]);


			if (ch[i].className.indexOf("qmtitle")+1)
			{

				var istyles = "";
				if (ch[i].style.cssText)
					istyles = qmv_pubgen_structure_build_inline_styles("inline",ch[i]);

				qmv.wt += tab+lsp1+'<span '+span_classnames+istyles+'>'+ch[i].innerHTML+'</span>'+l2;
				qmv.wt += rt;

			}
			else if (ch[i].className.indexOf("qmdivider")+1)
			{
				var istyles = "";
				if (ch[i].style.cssText)
					istyles = qmv_pubgen_structure_build_inline_styles("inline",ch[i]);

									

				qmv.wt += tab+lsp1+'<span '+span_classnames+istyles+'>'+ch[i].innerHTML+'</span>'+l2;
				qmv.wt += rt;
			}
			else if (ch[i].className.indexOf("qmcbox")+1)
			{
				var istyles = "";
				if (ch[i].style.cssText)
					istyles = qmv_pubgen_structure_build_inline_styles("inline",ch[i]);

				
				var cinh = ch[i].innerHTML;
				cinh = cinh.replace(/\n/g,"");
				cinh = cinh.replace(/\r/g,"");
				cinh = cinh.replace(/\t/g,"");

				qmv.wt += tab+lsp1+'<span '+span_classnames+istyles+'>'+cinh+'</span>'+l2;
				qmv.wt += rt;
			}

		}


		if (ch[i].tagName=="DIV" && ch[i].idiv)
			qmv_pubgen_structure_build(is_external,ch[i],id,tab+"\t",null,null)


	}

	if (is_root)
	{
		if (qmv.pure)
			qmv.wt += '<li class="qmclear">&nbsp;</li></'+d2;
		else
			qmv.wt += '<span class="qmclear">&nbsp;</span></'+d2;


		if (qmv["pub_content_after"+id])
		{
			qmv.wt += rt;
			
			if (title_it)
			{
				
				qmv.wt += rt;
				qmv.wt += '<!-- Ending Page Content [menu nests within] -->';
				qmv.wt += rt;
			}

			qmv.wt += qmv["pub_content_after"+id];
			qmv.wt += rt;
		}
	}
	else
		qmv.wt += tab+'</'+d2+l2;

	

	if (is_root)
	{
		if (!css_only)
		{
			qmv.wt += rt;
			qmv.wt += qmv_pubgen_structure_build_menu_settings(id,a,is_external);
		}
	}
	else
	{
		qmv.wt += rt;
		qmv.wt += rt;

	}
}


function qmv_pubgen_structure_build_classname(type,a,is_root)
{
	var wt = "";
	var cn;
	
	if (cn = a.className)
	{
		
		var s1 = false;
		var sn = false;	

		if (type=="atag")
		{
					

			if (cn.indexOf("qm-startopen")+1)
			{
				s1 = true;
				wt += "qm-startopen";

			}

			if (qmv.pure && a.cdiv)
			{
				sn = true;
				wt += " qmparent";
			}

			if (cn.indexOf("qmstripe")+1)
			{
				sn = true;
				wt += " qmstripe";
			}

			var t;
			if (t = qmv_pubgen_structure_build_classname_customs(a))
			{
				sn = true;
				wt += t;
			}

			

			if (!s1 && sn)
				wt = wt.substring(1);

		}
		else if (type=="span")
		{

			if (cn.indexOf("qmtitle")+1)
			{
				s1 = true;
				wt += "qmtitle";
			}

			if (cn.indexOf("qmstripe")+1)
			{
				sn = true;
				wt += " qmstripe";
			}

			if (cn.indexOf("qmcbox")+1)
			{
				sn = true;
				wt += " qmcbox";
			}


			if (cn.indexOf("qmdivider")+1)
			{
				sn = true;

				if (cn.indexOf("qmdividerx")+1)
					wt += " qmdivider qmdividerx";
				else if (cn.indexOf("qmdividery")+1)
					wt += " qmdivider qmdividery";
				else
					wt += " qmdivider qmdividerx";

			}


			var t;
			if (t = qmv_pubgen_structure_build_classname_customs(a))
			{
				sn = true;
				wt += t;
			}


			if (!s1 && sn)
				wt = wt.substring(1);


		}
		else if (type=="div")
		{
			
			if ((cn.indexOf("qmmc")+1) && (is_root))
			{
				s1 = true;
				wt += "qmmc";
			}
			
			
			var t;
			if (t = qmv_pubgen_structure_build_classname_customs(a))
			{
				sn = true;
				wt += t;
			}


			if (!s1 && sn)
				wt = wt.substring(1);


		}

		
	}


	if (wt)
		wt = 'class="'+wt+'" ';

	return wt;

}


function qmv_pubgen_structure_build_classname_customs(a)
{

	var w = a.className;
	var p = 0;
	var rt = "";

	

	while ((p = w.indexOf("qmc_",p))+1)
	{
		
		var p2 = w.indexOf(" ",p);
		if (p2>p)	
		{
			rt += " "+w.substring(p,p2);
		}
		else
		{
			rt += " "+w.substring(p,w.length);
			break;
		}

		p = p2;

		
		
	}

	
	return rt;

}


function qmv_pubgen_structure_build_inline_styles(rule,obj)
{


	var wt = "";

	var a = document.getElementById("qmvtree_inline_styles").getElementsByTagName("DIV");
	for (var i=0;i<a.length;i++)
	{
		
		var tr = a[i].getAttribute("rule");
		if (tr==rule)
		{
			
			var aa = a[i].childNodes;
			for (var j=0;j<aa.length;j++)
			{

				if (aa[j].tagName=="A")
				{
				
					var inp = aa[j].getElementsByTagName("INPUT")[0];
					if (inp)
					{
						var cname = inp.getAttribute("cname");
						var sname = inp.getAttribute("sname");
						if (!cname) continue;

						var val = obj.style[cname];
						if (val)
						{
							if (!qmad.br_ie)
								val = qmv_load_css_styles_firefox_fix(val,inp.getAttribute("dtype"));

							wt += sname+":"+val+";";
				
						}
					}
				}

			}

			
		}
		
	}

	if (wt)
		return ' style="'+wt+'"';
	else
		return "";

}


function qmv_pubgen_structure_build_menu_settings(id,a,is_external,fcall_only)
{

	var wt = '';


	
	var isv = "false";
	if (qmv_lib_is_menu_vertical(id))
		isv = "true";
		
	var isc = "false";
	if (a.oc)
		isc = "'"+a.oc+"'";
		
	if (qmv.addons.tree_menu["on"+id])
		isc = "'all'";
	

	var rl;
	if (a.rl) rl = "true";else rl = "false";

	var sh;
	if (a.sh) sh = "true";else sh = "false";

	var fl;
	if (a.fl) fl = "true";else fl = "false";

	var ft;
	if (a.ft) ft = "true";else ft = "false";
	
	var sc = "";
	if (!is_external)
	{
		
		sc += '\r\n';	
		sc+='<!-- Create Menu Settings: (Menu ID, Is Vertical, Show Timer, Hide Timer, On Click (\'all\', \'main\' or \'lev2\'), Right to Left, Horizontal Subs, Flush Left, Flush Top) -->'
		sc += '\r\n';
	}

	wt += 'qm_create('+id+','+isv+','+qmv.ms_show_timer+','+qmv.ms_hide_timer+','+isc+','+rl+','+sh+','+fl+','+ft+');';

	if (!fcall_only)
		wt = sc+'<scr'+'ipt type="text/javascript">'+wt+'</scr'+'ipt>';


	return wt;

}


function qmv_pubgen_get_number_word(num)
{

	if (num==1)
		return "First";
	else if (num==2)
		return "Second";	
	else if (num==3)
		return "Third";	
	else if (num==4)
		return "Fourth";	
	else if (num==5)
		return "Fith";	
	else if (num==6)
		return "Sixth";	
	else if (num==7)
		return "Seventh";	
	else if (num==8)
		return "Eighth";	
	else if (num==9)
		return "Ninth";	


	return num;

}

function qmv_pubgen_get_core_css(force_type,force_id,force_vertical)
{

	var rt = "";
	rt += '.qmmc .qmdivider{display:block;font-size:1px;border-width:0px;border-style:solid;position:relative;z-index:1;}.qmmc .qmdividery{float:left;width:0px;}.qmmc .qmtitle{display:block;cursor:default;white-space:nowrap;position:relative;z-index:1;}.qmclear {font-size:1px;height:0px;width:0px;clear:left;line-height:0px;display:block;float:none !important;}.qmmc {position:relative;zoom:1;z-index:'+(10-parseInt(qmv.id))+';}.qmmc a, .qmmc li {float:left;display:block;white-space:nowrap;position:relative;z-index:1;}.qmmc div a, .qmmc ul a, .qmmc ul li {float:none;}.qmsh div a {float:left;}.qmmc div{visibility:hidden;position:absolute;}.qmmc .qmcbox{cursor:default;display:block;position:relative;z-index:1;}.qmmc .qmcbox a{display:inline;}.qmmc .qmcbox div{float:none;position:static;visibility:inherit;left:auto;}';

	if (qmv.pure)
	{
		rt += '.qmmc li {z-index:auto;}.qmmc ul {left:-10000px;position:absolute;z-index:10;}.qmmc, .qmmc ul {list-style:none;padding:0px;margin:0px;}.qmmc li a {float:none}.qmmc li:hover>ul{left:auto;}';

		


		if (force_type)
		{

			if (force_type=="standard" && !force_vertical)
				rt += '#qm'+force_id+' ul {top:100%;}#qm'+force_id+' ul li:hover>ul{top:0px;left:100%;}';
			else
				rt += '#qm'+force_id+' li {float:none;}#qm'+force_id+' li:hover>ul{top:0px;left:100%;}';
				
		}
		else
		{

			for (var i=0;i<10;i++)
			{
				var a;
				if (a = document.getElementById("qm"+i))
				{

					if (!a.ch || qmv.addons.tree_menu["on"+i])
						rt += '#qm'+i+' li {float:none;}#qm'+i+' li:hover>ul{top:0px;left:100%;}';
					else
						rt += '#qm'+i+' ul {top:100%;}#qm'+i+' ul li:hover>ul{top:0px;left:100%;}';
				}
			}
		}

	}


	
	

	return rt;

}


function qmv_pubget_get_core_addon_css()
{


	return '<style type="text/css">.qmfv{visibility:visible !important;}.qmfh{visibility:hidden !important;}</style><script type="text/javascript">qmad=new Object();qmad.bvis="";qmad.bhide="";</script>';

}

function qmv_publish_focus_input(event,a)
{

	if (qmad.br_ie)
	{
		trange = a.createTextRange();
		trange.select();
	}
	else
	{
		a.setSelectionRange(0,a.value.length);

		if (qmad.br_fox)
			a.focus();		
	}

}

function qmv_publish_blur_input(event,a)
{
	if (!qmad.br_ie)
		a.setSelectionRange(0,0);

}


function qmv_pubgen_all_external(force_external,quick_publish_inline)
{

	
	var wt = "";

	if (!quick_publish_inline)
	{
	
		wt += qmv_pubgen_css(false,true);
		wt = wt.replace(/\'/g,"\\'");
		wt = '//Compressed CSS Styles\r\n'+"document.write('"+wt+"');";

		wt += "\r\n";
		wt += "\r\n";

		wt += qmv_pubgen_javascript(true);

		wt += "//Compressed Menu Structure\r\n";
		wt += qmv_pubgen_structure(force_external);

	}
	else
	{
		
		wt += qmv_pubgen_css(false,true);
		wt = wt.replace(/\'/g,"\\'");
		wt = "document.write('"+wt+"');";
	
		wt += "\r\n";
		wt += "\r\n";

		wt += qmv_pubgen_javascript(true);
		wt += qmv_pubgen_structure(force_external);


		wt = wt.replace(/<script/g,"<scr'+'ipt");
		wt = wt.replace(/<\/script/g,"</scr'+'ipt");
		wt = '<script type="text/javascript">'+wt+'</script>';

	}


	return wt;

}


function qmv_savegen(is_component,is_preview, css_only)
{

	var wt = "";
	var rt = "\r\n";


	wt += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
	wt += rt;
	wt += '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">';
	wt += '<head><title>QuickMenu Save Document</title><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>';


	wt += rt;
	wt += rt;
	wt += '<!-- *** QuickMenu copyright (c) 2007, OpenCube Inc. All Rights Reserved.';
	wt += rt;
	wt += rt;

	if (is_component)
	{

		wt += '\t-Manually edit this menus settings using a plain text editor.  To visually edit click the link above the menu'
		wt += rt;
		wt += '\t while viewing this page in your browser.'

	}
	else
	{
		wt += '\t-QuickMenu may be manually customized by editing this document, or open this web page using'
		wt += rt;
		wt += '\t IE or Firefox to access the visual interface.'
	}

	wt += rt;
	wt += rt;
	wt += '-->';	


	wt += rt;
	wt += rt;
	wt += rt;


	wt += qmv_pubgen_css(false);

	if (!css_only)
	{
		if (is_preview)
			wt += qmv_pubgen_javascript(false,true);
		else
			wt += qmv_pubgen_javascript(false);
	}

	wt += '</head>'
	wt += rt;
	wt += rt;
	wt += '<body style="margin:40px;background-color:'+qmvi_change_design_bg_color(true)+';"><noscript><span style="font-size:13px;font-family:arial;"><span style="color:#dd3300">Warning!</span>&nbsp&nbsp; QuickMenu may have been blocked by IE-SP2\'s active content option. This browser feature blocks JavaScript from running locally on your computer.<br><br>This warning will not display once the menu is on-line.  To enable the menu locally, click the yellow bar above, and select <span style="color:#0033dd;">"Allow Blocked Content"</span>.<br><br>To permanently enable active content locally...<div style="padding:0px 0px 30px 10px;color:#0033dd;"><br>1: Select \'Tools\' --> \'Internet Options\' from the IE menu.<br>2: Click the \'Advanced\' tab.<br>3: Check the 2nd option under \'Security\' in the tree (Allow active content to run in files on my computer.)</div></span></noscript>';
	wt += rt;

	if (!is_preview)
	{
		wt += rt;
		wt += '<!--Open Visual Interface Button-->'+rt;
		wt += '<a style="font-size:13px;color:#444444;font-family:arial;text-decoration:none;display:block;margin-bottom:25px;" id="qmv_open_visual_interface" href="javascript:if (qm_s3){window.name=\'qm_open\';window.location = window.location.href;}else{var qmnw = window.open(window.location.href,\'qm_open\',\'scrollbars=no,location=no,status=yes,menu=no,toolbar=no,resizable=yes\');if (window.focus) {qmnw.focus()}}"><span style="color:#dd3300;">[+]</span> Open Visual Interface</a>'+rt;
		wt += rt;
	}


	if (qmv.free_use)
	{
		wt += rt;
		wt += rt;	
		wt += "<!-- This optional free use link disables the online purchase reminder.  Include within the body of your page -->";
		wt += rt;
		wt += qmv_pubgen_free_use_link();		
		wt += rt;
		wt += '<br><br><br>'
		wt += rt;
	}
	

	

	wt += rt;
	wt += rt;
	wt += rt;
	wt += qmv_pubgen_structure(false,true,rt+rt+rt+rt+"<br><br><br><br><br><br><br>"+rt+rt+rt+rt,true,null,css_only,is_preview);
	wt += rt;
	wt += rt;
	wt += rt;



	//wt += '<!-- This script references optionally loads the QuickMenu visual interface, to run the menu stand alone remove the script.-->'
	//wt += rt;	
	//wt += '<script type="text/javascript" src="http://www.opencube.com/qmv4/qm_visual.js"></script>'
	//wt += '<script type="text/javascript">if (window.name=="qm_launch_visual"){document.write(\'<scr\'+\'ipt type="text/javascript" src="http://www.opencube.com/qmv6/qm_visual.js"></scr\'+\'ipt>\')}</script>'
	//wt += rt;


	if (is_preview)
	{

		
		wt += '<script type="text/javascript">';
		
		wt+='var ats = document.getElementsByTagName("A");';
		wt+='for (var i=0;i<ats.length;i++)';
		wt+='{';
	
			wt+='if (ats[i].attachEvent)';
			wt+='ats[i].attachEvent("onclick",qmvp_kill_links2);';
			wt+='else if (ats[i].addEventListener)'
			wt+='ats[i].addEventListener("click",qmvp_kill_links2,true);';

		wt+='}';

		wt += 'function qmvp_kill_links2(e)';		
		wt += '{';
		

			wt += 'e=e || window.event;';
			wt += 'var ta = e.srcElement || e.target;';
			
			wt += 'if(ta.className.indexOf("qmparent")+1)';
			wt += 'return;';
	
			wt += 'alert("Links may be tested by publishing or saving the menu.\\r\\n\\r\\nThe item you clicked will link to: "+ta.getAttribute("href"));';
			
			wt += 'e.cancelBubble = true;';
			wt += 'if (e.stopPropagation)';
			wt += 'e.stopPropagation();';
	
			wt += 'if (e.preventDefault)';
			wt += 'e.preventDefault();';

			wt += 'e.returnValue = false;';
	
			wt+='return false';

		wt += '}';

		wt += '</script>';

	}




	wt += '</body>';
	wt += rt;
	wt += '</html>';

	return wt;


}


function qmv_options_init()
{


	var tc = document.getElementById("qmvi_dg_options_auto_collapse");
	if (!qmv.tree_collapse)
		tc.checked = false;
	else
		tc.checked = true;

	var tc = document.getElementById("qmvi_dg_options_hide_selected_box");
	if (!qmv.interface_hide_selected_box)
		tc.checked = false;
	else
		tc.checked = true;


	/*
	tc = document.getElementById("qmvi_dg_options_free_use");
	if (!qmv.free_use)
		tc.checked = false;
	else
		tc.checked = true;
	*/


	var tc = document.getElementById("qmvi_df_options_unlock");
	if (qmv.unlock_orig)
		tc.value = qmv.unlock_orig;
	




}

function qmv_input_code_ask_width(vert,width)
{

	

	if (vert)
	{
		
		if (!width)
		{
			var def = qmv_find_update_tree_value("css","#qm[i]","width",null,true);
			if (def=="" || (def && def.toLowerCase().indexOf("auto")+1)) def = "200px";

			qmv_show_dialog("question-okcancel-input",vert,"Please define a width for the vertical main menu. Without a width defined the main menu will stretch to 100% of its containers size. This value is further cusomizable under CSS Styles --&gt; Main --&gt; Container.<br><br>Main Container Width",300,"qmv_input_code_ask_width(qmd.owner,true)",null,null,def);	

		}
		else
		{
			var val = document.getElementById("qmvi_ok_input").value;
			if (val)
			{		
				var update_inp = qmv_find_update_tree_value("css","#qm[i]","width",val,false,true);
				if (update_inp)
					qmv_evt_update_tree_value(update_inp);
			}
		}

	}
	else
	{
		if (!width)
		{
			var def = qmv_find_update_tree_value("css","#qm[i]","width",null,true);
			if (def)
			{
				qmv_show_dialog("question-yesno",vert,"A width is defined for the main container which may cause the items to wrap when aligned horizontally. This setting is accessible under CSS Styles --> Main --> Container.<br><br>Would you like to remove the width now.",450,"qmv_input_code_ask_width(qmd.owner,true)");	
			}

		}
		else
		{
			var update_inp = qmv_find_update_tree_value("css","#qm[i]","width","",false,true);
			if (update_inp)
				qmv_evt_update_tree_value(update_inp);	
		
		}

	}
		

}

function qmv_image_init(qmd)
{
	
	document.getElementById("qmvi_dg_image").value = qmd.owner.value;



}


function qmvi_options_free_use_info()
{

	qmv_show_dialog("alert",null,"QuickMenu and all its features may be use without limitation and completely free of charge by including a link anywhere in the body of your web page to OpenCube.<br><br>The link to add is provided as one of the steps in the publish wizard if this option is checked.<br><br>You must also use the quickmenu code produced by the publish wizard for the link to activate the menus free use mode, the menu code will verify that the link is in the page.",600);


}


function qmv_pubgen_free_use_link()
{


	return "<a id='qm_free' href='http://www.opencube.com'>OpenCube Drop Down Menu (www.opencube.com)</a>";


}

function qmv_evt_apply_plus(e,a)
{



	var cname = a.getAttribute("cname");

	if (cname=="insert_title")
	{
		qmv_insert_spanitem("title");
		
	}
	if (cname=="insert_title_after")
	{
		qmv_insert_spanitem("title",null,null,true);
		
	}
	else if (cname=="insert_divider")
	{
		
		qmv_insert_spanitem("divider");
		

	}
	else if (cname=="insert_divider_after")
	{


		qmv_insert_spanitem("divider",null,null,true);
		

	}
	else if (cname=="insert_divider_global")
	{


		qmv_show_dialog("applydividers");
		

	}
	else if (cname=="apply_striping_individually")
	{
		
		qm_arc("qmstripe",qmv.cur_item,true);
		

	}
	else if (cname=="remove_striping_individually")
	{


		qm_arc("qmstripe",qmv.cur_item);
		

	}
	else if (cname=="apply_striping_globally")
	{


		qmv_show_dialog("applystripes");
		

	}
	else if (cname=="ritem_mitem_styles")
	{

		qmv_ritem_underlying_styles(null,"main");

	}
	else if (cname=="ritem_sitem_styles")
	{

		qmv_ritem_underlying_styles(null,"sub");

	}
	else if (cname=="ritem_remove_mborders")
	{

		qmv_ritem_remove_main_styles("main");

	}
	else if (cname=="ritem_remove_sborders")
	{

		qmv_ritem_remove_main_styles("sub");

	}
	else if (cname=="ritem_individual")
	{


		if (!qmv.addons.ritem["on"+qmv.id])
			qmv_context_cmd(e,"addon_ritem");
		
		qm_arc("qmrounditem",qmv.cur_item,true);
		qmv_update_all_addons();

	}
	else if (cname=="ritem_individual_remove")
	{
		qm_arc("qmrounditem",qmv.cur_item);
		qmv_update_all_addons();

		qmv_ritem_remove_warning();
		

	}
	else if (cname=="rcorner_blend")
	{
		if (!qmv.addons.round_corners["on"+qmv.id])
			qmv_show_dialog("alert",null,"Rounded corners must first be applied to your menu before the colors can be blended.",400);		
		else
			qmv_updatehandle_round_corner_show(null,null,null,null,null,true);
	}
	else if (cname=="custom_rule")
	{


		qmv_add_custom_css_rule()



	}	
	else if (cname=="pstate_add")
	{

		if (qmv.cur_item.tagName!="A")
		{

			qmv_show_dialog("alert", null, "Persistent states may be applied to menu links only, titles and dividers may not be set persistent.<br><br>First click on a menu item which acts as a link, then apply the test persistent state.",375);

		}
		else
		{
			qm_arc("qmpersistent",qmv.cur_item,true);

			var cb = document.getElementById("qmv_iadd_sopen_auto");
			if (!cb.checked)
			{
				cb.checked = true;
				qmv_evt_addremove_addon(new Object(),cb);
			}

		}

	}
	else if (cname=="pstate_remove")
	{

		qm_arc("qmpersistent",qmv.cur_item);

	}
	else if (cname=="pstate_remove_all")
	{

		var at = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
		for (var i=0;i<at.length;i++)
			qm_arc("qmpersistent",at[i]);

	}
	else if (cname=="pstate_help")
	{

		qmv_show_dialog("help-persistent-state",null,"help-persistent_state.html");
	}
	else if (cname=="pstate_main_styles")
	{

		var a = qmv_find_rule_atag("body #qm[i] .qmpersistent")
		qmv_display_setbox(a,null,null,true,2);

		
	}
	else if (cname=="pstate_sub_styles")
	{

		var a = qmv_find_rule_atag("body #qm[i] div .qmpersistent")
		qmv_display_setbox(a,null,null,true,2);
		
	}
	else if (cname=="hoverfill_trans")
	{

		qmv_updatehandle_hoverfill_show(true);
		
	}	
	else if (cname=="set_main_width")
	{
		
		qmv_input_code_ask_width(true);
		
	}
	else if (cname=="showload_apply")
	{

		if (qmv.cur_item[qp] && qmv.cur_item[qp].idiv)
		{
			qm_arc("qm-startopen",qmv.cur_item[qp].idiv,true);
			qmv_show_dialog("alert",null,"Setting applied.  The selected sub menu will display by default onload.<br><br>Note:  Multiple subs may not display by default with certain menu types.",510);	
			qmv_load_item_extras_to_tree();

		}
		else
			qmv_show_dialog("alert",null,"The setting was not applied, first select a menu item within the sub menu you wish to display onload.",510);		
		

	}
	else if (cname=="showload_remove")
	{

		if (qmv.cur_item[qp] && qmv.cur_item[qp].idiv && qmv.cur_item[qp].idiv.className.indexOf("qm-startopen")+1)
		{
			qm_arc("qm-startopen",qmv.cur_item[qp].idiv);
			qmv_show_dialog("alert",null,"Setting removed.  The selected sub menu will <b>not</b> be visible by default.",460);	
			qmv_load_item_extras_to_tree();
		}
		else
			qmv_show_dialog("alert",null,"<b>Warning!</b> The setting was not removed.  To remove the setting, first select a menu item within a sub menu which is set to show onload, then use this removal feature.",510);		


	}
	else if (cname=="sopen_addon")
	{
		
		var a = document.getElementById("qmv_iadd_sopen");
		qmv_display_setbox(null,a);

	}
	
}


function qmv_evt_apply_skin(e,a)
{

	var cname = a.getAttribute("cname");	
	var rule = "";

	var da = a;
	while (da.tagName!="DIV")
		da = da[qp];

	rule = da.getAttribute("rule");

	

	if (rule=="color")
	{


		qmv.skins.color_rules = new Object();
		qmv.skins.color = new Object();

		qmv.skins.color_rules.light_grays = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.light_grays = new Array("#eeeeee","#999999","#cccccc","#cccccc","#cccccc","#999999","#111111","#111111","","","#eeeeee","#111111","#111111");

		qmv.skins.color_rules.medium_grays = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.medium_grays = new Array("#cccccc","#666666","#999999","#999999","#999999","#666666","#111111","#111111","","","#cccccc","#111111","#111111");

		qmv.skins.color_rules.dark_grays = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.dark_grays = new Array("#aaaaaa","#333333","#666666","#666666","#666666","#333333","#111111","#111111","","","#aaaaaa","#111111","#111111");

		qmv.skins.color_rules.black_white = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.black_white = new Array("#000000","#ffffff","#000000","#000000","#000000","#ffffff","#ffffff","#ffffff","","","#000000","#ffffff","#ffffff");

		qmv.skins.color_rules.red_brick = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.red_brick = new Array("#dd3300","#990000","#dd3300","#990000","#990000","#990000","#ffffff","#ffffff","","","#dd3300","#ffffff","#ffffff");

		qmv.skins.color_rules.blue_tones = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.blue_tones = new Array("#c3d1ff","#306fbc","#306fbc","#c3d1ff","#c3d1ff","#306fbc","#000000","#000000","","","#c3d1ff","#000000","#ffffff");

		qmv.skins.color_rules.blue_yellow = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.blue_yellow = new Array("#fbecc1","#306fbc","#306fbc","#fbecc1","#fbecc1","#306fbc","#000000","#000000","","","#fbecc1","#000000","#ffffff");

		qmv.skins.color_rules.blue_green = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.blue_green = new Array("#bce0c4","#306fbc","#306fbc","#bce0c4","#bce0c4","#306fbc","#000000","#000000","","","#bce0c4","#000000","#ffffff");

		qmv.skins.color_rules.forest_green = new Array("css|#qm[i] a|backgroundColor","css|#qm[i] a|borderColor","css|body #qm[i] .qmactive|backgroundColor","css|#qm[i] div|backgroundColor","css|#qm[i] div a|backgroundColor","css|#qm[i] div|borderColor","css|#qm[i] a|color","css|#qm[i] div a|color","css|#qm[i] a:hover|backgroundColor","css|#qm[i] div a:hover|backgroundColor","css|body #qm[i] div .qmactive|backgroundColor","css|body #qm[i] div .qmactive|color","css|body #qm[i] .qmactive|color");
		qmv.skins.color.forest_green = new Array("#4c7d49","#81b735","#81b735","#4c7d49","#4c7d49","#81b735","#ffffff","#ffffff","","","#81b735","#2d4c2f","#2d4c2f");



	}
	else if (rule=="spacing")
	{
		qmv.skins.spacing_rules = new Object();
		qmv.skins.spacing = new Object();

		qmv.skins.spacing_rules.h4_main_gaps = new Array("css|#qm[i] a|margin");
		qmv.skins.spacing.h4_main_gaps = new Array("0px 4px 0px 0px");

		qmv.skins.spacing_rules.h0_main_gaps = new Array("css|#qm[i] a|margin");
		qmv.skins.spacing.h0_main_gaps = new Array("0px");
		
		qmv.skins.spacing_rules.v4_main_gaps = new Array("css|#qm[i] a|margin");
		qmv.skins.spacing.v4_main_gaps = new Array("0px 0x 4px 0px");
		
		qmv.skins.spacing_rules.v0_main_gaps = new Array("css|#qm[i] a|margin");
		qmv.skins.spacing.v0_main_gaps = new Array("0px");

		qmv.skins.spacing_rules.small_sub_pad = new Array("css|#qm[i] div|padding");
		qmv.skins.spacing.small_sub_pad = new Array("2px");

		qmv.skins.spacing_rules.medium_sub_pad = new Array("css|#qm[i] div|padding");
		qmv.skins.spacing.medium_sub_pad = new Array("5px");

		qmv.skins.spacing_rules.large_sub_pad = new Array("css|#qm[i] div|padding");
		qmv.skins.spacing.large_sub_pad = new Array("10px");

	}



	var sr = qmv.skins[rule+"_rules"][cname];
	var sv = qmv.skins[rule][cname];
	
	var si = true;
	if (cname.indexOf("main_gaps")+1) si = false;

	
	
	for (var i=0;i<sr.length;i++)
	{

		var sp = sr[i].split("|");
		if (sp.length>2 && sv[i]!=null)
		{
			var inp = qmv_find_update_tree_value(sp[0],sp[1],sp[2],sv[i],false,true);

			var su = true;
			if (i==sr.length-1) su = true;
						
			qmv_evt_update_tree_value(inp,null,true,su,si,false,true);
		}
		

	}

	if (document.getElementById("qmvtree_filter").cdiv.style.display=="block")
		qmv_filter_init2();
	

	if (qmv.addons.round_corners["on"+qmv.id])
	{
		qmv.questionasked_rcorner_size = false;
		qmv_updatehandle_round_corner_show();
	}



	if (document.getElementById("qmvi_msg_dialog").style.visibility!="visible")
	{
		if (!qmv.msg_skin_settings_shown)
		{
			qmv_show_dialog("alert",null,"Your skin settings have been applied.<br><br>All skin settings are individually available in the CSS Styles and Add-On sections of the main interface.",460);	
			qmv.msg_skin_settings_shown = true;
		}
	}


}



function qmv_shortcut_init(a)
{

	
	
	a.innerHTML = "";
	var tcolor = new Array();


	tbuild = new Array();
	for (var i=0;i<qmv.color_recent.length;i++)
	{

		var con = false;
		for (var j=0;j<tbuild.length;j++)
		{
			if (tbuild[j].inp.value.toLowerCase()==qmv.color_recent[i].value)
			{
				tbuild[j].count++;
				con = true;
			}

		}
		
		if (con) continue;

		var tb = new Object()
		tb.inp = qmv.color_recent[i].inp;
		tb.count = 1;
		tbuild.push(tb);
	}


	

	for (var i=0;i<tbuild.length;i++)
	{


				
		var ipp = tbuild[i].inp[qp];
		while (ipp.tagName!="A")
			ipp = ipp[qp];

		var ni = ipp.cloneNode(true);

		qm_arc("qmvtreelasta",ni);
		qm_arc("qmvtreefirsta",ni);

		if (i==tbuild.length-1)		
			qm_arc("qmvtreelasta",ni,true);

		if (i==0)
			qm_arc("qmvtreefirsta",ni,true);


		var tds = ni.getElementsByTagName("TD");
		for (var j=0;j<tds.length;j++)
		{
			if (tds[j].getAttribute("filtercol1"))
			{
				
				tds[j].style.width = "120px";
				tds[j].innerHTML = "Color Styles:&nbsp;"+"(<span style='color:#dd3300;'>"+tbuild[i].count+"</span>)&nbsp;";
				
			}
				
		}


		var inp_orig = tbuild[i].inp;

		var inp = ni.getElementsByTagName("INPUT")[0];
		inp.origrule = inp_orig.origrule;
		inp.rule = inp_orig.rule;
		inp.iseditcolor = 1;
		inp.prev_value = inp_orig.prev_value;
				

		a.appendChild(ni);
		

	}

	
	
}



function qmv_filter_init()
{

	if (!qmv.filter)
	{

		qmv.filter = new Object();
		qmv.filter.settings = new Object();
		

		qmv.filter.settings.value = "edit";
		qmv.filter.settings.group = "main";
		qmv.filter.settings.section = "item";
		qmv.filter.settings.style = "color";

		document.getElementById("qmvf_value1").checked = true;
		document.getElementById("qmvf_group0").checked = true;
		document.getElementById("qmvf_section1").checked = true;
		document.getElementById("qmvf_style0").checked = true;


	}

	
	if (document.getElementById("qmvtree_filter").cdiv.style.display!="block")
		qmv_filter_init2();
		
		
}

function qmv_filter_init2()
{

	qmv_filter_init_results_object();
	qmv_filter_get_results();
	qmv_filter_build_results();

}


function qmv_filter_change()
{

	qmv.filter.settings.value = "";
	if (document.getElementById("qmvf_value0").checked)
		qmv.filter.settings.value += "add";
	if (document.getElementById("qmvf_value1").checked)
		qmv.filter.settings.value += "edit";


	if (!qmv.filter.settings.value)
		qmv_show_dialog("alert",null,"You must check <span style='color:#0033aa'>add</span> or <span style='color:#0033aa'>edit</span> for the filter to display results.",400,null,null,null,null,true);		


	if (document.getElementById("qmvf_group0").checked)
		qmv.filter.settings.group = "main";
	else
		qmv.filter.settings.group = "sub";


	if (document.getElementById("qmvf_section0").checked)
		qmv.filter.settings.section = "container";
	else
		qmv.filter.settings.section = "item";


	if (document.getElementById("qmvf_style0").checked)
		qmv.filter.settings.style = "color";
	else if (document.getElementById("qmvf_style1").checked)
		qmv.filter.settings.style = "font";
	else if (document.getElementById("qmvf_style2").checked)
		qmv.filter.settings.style = "border";
	else if (document.getElementById("qmvf_style3").checked)
		qmv.filter.settings.style = "other";


	qmv_filter_init_results_object();

	qmv_filter_get_results();
	qmv_filter_build_results();

}

function qmv_filter_init_results_object()
{

	qmv.filter.results = new Array();
	qmv.filter.results_title = new Array();

}

function qmv_filter_get_results(obj,title)
{

	var fr = qmv.filter.results;
	var fr_title = qmv.filter.results_title;
	var fs = qmv.filter.settings;

	if (!obj)
	{
		obj = document.getElementById("qmvtree_css_styles");
	}

	var isfont = obj.getAttribute("isfont");


	var a = obj.childNodes;
	for (var i=0;i<a.length;i++)
	{
		



		if (a[i].tagName=="A")
		{
			var inp = a[i].getElementsByTagName("INPUT")[0];
			if (inp)
			{

				if ((fs.value.indexOf("edit")+1 && inp.value) || (fs.value.indexOf("add")+1 && !inp.value))
				{

					var cname=inp.getAttribute("cname");
					var dtype=inp.getAttribute("dtype");

					var go = false;

					if (fs.style=="font" && isfont)
						go = true;

					if ((fs.style=="color" && dtype=="color") || (fs.style=="border" && cname.indexOf("border")+1))
						go = true;

					if (fs.style=="other" && !go && !isfont && dtype!="color" && cname.indexOf("border")==-1)
						go = true;

					if (go)
					{
						var t = false;
						if (title)
							t = title;					

						fr_title.push(t);
						fr.push(a[i]);
					}

				}
			}
			
			var b;
			if (b = a[i].cdiv)
			{
				var group;
				if ((group = b.getAttribute("group")) && group!=fs.group)
					continue;

				var section;
				if ((section = b.getAttribute("section")) && section!=fs.section)
					continue;
				
				var t
				if (!(t = b.getAttribute("ftitle")))
					t = false;

				qmv_filter_get_results(a[i].cdiv,t)

			}

		}


	}


}


function qmv_filter_build_results()
{
	var ta = "";

	var fr = qmv.filter.results;
	var fr_title = qmv.filter.results_title;


	var a = document.getElementById("qmvtree_filter_results");
	document.getElementById("qmvtree_filter_results_qty").innerHTML = "(<span style='color:#dd3300'>"+fr.length+"</span>)";

	
	if (!fr.length)
	{
		a.innerHTML = '<a href="#">This filter has zero results.</a>';
		return;
	}

	a.innerHTML = "";
	for (var i=0;i<fr.length;i++)
	{
		
				
		var ni = fr[i].cloneNode(true);
		qm_arc("qmvtreelasta",ni);
		qm_arc("qmvtreefirsta",ni);

		var tds = ni.getElementsByTagName("TD");
		for (var j=0;j<tds.length;j++)
		{
			if (tds[j].getAttribute("filtercol1"))
			{	
				tds[j].style.width = "120px";
	
				if (fr_title[i] && ta.indexOf(fr_title[i])==-1)
				{
					
					var st = document.createElement("SPAN");
					st.style.display = "block";
					st.style.className = "qmvi-common";
					st.style.color = "#555555";

					if (!ta)
						st.style.marginTop = "4px";
					else
						st.style.marginTop = "8px";

					st.style.marginBottom = "4px";
					st.innerHTML = "["+fr_title[i]+"]";
					a.appendChild(st);
				
					ta = fr_title[i];
					
				}
			}


		}


		var inp_orig = fr[i].getElementsByTagName("INPUT")[0];
		var inp = ni.getElementsByTagName("INPUT")[0];

		inp.origrule = inp_orig.origrule;
		inp.rule = inp_orig.rule;
		inp.prev_value = inp_orig.prev_value;
		inp.isfilter = 1;

		a.appendChild(ni);
	
	}


	var hp = document.createElement("SPAN");
	hp.style.display = "block";
	hp.style.fontSize = "1px";
	hp.style.height = "5px";
	a.appendChild(hp);	

	
}


function qmv_info_item_extra_hover_active_help()
{

	qmv_show_dialog("alert",null,"To use hover and active effects create a custom image for each.  Append '_hover' or '_active' to the file name and save them to the same folder as the static image.  If your static image is '<span style='color:#dd3300'>main1.gif</span> the hover and actives would be...<br><br><span style='color:#dd3300'>main1_hover.gif<br>main1_active.gif</span><br><br>Hovers and actives are optional and are activated by setting the value of this field to true.",600);

}




var qmc_si, qmc_li, qmc_lo, qmc_tt, qmc_th, qmc_ts;
var qp = "parentNode";
var qc = "className";

var qmc_t = navigator.userAgent;
var qmc_o = qmc_t.indexOf("Opera")+1;
var qmc_s = qmc_t.indexOf("afari")+1;
var qmc_s2 = qmc_s && window.XMLHttpRequest;
var qmc_n = qmc_t.indexOf("Netscape")+1;
var qmc_v = parseFloat(navigator.vendorSub);





function qmc_create(sd,v,ts,th,oc,rl,sh,fl,nf,l)
{

	var w = "onmouseover";
	if (oc) 
	{
		w = "onclick";
		th = 0;
		ts = 0;
	}

	if (!l)
	{
		
		l=1;
		qmc_th = th;
		

		sd = document.getElementById("qm"+sd);
		sd[w]=function(e){qmc_kille(e);};
		
		
		sd.style.zoom = 1;
		if (sh) qmc_arc("qmsh",sd,true);	
		if (!v) sd.ch = 1;
		
				
	}
	else if (sh)
		sd.ch = 1;
		
	
	
	if (sh) sd.sh = 1;
	if (fl) sd.fl = 1;
	if (rl) sd.rl = 1;
	
	sd.style.zIndex = l+""+1;

	var lsp;
	var sp = sd.childNodes;
	
	for (var i=0;i<sp.length;i++)
	{
		
		var b=sp[i];	
		if (b.tagName=="A")
		{
			
			lsp = b;	
			b[w] = qmc_oo;
			b.qmts = ts;
			
			if (l==1 && v)
			{
				
				b.style.styleFloat = "none";
				b.style.cssFloat = "none";
				
			}
			
		}	
		
		if (b.tagName=="DIV")
		{
			if (window.showHelp && !window.XMLHttpRequest)
				sp[i].insertAdjacentHTML("afterBegin","<span class='qmclear'>&nbsp;</span>");
						
			
			qmc_arc("qmparent",lsp,true);
			lsp.cdiv = b;
			b.idiv = lsp;

			if (qmc_n && qmc_v<8 && !b.style.width)
				b.style.width = b.offsetWidth+"px";

			
						
			new qmc_create(b,null,ts,th,oc,rl,sh,fl,nf,l+1);	

		}
			
	}


}




function qmc_bo(e)
{

	
	
	clearTimeout(qmc_tt);
	qmc_tt = null;
	
	if (qmc_li && !qmc_tt)
		qmc_tt = setTimeout("qmc_2bo()",qmc_th);	
	

}

function qmc_2bo()
{
	
	var a;
	if ((a = qmc_li))	
	{
		
		do
		{
			
			qmc_uo(a);
			
			
		}while ((a = a[qp]) && !qmc_a(a))

	}

	qmc_li = null;
	

}

function qmc_a(a)
{
	
	if (a[qc].indexOf("qmmc")+1)
		return 1;

}

function qmc_uo(a,go)
{
	
	
	if (!go && a.qmtree) return;

	if (window.qmad && qmad.bhide) eval(qmad.bhide);
	a.style.visibility = "";
	qmc_arc("qmactive",a.idiv);
	

	
	

}




function qmc_oo(e,o,nt)
{

	if (!qmv.context_clicked) return;

	if (!o) o=this;


	o.blur();
	
	//if (window.qmad && qmad.bhover && !nt) eval(qmad.bhover);
	
	if (window.qmwait) {qmc_kille(e); return;}

	clearTimeout(qmc_tt);
	qmc_tt = null;
	
	
	if (!nt && o.qmts)
	{
		
		qmc_si = o;
		qmc_tt = setTimeout("qmc_oo(new Object(),qmc_si,true)",o.qmts);
		return;
	}

	
	
	var a = o;
	if (a[qp].isrun) {qmc_kille(e); return;}
	

	var go = true;
	while ((a = a[qp]) && !qmc_a(a))
	{
		if (a==qmc_li)
			go = false;
	}
		

	if (qmc_li && go)
	{
		a = o;
		if ((!a.cdiv) || (a.cdiv && a.cdiv!=qmc_li))
			qmc_uo(qmc_li);
		

		a = qmc_li;
		while ((a = a[qp]) && !qmc_a(a))
		{
			
			if (a!=o[qp])
				qmc_uo(a);
			else
				break;
					
		}
	}

		
	var b = o;
	var c = o.cdiv;
	if (b.cdiv)
	{
	
		var aw = b.offsetWidth;
		var ah = b.offsetHeight;
		var ax = b.offsetLeft;
		var ay = b.offsetTop;

	
				
		if (c[qp].ch)
		{
			aw = 0;
			if (c.fl) ax =0;
		}
		else
		{
			if (c.rl)
			{
				ax = ax-c.offsetWidth;
				aw=0;
			}

			ah=0;
		}		

	
		if (qmc_o)
		{
			
			ax-=b[qp].clientLeft;
			ay-=b[qp].clientTop;
		}

		if (qmc_s2)
		{
			ax-=qmc_gcs(b[qp],"border-left-width","borderLeftWidth");
			ay-=qmc_gcs(b[qp],"border-top-width","borderTopWidth");
		}	

	
		if (!c.ismove)
		{
			c.style.left = (ax+aw)+"px";
			c.style.top = (ay+ah)+"px";
		}
		
		
		qmc_arc("qmactive",o,true);
		
		qmv_apsubs(c);
		if (window.qmad && qmad.bvis) eval(qmad.bvis);


		

		
		c.style.visibility ="inherit";
		qmc_li = c;

	}
	else if (!qmc_a(b[qp]))
		qmc_li = b[qp];
	else
		qmc_li = null;
		
	
	qmc_kille(e);

	
}


function qmc_gcs(obj,sname,jname)
{
	var v;
	if (document.defaultView && document.defaultView.getComputedStyle)
		v = document.defaultView.getComputedStyle(obj, null).getPropertyValue(sname);
	else if (obj.currentStyle)
		v = obj.currentStyle[jname];		

	if (v && !isNaN(v = parseInt(v)))
		return v;
	else
		return 0;
	

}



function qmc_arc(name,b,add)
{

	var a = b[qc];
	if (add)
	{
		if (a.indexOf(name)==-1)
			b[qc] += (a?' ':'') + name;	
		
	}
	else
	{
		
		b[qc] = a.replace(" "+name,"");
		b[qc] = b[qc].replace(name,"");
	
	}
}


	
function qmc_kille(e)
{

	if (!e) e = event;

	e.cancelBubble = true;

	
	if (e.stopPropagation && !(qmc_s && e.type=="click"))
		 e.stopPropagation();

}


function qmv_hide_context()
{

	

	var a = document.getElementById("qmvi_context");
	a.style.visibility = "hidden";

	qmc_2bo();

	qmv.context_clicked = false;

}

function qmv_show_context(e,type,item,src)
{

	
	e = e || event;

	if (item)
	{
		
		qm_oo(e,item);
	}
	
	var mc = document.getElementById("qm99");
	var a = document.getElementById("qmvi_context");
	var as = document.getElementById("qmvi_context_shadow");


	var ih = "";

	if (type=="menuitem")
	{
		
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'edit texturl\');">Edit Text / URL</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'item_image\');">Item Images</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'divider_styles\');">Divider Styles</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_divider\');">Insert Divider</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'global_dividers\');">Apply Globally</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'title_styles\');">Title Styles</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_title\');">Insert Title</a>';


		if (qmv.addons.ritem["on"+qmv.id])
		{
			ih += qmv_show_context_build_divider();
			ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'addon_ritem\');">Rounded Item Styles</a>';
			
			if (item && !item.hasritem)
				ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'ritem_apply\');">Apply Rounding</a>';
			else
				ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'ritem_remove\');">Remove Rounding</a>';
		}




		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'create_rule\')">Create Rule</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'apply_custom_class\')">Custom Classes</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add item\')">Add Item</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert item\')">Insert Item</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'delete item\')">Delete Item</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add sub menu\')">Add Sub Menu</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'copy item\')">Copy Item</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'paste item\')">Paste Item</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move up\')">Move Item Up</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move down\')">Move Item Down</a>';
	}
	else if (type=="document")
	{

		
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add menu\');">Add Menu</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'delete menu\')">Delete Menu</a>';
	}
	else if (type=="divider")
	{

		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'divider_styles\');">Divider Styles</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'delete item\')">Delete Divider</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move up\')">Move Divider Up</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move down\')">Move Divider Down</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'copy item\')">Copy Divider</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'paste item\')">Paste Divider</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'apply_custom_class\')">Custom Classes</a>';

	}
	else if (type=="title")
	{

		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'title_styles\');">Title Styles</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'delete item\')">Delete Title</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move up\')">Move Title Up</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move down\')">Move Title Down</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'copy item\')">Copy Item</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'paste item\')">Paste Item</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'apply_custom_class\')">Custom Classes</a>';
	}
	else if (type=="bullet_css")
	{

		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'addon_ibcss\');">Bullet Styles</a>';
		
	}
	else if (type=="bullet")
	{

		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'addon_item_bullets\');">Bullet Styles</a>';
		
	}
	else if (type=="build_button")
	{

		qmv.context_build = src;

		var fa = src.parentNode;
		while (fa.tagName!="A" && fa.tagName!="TBODY")
			fa = fa.parentNode;

		var inp = fa.getElementsByTagName("INPUT")[0];



		if (src.style.backgroundColor)
		{
			
			qmv.context_input = inp;

			ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'set_transparent\');">Set Transparent</a>';
			ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'build_click\');">Choose Color</a>';
		}
		else
		{

			ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'build_click\');">Build Value</a>';

		}
	}
	else if (type=="tree_parent")
	{
		if (src.getAttribute("isfresultsa")) return;

		qmv.tree_parent = src;
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'show_properties_box\');">Show Properties Box</a>';


	}
	else if (type=="grid")
	{

		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_off\');">Hide Grid</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_small\');">Small</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_medium\');">Medium</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_large\');">Large</a>';
	}
	else if (type=="design_pad")
	{



		if (qmv.interface_hide_selected_box)
			ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'indicator_show\');">Show Indicator</a>';
		else
			ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'indicator_hide\');">Hide Indicator</a>';

		ih += qmv_show_context_build_divider();
		
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_off\');">Hide Grid</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_small\');">Small Grid</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_medium\');">Medium Grid</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'grid_large\');">Large Grid</a>';

		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'design_color\');">Design Color</a>';	
		ih += qmv_show_context_build_divider();

		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move_up\');">Move Up</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move_down\');">Move Down</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move_right\');">Move Right</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'move_left\');">Move Left</a>';
		

	}
	else if (type=="add_item")
	{



		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_standard_item\');">Add Menu Item</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_title\');">Add Title</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_divider\');">Add Divider</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_content_box\');">Add Content Box</a>';

	}
	else if (type=="insert_item")
	{


		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_standard_item\');">Insert Menu Item</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_title\');">Insert Title</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_divider\');">Insert Divider</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'insert_content_box\');">Insert Content Box</a>';

	}
	else if (type=="enhanced_item_styles")
	{


		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'title_styles\');">Title Styles</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'divider_styles\');">Divider Styles</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'cbox_styles\');">Content Box Styles</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'stripe_styles\');">Striping Styles</a>';
	}
	else if (type=="add_sub")
	{


		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_sub_1\');">Add Sub Menu (1 Item)</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_sub_4\');">Add Sub Menu (4 Items)</a>';
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_sub_8\');">Add Sub Menu (8 Items)</a>';
		ih += qmv_show_context_build_divider();
		ih += '<a href="javascript:void(0)" onclick="qmv_context_cmd(event,\'add_sub_contentbox\');">Add Sub Menu (Content Box)</a>';
	}

	ih += '<span class="qmclear">&nbsp;</span>'
	mc.innerHTML = ih;


	qmc_create(99,true,0,500,false,false,false,false);

	as.style.width = a.offsetWidth+"px";
	as.style.height = a.offsetHeight+"px";
	as.style.left = "3px";
	as.style.top = "3px";	


	a.style.left = e.clientX+"px";
	a.style.top = e.clientY+"px";

	qmv_apsubs(a);

	a.style.visibility = "visible";


	
	qm_kille(e);
	return false;

}


function qmv_context_cmd(e,type,a)
{
	
	if (a && a.className.indexOf("qmdisabled")+1) return;

	e = e || event;

	if (type=="edit texturl")
	{

		
		qmv_show_dialog("url",document.getElementById("qmv_texturl_field"));
		

	}
	else if (type=="add item")
	{

		qmv_evt_bb_click('add');

	}
	else if (type=="insert item")
	{

		qmv_evt_bb_click('insert');

	}
	else if (type=="delete item")
	{

		qmv_evt_bb_click('delete');

	}
	else if (type=="add sub menu")
	{

		qmv_evt_bb_click('addsub');

	}
	else if (type.indexOf("add_sub_")+1)
	{

		if (type=="add_sub_1")
			qmv_evt_bb_click('addsub');
		else if (type=="add_sub_4")
			qmv_modify_items('addsub4');
		else if (type=="add_sub_8")
			qmv_modify_items('addsub8');
		else if (type=="add_sub_contentbox")
			qmv_modify_items('addsubcontentbox');

	}
	else if (type=="copy item")
	{

		qmv_evt_bb_click('copyitem');

	}
	else if (type=="paste item")
	{

		qmv_evt_bb_click('pasteitem');

	}
	else if (type=="move up")
	{

		qmv_evt_bb_click('moveup');

	}
	else if (type=="move down")
	{

		qmv_evt_bb_click('movedown');

	}
	else if (type=="add menu")
	{

		qmv_evt_bb_click('addmenu');

	}	
	else if (type=="delete menu")
	{

		qmv_evt_bb_click('deletemenu');

	}
	else if (type.indexOf("addon_")+1)
	{
		var aon = (type.substring(6));
		var cb = document.getElementById("qmv_iadd_"+aon);

		
		if (!cb.checked)
		{
			cb.checked = true;
			qmv_evt_addremove_addon(new Object(),cb);
		}

		qmv_display_setbox(null,cb);

	
	}
	else if (type=="options")
	{
		qmv_evt_menu_item_click('options');
	}
	else if (type == "set_main_vertical" || type == "set_main_horizontal")
	{
		var t = false;
		if (type == "set_main_vertical") t = true;

		var update_inp = qmv_find_update_tree_value("settings","create","isvertical",t,false,true);
		if (update_inp)
			qmv_evt_update_tree_value(update_inp);
	
	}
	else if (type == "set_sub_vertical" || type == "set_sub_horizontal")
	{
		var t = true;
		if (type == "set_sub_vertical") t = false;

		var update_inp = qmv_find_update_tree_value("settings","create","hsubs",t,false,true);
		if (update_inp)
			qmv_evt_update_tree_value(update_inp);
	
	}
	else if (type == "show_delay")
	{
		 qmv_ask_and_set_value("The show delay sets the amount of time in milliseconds between hovering over a menu item and its child sub menu appearing.<br><br>Show Delay (ms - 1/1000th of a second)",400,250,"settings","create","showdelay");	
	
	}
	else if (type == "hide_delay")
	{
		 qmv_ask_and_set_value("The hide delay sets the amount of time in milliseconds before a sub menu will close after leaving it.<br><br>Hide Delay (ms - 1/1000th of a second)",400,250,"settings","create","hidedelay");	
	
	}
	else if (type=="on_click")
	{

		var inp = qmv_find_update_tree_value("settings","create","onclick","main",false,true);
		if (inp) qmv_evt_update_tree_value(inp);

		qmv_show_build_dialog(inp.getAttribute("dtype"),inp);

	}
	else if (type=="on_mouse_over")
	{

		var inp = qmv_find_update_tree_value("settings","create","onclick",false,false,true);
		if (inp)
			qmv_evt_update_tree_value(inp);


	}	
	else if (type=="quick_color_edits")
	{
		var ta = document.getElementById("qmvtree_color_shortcuts");
		qmv_shortcut_init(ta);
		qmv_display_setbox(ta.idiv,null,true);

	}
	else if (type=="color_schemes")
	{
		qmv_display_setbox(document.getElementById("qmvtree_menu_color_skins").idiv,null,true);

	}
	else if (type=="divider_styles")
	{
		var a = document.getElementById("qmvtree_item_dividers").idiv;
		qmv_display_setbox(a,null,null,true,2);

	}		
	else if (type=="insert_divider")
	{

		qmv_insert_spanitem("divider");
	

	}
	else if (type=="insert_divider_before")
	{

		qmv_insert_spanitem("divider");
	

	}
	else if (type=="insert_divider_after")
	{

		qmv_insert_spanitem("divider",null,null,true);
	

	}
	else if (type=="insert_cbox")
	{

		qmv_insert_spanitem("cbox");
	

	}
	else if (type=="insert_cbox_before")
	{

		qmv_insert_spanitem("cbox");
	

	}
	else if (type=="insert_cbox_after")
	{

		qmv_insert_spanitem("cbox",null,null,true);
	

	}
	else if (type=="remove_divider")
	{
		
		var inp = qmv_find_update_tree_value("individuals","dividers","apply",false,false,true);
		if (inp)
			qmv_evt_update_tree_value(inp);
		

	}		
	else if (type=="title_styles")
	{
		var a = document.getElementById("qmvtree_item_titles").idiv;
		qmv_display_setbox(a,null,null,true,2);

	}
	else if (type=="cbox_styles")
	{
		var a = document.getElementById("qmvtree_content_boxes").idiv;
		qmv_display_setbox(a,null,null,true,2);

	}
	else if (type=="stripe_styles")
	{
		var a = document.getElementById("qmvtree_item_stripes").idiv;
		qmv_display_setbox(a,null,null,true,2);

	}		
	else if (type=="insert_title")
	{
		
		qmv_insert_spanitem("title");
	
	}
	else if (type=="insert_title_before")
	{
		
		qmv_insert_spanitem("title");
	

	}
	else if (type=="insert_title_after")
	{
		
		qmv_insert_spanitem("title",null,null,true);
	

	}
	else if (type=="set_transparent")
	{
		
		qmv.context_input.value = "transparent";
		qmv_evt_update_tree_value(qmv.context_input);
	

	}
	else if (type=="build_click")
	{
		
		qmv_evt_build_button_click(qmv.context_build);
	

	}
	else if (type=="global_dividers")
	{
		qmv_show_dialog("applydividers")
	}
	else if (type=="ritem_apply")
	{

		
		qm_arc("qmrounditem",qmv.cur_item,true);
		qmv_update_all_addons();

	}
	else if (type=="ritem_remove")
	{

		qm_arc("qmrounditem",qmv.cur_item);
		qmv_update_all_addons();
		qmv_ritem_remove_warning()
	}
	else if (type=="item_image")
	{

		var a = document.getElementById("qmvtree_item_extra_settings").getElementsByTagName("A")[0];
		qmv_display_setbox(a,null,null,true);
	}
	else if (type=="show_properties_box")
	{
		qmv_display_setbox(qmv.tree_parent,null,null,true);
	}
	else if (type=="help_index")
	{
		qmv_show_dialog("help-index",null,"help-index.html");
	}
	else if (type=="help_about")
	{
	
		qmv_show_dialog("help-about",null,"help-about.html");
	}
	else if (type=="help_tips")
	{
		qmv_show_dialog("splash");
	}
	else if (type=="specs")
	{
		qmv_show_dialog("specs");
	}
	else if (type=="structure")
	{
		qmv_show_dialog("structure");
	}
	else if (type=="import")
	{
		qmv_show_dialog("import");
	}
	else if (type=="apply_custom_class")
	{
		qmv_show_dialog("apply_custom_class");
	}
	else if (type=="create_rule")
	{
		qmv_add_custom_css_rule();
	}
	else if (type=="stripe_styles")
	{
		
		var a = document.getElementById("qmvtree_item_stripes").getElementsByTagName("A")[0];
		qmv_display_setbox(a,null,null,true);

	}
	else if (type=="global_stripes")
	{

		qmv_show_dialog("applystripes");
	}
	else if (type=="apply_stripe_current_item")
	{
		qm_arc("qmstripe",qmv.cur_item,true);
	}
	else if (type=="remove_stripe_current_item")
	{
		qm_arc("qmstripe",qmv.cur_item);
	}
	else if (type=="forums")
	{
		window.open("http://www.opencube.com/forum/default.asp","_new");
	}
	else if (type=="undo" || type=="redo")
	{

		qmvi_report_undo_redo();
	}
	else if (type.indexOf("grid_")+1)
	{

		var mp = qmv.qmvi_design_panel;
		var dp = document.getElementById("qmvi_grid_display");


		if (type.indexOf("off")+1)
		{

			mp.style.backgroundImage = "";
			dp.innerHTML = "none"

		}
		else if (type.indexOf("small")+1)
		{

			mp.style.backgroundImage = "url("+qmv.base+"images/qmv_v_b_grid_12.gif)";
			dp.innerHTML = "12x12"

		}
		else if (type.indexOf("medium")+1)
		{

			mp.style.backgroundImage = "url("+qmv.base+"images/qmv_v_b_grid_20.gif)";
			dp.innerHTML = "20x20"

		}
		else if (type.indexOf("large")+1)
		{

			mp.style.backgroundImage = "url("+qmv.base+"images/qmv_v_b_grid_48.gif)";
			dp.innerHTML = "48x48"

		}




	}
	else if (type.indexOf("indicator_")+1)
	{
		if (type=="indicator_show")
			qmv_position_pointer(true);

		qmvi_indicator_on_off();

	}
	else if (type=="design_color")
	{

		qmvi_change_design_bg_color();

	}
	else if (type.indexOf("move_")+1)
	{

		if (type=="move_up")
			qmvi_navigate_menu(38,qmv.cur_item);			
		else if (type=="move_down")
			qmvi_navigate_menu(40,qmv.cur_item);
		else if (type=="move_right")
			qmvi_navigate_menu(39,qmv.cur_item);
		else if (type=="move_left")
			qmvi_navigate_menu(37,qmv.cur_item);

	}
	else if (type.indexOf("add_")+1)
	{




		if (type=="add_standard_item")
			qmv_evt_bb_click('add');
		else if (type=="add_title")
			qmv_insert_spanitem("title",null,null,true);
		else if (type=="add_divider")
			qmv_insert_spanitem("divider",null,null,true);
		else if (type=="add_content_box")
			qmv_insert_spanitem("cbox",null,null,true);
		

	}
	else if (type.indexOf("insert_")+1)
	{




		if (type=="insert_standard_item")
			qmv_evt_bb_click('insert');
		else if (type=="add_title")
			qmv_insert_spanitem("title");
		else if (type=="add_divider")
			qmv_insert_spanitem("divider");
		else if (type=="add_content_box")
			qmv_insert_spanitem("cbox");
		

	}



	qmv_hide_context();



	qm_kille(e);
	return false;

}


function qmv_show_context_build_divider()
{

	return '<span style="display:block;margin:2px 4px 6px 2px;font-size:1px;border-color:#999999;border-width:0px 0px 1px 0px;border-style:solid;">&nbsp;</span>';

}


function qmv_update_slide_drop_subs(inp)
{

	var val = qmv_lib_parse_value(inp.value,"bool");
	if (val)
	{
		var gval = qmv_find_update_tree_value("addon","slide_effect","slide_drop_subs_height",null,true,true);
		if (!gval)
		{
			var update_inp = qmv_find_update_tree_value("addon","slide_effect","slide_drop_subs_height",300,false,true);
			if (update_inp)
				qmv_evt_update_tree_value(update_inp);
		}
		


	}

}


function qmv_update_slide_drop_subs_height(inp)
{

	var val = qmv_lib_parse_value(inp.value,"bool");
	if (val)
	{
		var gval = qmv_find_update_tree_value("addon","slide_effect","slide_drop_subs",null,true,true);
		if (!qmv_lib_parse_value(gval,"bool"))
		{
			var update_inp = qmv_find_update_tree_value("addon","slide_effect","slide_drop_subs","true",false,true);
			if (update_inp)
				qmv_evt_update_tree_value(update_inp);
		}
		


	}


}


function qmv_ask_and_set_value(msg,width,def,cat,rule,cname,inp,value)
{

	
	
		
	if (!value)
	{
		var d = qmv_find_update_tree_value(cat,rule,cname,null,true);
		if (d=="") d = def;

		qmv_show_dialog("question-okcancel-input",inp,msg,width,"qmv_ask_and_set_value(null,null,null,'"+cat+"','"+rule+"','"+cname+"',qmd.owner,true)",null,null,d);	

	}
	else
	{
		var val = document.getElementById("qmvi_ok_input").value;
				
		var update_inp = qmv_find_update_tree_value(cat,rule,cname,val,false,true);
		if (update_inp)
			qmv_evt_update_tree_value(update_inp);
		
	}

	
	
		

}

function qmv_display_setbox(anchor,addon_checkbox,is_quick_color,is_individual,open_qty)
{



	var a = document.getElementById("qmvi_setbox");
	

	a.anchor = anchor;
	a.addon_checkbox = addon_checkbox;
	a.is_quick_color = is_quick_color;
	a.is_individual = is_individual;

	var sc = document.getElementById("qmsetbox");
	sc.innerHTML = "";
	

	var atag = anchor;
	if (addon_checkbox) atag = addon_checkbox[qp];

	
		
	var cn = atag.cloneNode(true);
	new_atag = sc.appendChild(cn);
	cn = atag.cdiv.cloneNode(true);
	new_divs = sc.appendChild(cn);
	

	new_atag.mirror = anchor;

	var spans = sc.getElementsByTagName("SPAN");
	for (var i=0;i<spans.length;i++)
	{
		
		if (spans[i].getAttribute("isibullet"))
		{

			spans[i][qp].removeChild(spans[i]);
			i--;
			
		}
	}

	
	var divs = sc.getElementsByTagName("DIV");
	for (var i=0;i<divs.length;i++)
	{
		
		divs[i].id = "";
	}

	

	if (new_atag.getElementsByTagName("INPUT").length)
	{

		var n1 = new_atag.getElementsByTagName("INPUT")[0];
		var a1 = atag.getElementsByTagName("INPUT")[0];
		n1.mirror = a1;

		if (addon_checkbox)
			n1.checked = a1.checked;

	}



	if (is_quick_color)
	{

		new_atag.setboxquickcolor = 1;
		new_divs.id = "qmvtree_color_shortcuts_setbox";
	}

	
	var winp = new_divs.getElementsByTagName("INPUT");
	var tinp = atag.cdiv.getElementsByTagName("INPUT");
	for (var i=0;i<winp.length;i++)
	{
		winp[i].mirror = tinp[i];
		winp[i].prev_value = tinp[i].value;




		winp[i].rule = tinp[i].rule;
		winp[i].origrule = tinp[i].origrule;

		if (is_quick_color) winp[i].setboxquickcolor =1;

	}


	
	qmc_create("setbox",false,0,0,false);


	var atags = sc.getElementsByTagName("A");
	var qty = 1;
	if (open_qty) qty = open_qty;
	var cc = 0;
	for (var i=0;i<atags.length;i++)
	{
			
		if (atags[i].cdiv)
		{
			qm_arc("qmfh",atags[i].cdiv);

			if (cc<qty)
				atags[i].setAttribute("initshow",1);
			else
				atags[i].cdiv.style.display = "none";

			cc++;
		}
		
	}



	qm_vtree_init(true);
	qmv_ibullets_init(true);

	
	qmv_lib_center_element_in_window(a);
	a.style.visibility = "visible";

	qmv_adjust_setbox_shadow(a);	
	

}

function qmv_adjust_setbox_shadow(a)
{
	var shadow = document.getElementById("qmvi_setbox_shadow");

	if (a)
	{
		

		shadow.style.width = a.offsetWidth+"px";
		shadow.style.height = a.offsetHeight+"px";
		shadow.style.top = parseInt(a.style.top)+3+"px";
		shadow.style.left = parseInt(a.style.left)+3+"px";
		shadow.style.visibility = "visible";


	}
	else
	{
		if (shadow.style.visibility=="visible")
		{

			var a = document.getElementById("qmvi_setbox");
			

			shadow.style.width = a.offsetWidth+"px";
			shadow.style.height = a.offsetHeight+"px";
			shadow.style.top = parseInt(a.style.top)+3+"px";
			shadow.style.left = parseInt(a.style.left)+3+"px";

		}	
	}


}


function qmv_setbox_update_addon_check(a)
{

	if (a.mirror)
	{

		a.mirror.checked = a.checked;

	}
	else
	{
		var d = document.getElementById("qmvi_setbox");
		if (d.style.visibility == "visible")
		{
			
			var inps = d.getElementsByTagName("INPUT");
			for (var i = 0;i<inps.length;i++)
			{
				
				if (inps[i].mirror==a)
				{
					
					inps[i].checked = a.checked;


				}
			}


		}


	}




}

function qmv_setbox_update_quick_color()
{


	var sb = document.getElementById("qmvi_setbox");
	var ta = document.getElementById("qmvtree_color_shortcuts_setbox")
	if (ta && sb.style.visibility == "visible")
	{
		qmv_shortcut_init(ta);
		qmv_adjust_setbox_shadow();
	}

}


function qmv_setbox_update_individual()
{

	var sb = document.getElementById("qmvi_setbox");
	if (sb && sb.style.visibility == "visible" && sb.is_individual)
	{
		
		var inp = sb.getElementsByTagName("INPUT");
		for (var i=0;i<inp.length;i++)
		{
			
			inp[i].value = inp[i].mirror.value;
		}
	}


}


function qmv_add_bullet_events(a)
{


	a.oncontextmenu = function(e)
	{
				
		e = e || event;
		qmv_show_context(e,"bullet");

	}
	a.ondblclick = function(e)
	{
				
		e = e || event;
		qmv_context_cmd(e,"addon_item_bullet");

	}

}

function qmv_add_bullet_css_events(a)
{

	
	a.oncontextmenu = function(e)
	{
		e = e || event;
		qmv_show_context(e,"bullet_css");

	}
	a.ondblclick = function(e)
	{
				
		e = e || event;
		qmv_context_cmd(e,"addon_ibcss");

	}

}



function qmv_apsubs(a)
{
	
	
	var wh = qmv_get_doc_wh();
	var sxy =  qmv_get_doc_scrollxy();
	var xy = qmv_get_offset(a);

	var c1 = a.offsetWidth+xy[0];
	var c2 = wh[0]+sxy[0]-10;
	if (c1>c2)
	{
		a.style.left = (parseInt(a.style.left)-(c1-c2))+"px";

		//if (a.hasrcorner) a.hasrcorner.style.left = (parseInt(a.hasrcorner.style.left)-(c1-c2))+"px";
		if (a.hasshadow) a.hasshadow.style.left = (parseInt(a.hasshadow.style.left)-(c1-c2))+"px";
		if (a.hasselectfix) a.hasselectfix.style.left = (parseInt(a.hasselectfix.style.left)-(c1-c2))+"px";

	}
	
	c1 = a.offsetHeight+xy[1];
	c2 = wh[1]+sxy[1];
	if (c1>c2)
	{

		a.style.top = (parseInt(a.style.top)-(c1-c2))+"px";

		//if (a.hasrcorner) a.hasrcorner.style.top = (parseInt(a.hasrcorner.style.top)-(c1-c2))+"px";
		if (a.hasshadow) a.hasshadow.style.top = (parseInt(a.hasshadow.style.top)-(c1-c2))+"px";
		if (a.hasselectfix) a.hasselectfix.style.top = (parseInt(a.hasselectfix.style.top)-(c1-c2))+"px";
	}


}

function qmv_get_offset(obj)
{

	var x = 0;
	var y = 0;

	do
	{
		x += obj.offsetLeft;
		y += obj.offsetTop;	
	
	}
	while (obj = obj.offsetParent)

	return new Array(x,y);

}


function qmv_get_doc_scrollxy()
{

	var sy = 0;
	var sx = 0;
	if ((sd = document.documentElement) && (sd = sd.scrollTop))
		sy = sd;
	else if (sd = document.body.scrollTop)
		sy = sd;	
		
	if ((sd = document.documentElement) && (sd = sd.scrollLeft))
		sx = sd;
	else if (sd = document.body.scrollLeft)
		sx = sd;


	return new Array(sx,sy);


}


function qmv_get_doc_wh()
{	
	

	db = document.body;
	var w=0;
	var h=0;

	if (tval = window.innerHeight)
	{
		h = tval;
		w = window.innerWidth;
		
	}
	else if ((e = document.documentElement) && (e = e.clientHeight))
	{
		
		h = e;
		w = document.documentElement.clientWidth;
		
	}
	else if (e = db.clientHeight)
	{
		if (!h) h = e;
		if (!w) w = db.clientWidth;
	}

	
	return new Array(w,h);

}


function qmvi_gld_none_checked(src)
{

	if (src.checked)
	{

		var tbox = document.getElementById("qmvi_gld_sub");
		tbox.checked = false;


		tbox = document.getElementById("qmvi_gld_main");
		tbox.checked = false;

	}

}

function qmvi_gld_submain_checked(src)
{

	if (src.checked)
	{

		var tbox = document.getElementById("qmvi_gld_none");
		tbox.checked = false;


	}

}

function qmv_gld_init()
{

	var sub = document.getElementById("qmvi_gld_sub");
	var main = document.getElementById("qmvi_gld_main");
	var above = document.getElementById("qmvi_gld_above");
	var below = document.getElementById("qmvi_gld_below");
	var none = document.getElementById("qmvi_gld_none");

	if (qmv.globaldividers_sub)
		sub.checked = true;
	else
		sub.checked = false;

	if (qmv.globaldividers_main)
		main.checked = true;
	else
		main.checked = false;

	if (qmv.globaldividers_above)
		above.checked = true;
	else
		above.checked = false;

	if (qmv.globaldividers_below)
		below.checked = true;
	else
		below.checked = false;

	if (qmv.globaldividers_none)
		none.checked = true;
	else
		none.checked = false;


}


function qmv_gld_apply_dividers()
{

	qmv_hide_pointer("qm"+qmv.id);

	var sub = document.getElementById("qmvi_gld_sub").checked;
	var main = document.getElementById("qmvi_gld_main").checked;
	var above = document.getElementById("qmvi_gld_above").checked;
	var below = document.getElementById("qmvi_gld_below").checked;
	var none = document.getElementById("qmvi_gld_none").checked;	

	qmv.globaldividers_sub = sub;
	qmv.globaldividers_main = main;
	qmv.globaldividers_above = above;
	qmv.globaldividers_below = below;
	qmv.globaldividers_none = none;


	var m = document.getElementById("qm"+qmv.id);

	if (qmv.cur_item.className.indexOf("qmdivider")+1)
		qm_oo(new Object(),m.getElementsByTagName("A")[0],false);

	var sp = m.getElementsByTagName("SPAN");
	for (var i=0;i<sp.length;i++)
	{

		if (sp[i].className.indexOf("qmdivider")+1)
		{
			sp[i].parentNode.removeChild(sp[i]);
			i--;
		}

	}
	
	
	qmv_gld_apply_dividers2(m,sub,main,above,below);


	qmv_update_all_addons();


	if (main || sub)
		qmv_context_cmd(new Object(),'divider_styles');



}


function qmv_gld_apply_dividers2(m,sub,main,above,below,is_sub)
{


	var ch = m.childNodes
	var is_first = true;
	var cura;

	for (var i=0;i<ch.length;i++)
	{



		if (ch[i].tagName=="A")
		{
			cura = ch[i];
			if (!is_sub)
			{

				if (main)
				{

					if ((above && is_first) || !is_first)
					{
						qmv_insert_spanitem("divider",ch[i],true,null,true);
						i++;
					}

				}

			}			
			else
			{

				if (sub)
				{

					if ((above && is_first) || !is_first)
					{
						
						qmv_insert_spanitem("divider",ch[i],true,null,true);
						i++;
					}

				}

			}


			is_first = false;

		}


		if (ch[i].tagName=="DIV")
		{


			new qmv_gld_apply_dividers2(ch[i],sub,main,above,below,true);

		}


	}


	if (below && cura)
	{
		
		if ((!is_sub && main) || (is_sub && sub))
			qmv_insert_spanitem("divider",cura,true,true,true);



	}


}


function qmv_ritem_underlying_styles(isyes,type)
{
	
	if (!isyes)
	{
		
		
		qmv_show_dialog("question-yesno",null,"Rounded items sit on top of the menus standard items. Some of the features of the standard items may bleed through if your rounded items are transparent or sized smaller than their standard items.<br><br>Use the standard item padding to tweak rounded sub menu items and the sub menu positioning relative to main items.<br><br>Some standard item style options are used to change the look of rounded items. These include text color, and text decoration for static, hover and active groups.<br><br>Click yes to display the standard item styles properties box, or adjust settings using the 'CSS Filters' or 'CSS Styles' options in the tree.<br><br>Would you like to display the standard item styles?",500,"qmv_ritem_underlying_styles(true,'"+type+"')");	
		
		
		
	}
	else
	{
		

		if (type=="main")
		{
			var a = qmv_find_rule_atag("#qm[i] a")
			qmv_display_setbox(a[qp].idiv,null,null,true,2);
		}
		else
		{
			var a = qmv_find_rule_atag("#qm[i] div a")
			qmv_display_setbox(a[qp].idiv,null,null,true,2);

		}

	}		
	

}



function qmv_find_rule_atag(rule)
{

	var a = document.getElementById("qmvtree");
	var d = a.getElementsByTagName("DIV");

	for (var i=0;i<d.length;i++)
	{
		if (d[i].getAttribute("rule") == rule)
		{

			return d[i].idiv;

		}

	}


}

function qmv_ritem_remove_main_styles(type)
{

	if (type=="main")
	{

		var inp;
		inp = qmv_find_update_tree_value("css","#qm[i] a","borderStyle","none",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] a","backgroundColor","",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		

	}
	else if (type=="sub")
	{

		var inp;
		inp = qmv_find_update_tree_value("css","#qm[i] div a","borderStyle","none",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

		inp = qmv_find_update_tree_value("css","#qm[i] div a","backgroundColor","",false,true);
		qmv_evt_update_tree_value(inp,null,null,null,null,null,true);

	}




}

function qmv_ritem_remove_warning()
{
	qmv_show_dialog("alert",null,"Note: Depending on how your rounded corners are applied (see the 'apply' setting within the add-ons options) the current item may not be removable.",600);

}


function qmv_specs_get_addon_html()
{

	var rt= "";
	var tally = 0;
		

	var adds = new Object();

	var j;
	var got_one = false;
	for (var q=0;q<10;q++)
	{
		
		for (j in qmv.addons)
		{
			if (qmv.addons[j]["on"+q])
			{
				got_one = true;
				adds[j] = 1;
			}
		}
	}


	

	
	if (got_one)
	{

		for (j in adds)
		{
			
			var ao;
			if (ao = qmv.addons[j])
			{
				var s = qmv_lib_get_kilobytes(ao.code.length,true);
				tally += parseFloat(s);
	
				rt += '<tr>';

				rt += '<td style="vertical-align:top;color:#444444;width:100%;">Add-on: '+ao.desc+':</td>'
				rt += '<td><div style="font-size:1px;width:15px;"></div></td>'
				rt += '<td style="color:#222222;width:50px;text-align:right;vertical-align:top;padding-bottom:2px;white-space:nowrap" nowrap>'+s+'</td>'


				rt += '</tr>';
	
			}
				
		}

	}
	


	
	


	return new Array(rt,tally);


}


function qmv_lib_get_kilobytes(num,limited)
{
	
	bytes = num+"";
	if (bytes.length>3)
	{
		p1 = bytes.substring(0,bytes.length-3);
		p2 = bytes.substring(bytes.length-3);

		bytes = p1+","+p2;
	}
	else
		p2 = num;

	
	num = Math.round((num/1024)*10)/10;
	
	if ((num+"").indexOf(".")==-1)
		num = num+"."+0;


	if (limited)
		return num+" KB";
	else
		return num+" KB  &nbsp;("+bytes+" bytes)";

}




function qmv_warn_external_pure(a)
{

	
	if (document.getElementById(a).checked)
		qmv_show_dialog("alert",null,"External menu structures are scripted and should not be combined with the 'Pure CSS' HTML structure type.<br><br>To use the pure css structure with an external file for delivery to multiple pages, use a server side include.  To do this publish the structure using the 'In Page' option and manually copy and paste the data to your documents include file.",500)
	


}


function qmv_html_structure_help()
{

	
	qmv_show_dialog("help-structure_type.html",null,"help-structure_type.html");
	


}



function qmv_import_menu()
{


	var mc = document.getElementById("qmvi_import_stucture_content");

	if (mc.value)
	{


		var a = document.createElement("DIV");
		a.innerHTML = mc.value;		
		var ul = a.getElementsByTagName("UL")[0];

		if (ul)
		{
			var menu = qmv_import_convert(ul);

			menu.removeAttribute("qmpure");
			menu.className = "qmmc";
			
			qmv_show_dialog("import_where",menu,'true',null,null,null,null,null,true);
		}

	}
	else
	{
		qmv_show_dialog("alert",null,"First paste the ul / li structure you wish to import.",400);
		return false;		
	}


	return true;

}



function qmv_import_convert(sd)
{
			
	var nd = document.createElement("DIV");
	nd.qmpure = 1;
	qmv_import_convert2(sd,nd);

	var csp = document.createElement("SPAN");
	csp.className = "qmclear";
	csp.innerHTML = "&nbsp;";
	nd.appendChild(csp);

	nd = sd[qp].insertBefore(nd,sd);
	sd[qp].removeChild(sd);
	sd = nd;

	return sd;
}


function qmv_import_convert2(a,bm,l)
{

	if (!l)
	{		
		bm.className = a.className;
		bm.id = a.id;
	}

	var ch = a.childNodes;
	for (var i=0;i<ch.length;i++)
	{

		if (ch[i].tagName=="LI" && ch[i].className!="qmclear")
		{
			var sh = ch[i].childNodes;
			var gota = false;
			for (var j=0;j<sh.length;j++)
			{

				if (sh[j] && (sh[j].tagName=="A" || sh[j].tagName=="SPAN"))
				{
					gota = true;

					var ra = ch[i].removeChild(sh[j]);
					var ras = ra.getElementsByTagName("SPAN");
					for (var k=0;k<ras.length;k++)
					{
						if (ras[k].className.indexOf("imea")+1)
							ra.removeChild(ras[k]);
					}

					bm.appendChild(ra);
				}
			
			}


			if (!gota)
			{
				
				var newa = document.createElement("A");
				newa.innerHTML = "New Text";
				newa.setAttribute("href","javascript:void(0);");
				bm.appendChild(newa);
			}


			var hu;
			if (hu = ch[i].getElementsByTagName("UL")[0])
			{
					
				var na = document.createElement("DIV");
				na = bm.appendChild(na);
				new  qmv_import_convert2(hu,na,true)

			}	
			

		}		


	}


}



function qmv_add_custom_css_rule()
{

	//qmvtree_custom_rules
	qmv_show_dialog("custom_rule")


}


function qmv_load_custom_styles_to_tree()
{
	
	var n = document.getElementById("qmvtree_custom_rules");

	var nc = n.childNodes;
	var isf = 0;
	for (var i=0;i<nc.length;i++)
	{
		if (nc[i] && (nc[i].tagName=="A" || nc[i].tagName=="DIV"))
		{
			if (isf<1)
			{
				isf++;
				continue;
			}

			
			n.removeChild(nc[i]);
			i--;
		}

	}
	


	var rules = qmv.style_rules;
	for (var i=0;i<rules.length;i++)
	{

		var st = rules[i].selectorText.toLowerCase();
		if (st.indexOf("div.qmmc")+1 || st.indexOf("div#qm"+qmv.id)+1 || st.indexOf("ul.qmmc")+1 || st.indexOf("ul#qm"+qmv.id)+1)
		{	
			var sr = st.replace("qm"+qmv.id,"qm[i]");
			sr = sr.replace("qm"+qmv.id,"qm[i]");

			var sp_r = sr.split(",")[0];
			qmv_tree_create_new_node("container",n,sp_r,"Rule <span class='qmvtree-rule'>["+qmv_rule_truncate(st,20)+"]</span>",sr);
		}
	}


	qmv_update_tree_after_load(n);
	

	for (var i=0;i<rules.length;i++)
	{

		var st = rules[i].selectorText.toLowerCase();
		if (st.indexOf("div.qmmc")+1 || st.indexOf("div#qm"+qmv.id)+1 || st.indexOf("ul.qmmc")+1 || st.indexOf("ul#qm"+qmv.id)+1)
		{	
			
			qmv_load_styles_to_tree_node(rules[i],st,null,n.getElementsByTagName("DIV"));
		
		}

	}
	

}

function qmv_tree_create_new_node(type,p,rule,desc,orig_rule)
{


	var anc = document.createElement("A");
	anc.setAttribute("href","javascript:void(0);");
	anc.innerHTML = desc+'<span onclick="qmv_custom_rule_edit(event,this)" style="padding-left:10px;font-size:11px;color:#dd3300;">[edit]</span><span onclick="qmv_custom_rule_delete(event,this)" style="padding-left:5px;font-size:11px;color:#dd3300;">[x]</span>';
			
	var div = document.createElement("DIV");
	div.setAttribute("rule",rule);
	div.setAttribute("orule",orig_rule);
	div.ismaster = 1;
	var wt = "";

	if (type=="container")
	{
				
		wt += qmv_init_interface_tree_bracket(true);
		wt += qmv_init_interface_tree_item('width','width','width','css','unit',null,'x<0');
		wt += qmv_init_interface_tree_item('height','height','height','css','unit',null,'x<0');
		wt += qmv_init_interface_tree_item('display','display','display','css','display',null);
		wt += qmv_init_interface_tree_item(null,'padding','padding','css','edge-padding',null,'x<0');
		wt += qmv_init_interface_tree_item(null,'margin','margin','css','edge-margin',null,null);
		wt += qmv_init_interface_tree_item(null,'outline','outline','css','zoom',null,null);
			
		wt += '<a href="#" style="margin-top:6px;">Background Styles</a>'
			wt+='<div orule = "+orig_rule+" rule="'+rule+'">';
			wt += qmv_init_interface_tree_item('bg-color','background-color','backgroundColor','css','color',null,null);
			wt += qmv_init_interface_tree_item('bg-image','background-image','backgroundImage','css','styleimage',null,null);
			wt += qmv_init_interface_tree_item('bg-repeat','background-repeat','backgroundRepeat','css','styleimagerepeat',null,null);
			wt += qmv_init_interface_tree_item('bg-position','background-position','backgroundPosition','css','styleimageposition',null,null);
			wt+='</div>';

		wt += '<a href="#">Font Styles</a>'
			wt+='<div orule = "+orig_rule+" rule="'+rule+'">';
			wt += qmv_init_interface_tree_item('color','color','color','css','color',null,null);
			wt += qmv_init_interface_tree_item('family','font-family','fontFamily','css','fontfamily',null,null);
			wt += qmv_init_interface_tree_item('size','font-size','fontSize','css','unit',null,'x<0');
			wt += qmv_init_interface_tree_item('decoration','text-decoration','textDecoration','css','textdecoration',null,null);
			wt += qmv_init_interface_tree_item('style','font-style','fontStyle','css','fontstyle',null,null);
			wt += qmv_init_interface_tree_item('weight','font-weight','fontWeight','css','fontweight',null,null);
			wt += qmv_init_interface_tree_item('align','text-align','textAlign','css','textalign',null,null);
			wt += qmv_init_interface_tree_item('variant','font-variant','fontVariant','css','font-variant');
			wt += qmv_init_interface_tree_item('line height','line-height','lineHeight','css','unit',null,'x<0');

			wt+='</div>';

		wt += '<a href="#">Border Styles</a>'
			wt+='<div orule = "+orig_rule+" rule="'+rule+'">';
			wt += qmv_init_interface_tree_item(null,'border-width','borderWidth','css','edge-borderwidth',null,'x<0');
			wt += qmv_init_interface_tree_item(null,'border-style','borderStyle','css','borderstyle',null,null);
			wt += qmv_init_interface_tree_item(null,'border-color','borderColor','css','color',null,null);
			wt+='</div>';

		wt += qmv_init_interface_tree_bracket();

	}


	div.innerHTML = wt;
	
	anc = p.appendChild(anc);
	div = p.appendChild(div);


	return anc;
}

function qmv_custom_rule_dialog_content()
{

	var ih = "";

	ih += '<div style="padding:10px;">';


		ih += '<div style="padding:0px 4px 0px 4px;">';
		ih += '<table cellpadding=0 cellspacing=0 border=0 style="width:100%;">';
			ih += '<tr>';

				ih += '<td style="white-space:nowrap;">Predefined Rules: </td>';
				ih += '<td><div style="width:10px;">&nbsp;</div></td>';
				ih += '<td style="width:100%;"><select onchange="qmv_apply_pre_defined_rule(event,this)" id="qmvccc_pre_defined" style="width:100%;">';

					ih += '<option value="">Choose Predefined Rule...</option>';
					ih += '<option value="div#qm[i] div div">Sub Containers [Level 2]</option>';
					ih += '<option value="div#qm[i] div div div">Sub Containers [Level 3]</option>';
					ih += '<option value="div#qm[i] div div div div">Sub Containers [Level 4]</option>';
					ih += '<option value="div#qm[i] div div a">Sub Items [Level 2]</option>';
					ih += '<option value="div#qm[i] div div div a">Sub Items [Level 3]</option>';
					ih += '<option value="div#qm[i] div div div div a">Sub Items [Level 4]</option>';
					ih += '<option value="div#qm[i] .qmc_mystatic">Custom Class Name [global static]</option>';
					ih += '<option value="div#qm[i] .qmc_myhover:hover">Custom Class Name [global hover]</option>';
					ih += '<option value="div#qm[i] .qmc_myactive.qmactive">Custom Class Name [global active]</option>';
					ih += '<option value="div#qm[i] .qmc_myparent.qmparent">Custom Class Name [global parent]</option>';


				ih += '</select></td>';

			ih += '</tr>';
		ih += '</table>';
		ih += '</div>';
		
		
		ih += '<div style="font-size:1px;height:30px;"></div>';
		

		ih += '<div style="padding:0px 4px 0px 4px;">';
		ih += '<table cellpadding=0 cellspacing=0 border=0 style="width:100%;">';
			ih += '<tr>';

				ih += '<td style="vertical-align:top;width:33%;">';

					ih += '<div class="qmvi-publish-title">Menu Group</div>';
					ih += '<div style="margin-top:10px;">';
					ih += '<table cellpadding=0 cellspacing=0 border=0>';


						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result()" id="qmvccc_menu_group_items" name="qmvccc_menu_group" type="radio" checked></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Items</td>';
						ih += '</tr>';

						ih += '<tr>';
						ih += '<td><input onclick="this.checked=true;qmv_display_rule_result()" id="qmvccc_menu_group_container" name="qmvccc_menu_group" type="radio"></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Containers</td>';
						ih += '</tr>';

						
						ih += '<tr>';
						ih += '<td><input onclick="this.checked=true;qmv_display_rule_result()" id="qmvccc_menu_group_spans" name="qmvccc_menu_group" type="radio"></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Spans</td>';
						ih += '</tr>';

					ih += '</table>';
					ih += '</div>';

				ih += '</td>';


				ih += '<td><div style="width:25px;">&nbsp;</div></td>';

				ih += '<td style="vertical-align:top;width:33%;">';

					ih += '<div class="qmvi-publish-title">Additional Selector</div>';
					ih += '<div style="margin-top:10px;">';
					ih += '<table cellpadding=0 cellspacing=0 border=0>';

						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result()" id="qmvccc_menu_add_none" name="qmvccc_menu_add" type="radio" checked></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">None</td>';
						ih += '</tr>';


						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result()" id="qmvccc_menu_add_items" name="qmvccc_menu_add" type="radio"></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Items</td>';
						ih += '</tr>';

						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result()" id="qmvccc_menu_add_containers" name="qmvccc_menu_add" type="radio"></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Containers</td>';
						ih += '</tr>';

						
						


					ih += '</table>';
					ih += '</div>';

				ih += '</td>';;


				ih += '<td><div style="width:25px;">&nbsp;</div></td>';

				ih += '<td style="vertical-align:top;width:33%;">';

					ih += '<div class="qmvi-publish-title">Menu Types</div>';
					ih += '<div style="margin-top:10px;">';
					ih += '<table cellpadding=0 cellspacing=0 border=0>';

						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result()" id="qmvccc_menu_type_both" name="qmvccc_menu_type" type="radio" checked></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">All</td>';
						ih += '</tr>';


						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result();qmv_warn_pure()" id="qmvccc_menu_type_pure" name="qmvccc_menu_type" type="radio"></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Pure CSS</td>';
						ih += '</tr>';

						ih += '<tr>';
						ih += '<td><input onclick="qmv_display_rule_result()" id="qmvccc_menu_type_hybrid" name="qmvccc_menu_type" type="radio"></td>';
						ih += '<td><div style="width:6px;">&nbsp;</div></td>';
						ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">Hybrid</td>';
						ih += '</tr>';

						


					ih += '</table>';
					ih += '</div>';

				ih += '</td>';;



			ih += '</tr>';
		ih += '</table>';
		ih += '</div>';


		ih += '<div style="font-size:1px;height:30px;"></div>';
		

		ih += '<div style="padding:0px 4px 0px 4px;">';
		ih += '<table cellpadding=0 cellspacing=0 border=0 style="">';
			ih += '<tr>';

				ih += '<td style="vertical-align:top;width:33%;">';

					ih += '<div class="qmvi-publish-title">Menu Level</div>';
					ih += '<div style="margin-top:10px;">';
					ih += '<table cellpadding=0 cellspacing=0 border=0  style="width:100%;">';

						
						ih += '<tr>';
						ih += '<td><select onchange="qmv_display_rule_result()" id="qmvccc_sub_level" style="width:100%;">';

							ih += '<option value=0>Main Menu+</option>';
							ih += '<option value=1>Sub Level 1+</option>';
							ih += '<option value=2>Sub Level 2+</option>';
							ih += '<option value=3>Sub Level 3+</option>';
							ih += '<option value=4>Sub Level 4+</option>';
							ih += '<option value=5>Sub Level 5+</option>';
							ih += '<option value=6>Sub Level 6+</option>';
							ih += '<option value=7>Sub Level 7+</option>';
							ih += '<option value=8>Sub Level 8+</option>';
							ih += '<option value=9>Sub Level 9+</option>';

						ih += '</select></td>';
						ih += '</tr>';


					ih += '</table>';
					ih += '</div>';

				ih += '</td>';


				ih += '<td><div style="width:25px;">&nbsp;</div></td>';

				ih += '<td style="vertical-align:top;width:33%;">';

					ih += '<div class="qmvi-publish-title">Target</div>';
					ih += '<div style="margin-top:10px;">';
					ih += '<table cellpadding=0 cellspacing=0 border=0  style="width:100%;">';

						ih += '<tr>';
						ih += '<td><select onchange="qmv_display_rule_result()" id="qmvccc_target" style="width:100%;">';

							ih += '<option value="static">Static Menu</option>';
							ih += '<option value=":hover">Hover</option>';
							ih += '<option value="">&nbsp</option>';	
							ih += '<option value="">---- [specific] ----</option>';	
							ih += '<option value=".qmactive">Active</option>';
							ih += '<option value=".qmparent">Parent</option>';
							ih += '<option value=".qmdivider">Dividers</option>';
							ih += '<option value=".qmtitle">Titles</option>';
							ih += '<option value="">&nbsp</option>';	
							ih += '<option value="">---- [global] ----</option>';
							ih += '<option value=" .qmactive">Active</option>';
							ih += '<option value=" .qmparent">Parent</option>';
							ih += '<option value=" .qmdivider">Dividers</option>';
							ih += '<option value=" .qmtitle">Titles</option>';

						ih += '</select></td>';
						ih += '</tr>';

					ih += '</table>';
					ih += '</div>';

				ih += '</td>';;


				ih += '<td><div style="width:25px;">&nbsp;</div></td>';

				ih += '<td style="vertical-align:top;width:33%;">';

					ih += '<div class="qmvi-publish-title">Custom Class Name</div>';
					ih += '<div style="margin-top:10px;">';
					ih += '<table cellpadding=0 cellspacing=0 border=0  style="width:100%;">';

						ih += '<tr>';
						ih += '<td><input onkeypress="if (event.keyCode==13){qmv_display_rule_result();qm_kille(event);return false}" onchange="qmv_display_rule_result()" id="qmvccc_custom_class_name" type="text" style="width:95%;"></input></td>';
						ih += '</tr>';

					ih += '</table>';
					ih += '</div>';

				ih += '</td>';



			ih += '</tr>';
		ih += '</table>';
		ih += '</div>';


		ih += '<div style="margin-top:20px;margin-bottom:-5px;padding:0px 4px 0px 6px;">';
			ih += '<table cellpadding=0 cellspacing=0 border=0  style="width:100%;">';

			ih += '<tr>';
			ih += '<td class="qmvi-common qmvi-dialog-input-title" style="white-space:nowrap;">Rule:</td>';
			ih += '<td><div style="width:6px;">&nbsp;</div></td>';
			ih += '<td id="qmvccc_rule_result" class="qmvi-common qmvi-dialog-input-title" style="width:100%;color:#0033bb"></td>';
			ih += '</tr>';

		ih += '</table>';
		ih += '</div>';


	ih += '</div>';


	return ih;

}


function qmv_custom_rule_build(get_display,uobj)
{

	var brule = "";
	var brule_p = "";
	var brule_h = "";

	
	var group = "items";
	var add = "";
	var type_pure = true;
	var type_hybrid = true;
	var target = 'static';
	var sub_level = 0;
	var class_name = "";

	if (document.getElementById("qmvccc_menu_group_container").checked)
		group = "container";

	if (document.getElementById("qmvccc_menu_group_spans").checked)
		group = "spans";
		
	if (document.getElementById("qmvccc_menu_add_items").checked)
		add = " a";

	if (document.getElementById("qmvccc_menu_add_containers").checked)
		add = " div";


	if (!document.getElementById("qmvccc_menu_type_pure").checked)
		 type_pure = false;

	if (!document.getElementById("qmvccc_menu_type_hybrid").checked)
		 type_hybrid = false;
	
	if (document.getElementById("qmvccc_menu_type_both").checked)
	{
		 type_pure = true;
		 type_hybrid = true;
	}


	var o_custname = document.getElementById("qmvccc_custom_class_name");
	o_custname.value = o_custname.value.replace(/ /g,"");
	

	sub_level = document.getElementById("qmvccc_sub_level").value;
	target = document.getElementById("qmvccc_target").value;
	class_name = o_custname.value;


	


			
	if (target==".qmdivider" || target==".qmtitle")
	{
		document.getElementById("qmvccc_menu_group_container").checked = true;
		group = "container";
	}


		
	brule_h += "div#qm"+qmv.id;
	

	var ig = "";
	for (var i=0;i<=sub_level;i++)
	{
		if (group!="items" && group!="spans" && i==sub_level)
			break;
		

		if (group=="items" && i==sub_level)
			ig+=" a";
		else if (group=="spans" && i==sub_level)
			ig+=" span";
		else
			ig+=" div";



	}
	brule_h += ig;



	if (class_name)
	{

		class_name = class_name.replace(".","");
		document.getElementById("qmvccc_custom_class_name").value = class_name;

		if (ig)
			class_name = ".qmc_"+class_name;
		else
			class_name = " .qmc_"+class_name;

		brule_h+=class_name;


		if ((target.indexOf(".")+1) && (target.indexOf(" .")==-1) && get_display)
			qmv_show_dialog("alert",null,"This multiple class targeted rule (example: .qmc_myclass.qmparent) is not compatible with IE6 (IE7 and other browsers are compatible) and will not display as intended in this browser.  Alter your target setting to tweek for IE6 compatibility.",600);
	}


	brule_h += add;
	
	
	
	if (target.indexOf(".")+1)
		brule_h+=target;
	else if (target.indexOf(":")==0)
		brule_h+=target;
	
	


	brule_p = brule_h.replace(/div/g,"ul");


	if (type_hybrid)
		brule += brule_h;

	if (type_pure && type_hybrid)
		brule += ", ";

	if (type_pure)
		brule += brule_p;		




	if (get_display)
		return brule;



	var rules = qmv.style_rules;
	for (var i=0;i<rules.length;i++)
	{
			
		var st = rules[i].selectorText.toLowerCase().split(",")[0];
		if (st==brule)
		{	
			
			qmv_show_dialog("alert",null,"This rule already exists. Duplicate rules may not be added, instead use the existing rule to customize your styles.",400);	
			return;
		}
	}




	if (!uobj)
	{
		
		
		var n = document.getElementById("qmvtree_custom_rules");
		var sr = brule_h.replace("qm"+qmv.id,"qm[i]");

		var or = brule.replace("qm"+qmv.id,"qm[i]");
		or = or.replace("qm"+qmv.id,"qm[i]");

		var anc = qmv_tree_create_new_node("container",n,sr,"Rule <span class='qmvtree-rule'>["+qmv_rule_truncate(brule,20)+"]</span>",or);

		qmv_update_tree_after_load(n);
		qmv_load_styles_to_tree_node(null,brule,true,n.getElementsByTagName("DIV"),true);


		qmv_display_setbox(anc);

		return true;
		

	}
	else
	{

		//update the existing rule obj here
		var sr = uobj.getAttribute('rule');
		sr = sr.replace("qm[i]","qm"+qmv.id);

		
		var rules = qmv.style_rules;
		for (var i=0;i<rules.length;i++)
		{

			var st = rules[i].selectorText.toLowerCase().split(",")[0];
			if (st==sr)
			{	
				
				
				qmv_lib_update_add_rule_styles(qmv.styles,qmv.style_rules,brule_h,rules[i].style.cssText);
				qmv_lib_update_remove_rule(qmv.styles,qmv.style_rules,st);

				break;
				
			}
		}

		var ssr = brule_h.replace("qm"+qmv.id,"qm[i]");
		var oor = brule.replace(/"qm"+qmv.id/g,"qm[i]");

		uobj.setAttribute("rule",ssr);
		uobj.setAttribute("orule",oor);
		var spans = uobj.idiv.getElementsByTagName("SPAN");
		for (var i=0;i<spans.length;i++)
		{
			if (spans[i].className.indexOf("qmvtree-rule")+1)
				spans[i].innerHTML = "["+qmv_rule_truncate(brule,20)+"]";

		}
		
		

		var dd = uobj.getElementsByTagName("DIV");
		for (var i=0;i<dd.length;i++)
		{
			dd[i].setAttribute("rule",ssr);
			dd[i].setAttribute("orule",oor);
		}


		var inps = uobj.getElementsByTagName("INPUT");
		for (var i=0;i<inps.length;i++)
		{
			inps[i].rule = brule_h;
		}


		qmv_display_setbox(uobj.idiv);

		qmv_set_all_subs_to_default_position(true,qmad.br_ie);
		qmv_update_all_addons();
		qmv_position_pointer();
		

		return true;

	}

	

}

function qmv_apply_pre_defined_rule(e,a)
{

	var rule = a.value.replace("qm[i]","qm"+qmv.id);
	rule = rule+", "+rule.replace(/div/g,"ul");

	if (rule)
		qmv_custom_rule_parse_rule(rule);


}


function qmv_custom_rule_parse_rule(rule)
{
	

	var o_container = document.getElementById("qmvccc_menu_group_container");
	var o_item = document.getElementById("qmvccc_menu_group_items");
	var o_span = document.getElementById("qmvccc_menu_group_spans");

	var o_both = document.getElementById("qmvccc_menu_type_both");
	var o_pure = document.getElementById("qmvccc_menu_type_pure");
	var o_hybrid = document.getElementById("qmvccc_menu_type_hybrid");

	var o_level = document.getElementById("qmvccc_sub_level");
	var o_target = document.getElementById("qmvccc_target");
	var o_custname = document.getElementById("qmvccc_custom_class_name");
	
	var o_additems = document.getElementById("qmvccc_menu_add_items");
	var o_addcontainers = document.getElementById("qmvccc_menu_add_containers");
	var o_addnone = document.getElementById("qmvccc_menu_add_none");

	var o_pre = document.getElementById("qmvccc_pre_defined");
	
	

	if ((rule.indexOf("div#qm")+1) && (rule.indexOf("ul#qm")+1))
	{
		o_both.checked = true;

	}
	else		
	{
		if (rule.indexOf("div#qm")+1)
			o_hybrid.checked = true;

		if (rule.indexOf("ul#qm")+1)
			o_pure.checked = true;
	
	}

	var wrule = rule.split(",")[0];


	var ops = o_pre.getElementsByTagName("OPTION");
	for (var i=0;i<ops.length;i++)
	{
		
		var tpr = ops[i].value;
		if (tpr==wrule)
		{
			ops[i].selected = true;
		}

	}

	o_addnone.checked = true;

	var d1 = 0;
	var a1 = 0;
	var s1 = 0;
	var add = "";

	var phase1 = true;
	var got_cust_name;

	var pt = wrule.split(" ");
	for (var i=1;i<pt.length;i++)
	{
		pt[i].replace(/ /g,'');
		if (pt[i])
		{
			
			if (phase1)
			{
				var go = false;
				if (pt[i].indexOf("div")==0)
				{
					d1++;
						
					if (pt[i]=="div")
						go = true;
				}

				if (pt[i].indexOf("a")==0)
				{

					a1++;
	
					if (pt[i]=="a")
						go = true;
				}
		
				if (pt[i].indexOf("span")==0)
				{
					s1++;

					if (pt[i]=="span")
						go = true;

				}


				
				if (!go)
					phase1 = false;

				

			}
			else
			{
				
				if (pt[i].indexOf("div")==0)
				{
					o_addcontainers.checked = true;
				}
				else if (pt[i].indexOf("a")==0)
				{
					
					o_additems.checked = true;
				}
				
					
				


			}

		}

		var cp = 0;
		if ((cp = pt[i].indexOf(".qmc_"))>-1)
		{

			pt[i] = pt[i].substring(cp+5);

			if (pt[i].indexOf(":")+1)
				pt[i] = pt[i].substring(0,pt[i].indexOf(":"))

			if (pt[i].indexOf(".")+1)
				pt[i] = pt[i].substring(0,pt[i].indexOf("."))


			got_cust_name = true;
			o_custname.value = pt[i];
		}


	}


	if (!got_cust_name)
		o_custname.value = "";
	
	o_container.checked = true;
	if (a1) o_item.checked = true;
	if (s1) o_span.checked = true;



	o_level.value = d1;


	var vl_ar = new Array(":hover",".qmactive",".qmparent",".qmtitle",".qmdivider"," .qmactive"," .qmparent"," .qmtitle"," .qmdivider");
	var ft;
	for (var i=0;i<vl_ar.length;i++)
	{
		
		if (wrule.indexOf(vl_ar[i])+1)
		{
			ft = true;
			o_target.value = vl_ar[i];
			
		}
	}

	if (!ft) o_target.value = "static";		

		
	
	qmv_display_rule_result();

}



function qmv_display_rule_result()
{

	var rs = qmv_custom_rule_build(true);
	if (!rs) rs = "";

	document.getElementById("qmvccc_rule_result").innerHTML = rs+" {}";


}


function qmv_rule_truncate(t,len)
{
	if (t.length>len)
		return t.substring(0,len-3)+"...";

	return t;

}


function qmv_custom_rule_edit(e,a)
{
	e = e || event;

	if (a[qp].mirror) a = a[qp].mirror.getElementsByTagName("SPAN")[0];

	var or = a[qp].cdiv.getAttribute("orule");
	qmv_show_dialog("custom_rule",a[qp].cdiv,null,null,null,null,null,or)


	qm_kille(e);
	return false;
}


function qmv_custom_rule_delete(e,a,obj)
{
	var close_setbox;

	var atag;
	if (obj)
		atag = obj;
	else
	{
		if (a[qp].mirror)
		{
			a = a[qp].mirror.getElementsByTagName("SPAN")[0];
			close_setbox = true;
		}

		atag = a[qp];
	}

	var rule = atag.cdiv.getAttribute('rule');
	rule = rule.replace("qm[i]","qm"+qmv.id);
	
	qmv_lib_update_remove_rule(qmv.styles,qmv.style_rules,rule);



	var inps = atag.cdiv.getElementsByTagName("INPUT");
	for (var i=0;i<inps.length;i++)
	{
		inps[i][qp].removeChild(inps[i]);

	}

	atag.cdiv[qp].removeChild(atag.cdiv);
	atag[qp].removeChild(atag);
	
	

	qmv_update_tree_after_load(document.getElementById("qmvtree_custom_rules"));


	qmv_set_all_subs_to_default_position(true,qmad.br_ie);
	qmv_update_all_addons();
	qmv_position_pointer();

	if (close_setbox)
		qmv_hide_dialog(false,false,true);


}


function qmv_update_tree_after_load(n)
{

	//old or new version
	if (window.qmv_a)				
		qm_create(n,false,0,0,false,null,null,null,null,null,2);
	else
		qm_create(n,false,0,0,false,null,null,null,null,2);

	if (qmv.loaded)
	{
		qm_vtree_init_items(n,true);
		qmv_ibullets_init_items(n);
	}

}


function qmv_warn_pure()
{


	qmv_show_dialog("alert",null,"Pure CSS styles are only visible when running a pure css menu type without JavaScript. Save and view your menu with JavaScript disabled in the browser to see your style settings for this rule.",500);
	

}

function qmv_custom_class_get_list()
{

	var rar = new Object();
	var count = 0;

	var rules = qmv.style_rules;
	for (var i=0;i<rules.length;i++)
	{
		
		var st = rules[i].selectorText.toLowerCase();
		var loc;
		if (((loc = st.indexOf(".qmc_"))+1) && (!qmad.br_ie || (st.indexOf("ul#qm")==-1)))
		{	
			

			rar["a"+count] = new Object();
			rar["a"+count].rule = st;

			var cn = st.substring(loc+5);
			if ((loc = cn.indexOf(" "))+1)
				cn = cn.substring(0,loc)

			if ((loc = cn.indexOf(":"))+1)
				cn = cn.substring(0,loc)

			if ((loc = cn.indexOf("."))+1)
				cn = cn.substring(0,loc)

			if ((loc = cn.indexOf(","))+1)
				cn = cn.substring(0,loc)


			rar["a"+count].showclass = cn;
			rar["a"+count].classname = "qmc_"+cn;
			rar["a"+count].display = cn+" ["+st+"]";
			rar["a"+count].rule = st;

			count++;
				
		}
	}
	
	return rar;

}

function qmv_custom_class_list_change(e,no_select)
{
	
	var ebutton = document.getElementById("qmvacc_edit");
	var a = document.getElementById("qmvacc_classes");
	
	if (!a.value)
		ebutton.style.visibility = "hidden";
	else
		ebutton.style.visibility = "visible";


	var is_ai = document.getElementById("qmvacc_apply_allitems").checked;
	var is_ad = document.getElementById("qmvacc_apply_alldividers").checked;
	var is_at = document.getElementById("qmvacc_apply_alltitles").checked;
	var is_speci = document.getElementById("qmvacc_apply_item").checked;
	var is_specc = document.getElementById("qmvacc_apply_container").checked;


	
	var sobjs = new Object();
	if (is_ai || is_ad || is_at)
	{
		
		var ch = qmv.cur_item[qp].childNodes;
		for (var i=0;i<ch.length;i++)
		{
			
			if (ch[i] && ch[i].tagName)
			{

				if ((is_ai && ch[i].tagName=="A") || (is_ad && ch[i].tagName=="SPAN" && ch[i].className.indexOf("qmdivider")+1) || (is_at && ch[i].tagName=="SPAN" && ch[i].className.indexOf("qmtitle")+1))
				{
					
					sobjs["a"+i] = new Object();
					sobjs["a"+i] = ch[i];
				}

			}
		
		}

	}

	if (is_speci || is_specc)
	{
		sobjs.a0 = new Object();
		if (is_speci)
			sobjs.a0=qmv.cur_item;
		else
			sobjs.a0=qmv.cur_item[qp];
	}

	var apmsg = "[applied]&nbsp;&nbsp;&nbsp;";
	var ops = a.getElementsByTagName("OPTION");
	for (var i=0;i<ops.length;i++)
	{
		
		var val;
		if (val = ops[i].getAttribute("value"))
		{
			var j;
			var match;
			var nin = ops[i].innerHTML;

			for (j in sobjs)
			{
				
				if (sobjs[j].className.indexOf(val)+1)
				{
					if (!no_select)
						ops[i].selected = true;

					if (nin.indexOf(apmsg)==-1)
						ops[i].innerHTML = apmsg+ops[i].innerHTML;

					match = true;
					
				}


				if (match)
					break;
				

			}


			if (!match)
			{
				if (nin.indexOf(apmsg)+1)
					ops[i].innerHTML = nin.substring(apmsg.length);
			}




		}

	}	

	

}


function qmv_custom_class_dialog_content()
{

	var ih = "";

	ih += '<div style="padding:10px;">';


	ih += '<div class="qmvi-publish-title" style="margin-bottom:10px;border-width:0px;" >Custom Classes ';

		ih += '<span onclick="qmv_apply_class_action(\'add_new\')" style="cursor:default;color:#dd3300;padding-left:5px;">[add new +]</span>';
		ih += '<span id="qmvacc_edit" style="visibility:hidden;">';
		ih += '<span onclick="qmv_apply_class_action(\'edit_rules\')" style="cursor:default;color:#dd3300;padding-left:5px;">[edit rule]</span>';
		ih += '<span onclick="qmv_apply_class_action(\'edit_styles\')" style="cursor:default;color:#dd3300;padding-left:5px;">[edit styles]</span>';
		ih += '</span>';
	
	ih += '</div>';	


	ih += '<div style="margin-top:3px;">';
	ih += '<table cellpadding=0 cellspacing=0 border=0 style="width:100%;">';

		ih += '<tr>';
		ih += '<td style="width:100%;"><select multiple=true onchange="qmv_custom_class_list_change(event,true)" id="qmvacc_classes" style="width:100%;" size=6>';

			var tobj = qmv_custom_class_get_list();
			var go = false;
			for (var i in tobj)
			{
				if (tobj[i])
				{
					var adds = "";
					if (!go) adds = "selected";
					ih += '<option rule="'+tobj[i].rule+'" value="'+tobj[i].classname+'" '+adds+'>'+tobj[i].display+'</option>';
					go = true;
					
				}
			}	

			if (!go)
				ih += '<option value="">No Custom Classes Are Defined</option>';

			
			
		ih += '</select></td>';
		ih += '</tr>';


	ih += '</table>';
	ih += '</div>';

	ih += '<div style="font-size:1px;height:20px;"></div>';

	ih += '<div class="qmvi-publish-title">Apply To:</div>';
	ih += '<div style="margin-top:10px;">';
	ih += '<table cellpadding=0 cellspacing=0 border=0>';

		ih += '<tr>';
		ih += '<td><input onclick="qmv_custom_class_list_change(event)" id="qmvacc_apply_item" name="qmvacc_apply" type="radio" checked></td>';
		ih += '<td><div style="width:6px;">&nbsp;</div></td>';
		ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">The Selected Item</td>';
		ih += '</tr>';


		ih += '<tr>';
		ih += '<td><input onclick="qmv_custom_class_list_change(event)" id="qmvacc_apply_container" name="qmvacc_apply" type="radio"></td>';
		ih += '<td><div style="width:6px;">&nbsp;</div></td>';
		ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">The selected Container</td>';
		ih += '</tr>';

		ih += '<tr>';
		ih += '<td><input onclick="qmv_custom_class_list_change(event)" id="qmvacc_apply_allitems" name="qmvacc_apply" type="radio"></td>';
		ih += '<td><div style="width:6px;">&nbsp;</div></td>';
		ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">All Menu Items in the Selected Container</td>';
		ih += '</tr>';


		ih += '<tr>';
		ih += '<td><input onclick="qmv_custom_class_list_change(event)" id="qmvacc_apply_alldividers" name="qmvacc_apply" type="radio"></td>';
		ih += '<td><div style="width:6px;">&nbsp;</div></td>';
		ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">All Divider Items in the Selected Container</td>';
		ih += '</tr>';


		ih += '<tr>';
		ih += '<td><input onclick="qmv_custom_class_list_change(event)" id="qmvacc_apply_alltitles" name="qmvacc_apply" type="radio"></td>';
		ih += '<td><div style="width:6px;">&nbsp;</div></td>';
		ih += '<td class="qmvi-common qmvi-dialog-input-title" style="color:#222222;text-align:left;">All Title Items in the Selected Container</td>';
		ih += '</tr>';



	ih += '</table>';
	ih += '</div>';


	ih += '</div>';
	
	return ih;


}


function qmv_apply_custom_class(is_delete)
{

	var o_item = document.getElementById("qmvacc_apply_item").checked;
	var o_container = document.getElementById("qmvacc_apply_container").checked;
	var o_allitems = document.getElementById("qmvacc_apply_allitems").checked;
	var o_alldividers = document.getElementById("qmvacc_apply_alldividers").checked;
	var o_alltitles = document.getElementById("qmvacc_apply_alltitles").checked;

	
	var go = false;

	var cls = "";
	var ops = document.getElementById("qmvacc_classes").options;
	for (var k=0;k<ops.length;k++)
	{

		

		if (ops[k].selected) 
		{
			cls = ops[k].value;
		
			if (o_item)
			{
				if (is_delete)
					qm_arc(cls,qmv.cur_item);
				else
					qm_arc(cls,qmv.cur_item,true);
				
				qmvi_report_add_line("edits","undo","custom_class","","",qmv.cur_item,null,null,cls,is_delete);

			}	
			else if (o_container)
			{
				if (is_delete)	
					qm_arc(cls,qmv.cur_item[qp]);
				else
					qm_arc(cls,qmv.cur_item[qp],true);

				qmvi_report_add_line("edits","undo","custom_class","","",qmv.cur_item[qp],null,null,cls,is_delete);

			}
			else
			{
				var ch = qmv.cur_item[qp].childNodes;
				for (var i=0;i<ch.length;i++)
				{
					if (ch[i] && ch[i].tagName)
					{
						if ((o_allitems && ch[i].tagName=="A") || (o_alldividers && ch[i].tagName=="SPAN" && ch[i].className.indexOf("qmdivider")+1) || (o_alltitles && ch[i].tagName=="SPAN" && ch[i].className.indexOf("qmtitle")+1))
						{
							if (is_delete)	
								qm_arc(cls,ch[i]);
							else
								qm_arc(cls,ch[i],true);

							qmvi_report_add_line("edits","undo","custom_class","","",ch[i],null,null,cls,is_delete);
						}
					}
				}	

			}


			go = true;


		}

	}


	if (go)
	{

		qmv_custom_class_list_change(new Object());

		qmv_set_all_subs_to_default_position(true,qmad.br_ie);
		qmv_update_all_addons();
		qmv_position_pointer();	

		return true;
	}
	else
	{

		qmv_show_dialog("alert",null,"First select a custom class name from the list to apply.",400);


	}



}



function qmv_apply_class_action(type)
{


	if (type=="add_new")
	{
		qmv_add_custom_css_rule();
		qmv_custom_rule_parse_rule("div#qm[i] .qmc_mystatic");
	}
	if (type=="edit_rules" || type=="edit_styles")
	{
		var er = document.getElementById("qmvacc_classes");
		var srule = "";

		var ops = er.getElementsByTagName("OPTION");
		for (var i=0;i<ops.length;i++)
		{
			if (ops[i].getAttribute("value")==er.value)
				srule=ops[i].getAttribute("rule");

		}
	

		var n = document.getElementById("qmvtree_custom_rules").getElementsByTagName("DIV");
		for (var i=0;i<n.length;i++)
		{
			
			var rr = n[i].getAttribute("orule");
			
			if (rr)
			{

				rr = rr.replace("qm[i]","qm"+qmv.id);
				rr = rr.replace("qm[i]","qm"+qmv.id);

				if (rr.indexOf(srule)+1)
				{
					if (type=="edit_rules")
					{					
						var or = n[i].getAttribute("orule");
						qmv_show_dialog("custom_rule",n[i],null,null,null,null,null,or)
					}
					else
					{
						qmv_display_setbox(n[i].idiv);
						qmv_hide_dialog();
					}

				}

			}

		}


	}


}


function qmv_track_it(fname,search)
{

	

	if (qmv.is_developer && !qmv.is_online) return;
	//if (qmv.is_developer) return;

	
	if (!qmv.track.div)
	{
		var d = document.createElement("DIV");
		d.style.position = "absolute";
		d.style.visibility = "hidden";
		

		d.innerHTML = '<iframe id="qmv_tracking_iframe" src=""></iframe>'
		d = document.body.appendChild(d);
		
		qmv.track.div = d;
	}
	
	if (qmv.is_online) fname += "_online";
	if (window.name=="qm_open") fname += "_save";

	
	if (search)
		search = "?"+search;
	else
		search = "";
	
	

	var ifr = document.getElementById("qmv_tracking_iframe");
	ifr.src = "http://www.opencube.com/track/"+fname+".html"+search;



}


function qmv_log_errors(msg,url,l)
{

	

	if (qmad.br_ie)
		qmv_track_it("error_ie",msg+" -|- "+url+" -|- "+l);
	else
		qmv_track_it("error_firefox",msg+" -|- "+url+" -|- "+l);
	
	
	return false;

}


function qmv_fix_iframe_title_drag()
{

	if (qmv.title_mdown) qmv.title_mdown = false;

}


function qmv_stripe_dialog_init()
{

	

	var first = document.getElementById("qmvi_stripe_where_first");
	var second = document.getElementById("qmvi_stripe_where_second");


	if (qmv.globalstripes_first)
	{
		first.checked = true;
		second.checked = false;
	}
	else
	{
		second.checked = true;
		first.checked = false;
		
	}



}

function qmv_gld_apply_stripes()
{

	var isdel = document.getElementById("qmvi_stripe_where_remove").checked;
	if (!isdel)
	{

		var isfirst = document.getElementById("qmvi_stripe_where_first").checked;
	
		if (isfirst)
			qmv.globalstripes_first = true;
		else
			qmv.globalstripes_first = false;

	
		var a = document.getElementById("qm"+qmv.id);
		qmv_gld_apply_stripes2(a,isfirst);
	
	
		qmv_context_cmd(new Object(),'stripe_styles');
	}
	else
	{
		
		var a = document.getElementById("qm"+qmv.id).getElementsByTagName("A");
		for (var i=0;i<a.length;i++)
			qm_arc("qmstripe",a[i]);


	}


}


function qmv_gld_apply_stripes2(a,isfirst)
{

	var ch=a.childNodes;
	var stripeit;
	if (isfirst) stripeit = true;

	for (var i=0;i<ch.length;i++)
	{
		
		if (ch[i].tagName=="A")
		{
			
			if (!qm_a(ch[i][qp]))
			{	
				
				if (stripeit)
				{
					
					qm_arc("qmstripe",ch[i],true);	
					stripeit = false;
				}
				else
				{
					qm_arc("qmstripe",ch[i]);	
					stripeit = true;
				}
			}


			if (ch[i].cdiv)
				new qmv_gld_apply_stripes2(ch[i].cdiv,isfirst);
	
		}
	}

}


function qmv_update_all_main_checks()
{

	

	var a = document.getElementById("qm98");

	var mobj = document.getElementById("qm"+qmv.id);
	var sobj = mobj.getElementsByTagName("DIV")[0];
	var oc = qmv_find_update_tree_value("settings","create","onclick",null,true);
	oc = qmv_lib_parse_value(oc,"bool");					


	var d = a.getElementsByTagName("DIV");
	for (var i=0;i<d.length;i++)
	{


		if (d[i].getAttribute("ischecks"))
		{


			var ch = d[i].childNodes;
			for (var j=0;j<ch.length;j++)
			{


				var ct;
				var spec;
				if (ch[j].tagName=="A" && (ct = ch[j].getAttribute("ctype")))
				{

					var s = ch[j].getElementsByTagName("SPAN");
					for (var k=0;k<s.length;k++)
					{

						if (s[k].ischeck)
							s[k].parentNode.removeChild(s[k]);

					}


					spec = ch[j].getAttribute("ccat");

					if (ct=="addon")
					{
						
						
						if (qmv.addons[spec]["on"+qmv.id])
							qmv_set_menu_checkmark_span(ch[j]);
							
															

					}
					else if (ct=="settings")
					{
						


						if (spec=="main_horizontal")
						{

							if (mobj.ch)
								qmv_set_menu_checkmark_span(ch[j]);

						}
						else if (spec=="main_vertical")
						{
							if (!mobj.ch)
								qmv_set_menu_checkmark_span(ch[j]);

						}
						else if (spec=="sub_horizontal")
						{
							if (sobj && sobj.ch)
								qmv_set_menu_checkmark_span(ch[j]);


						}
						else if (spec=="sub_vertical")
						{
							if (sobj && !sobj.ch)
								qmv_set_menu_checkmark_span(ch[j]);


						}
						else if (spec=="onclick")
						{
							if (oc)
								qmv_set_menu_checkmark_span(ch[j]);


						}
						else if (spec=="onmouseover")
						{
							if (!oc)
								qmv_set_menu_checkmark_span(ch[j]);


						}	

					}
					else if (ct=="view")
					{
												

						if (spec=="inpage")
						{
							if (!qmv.interface_full)
								qmv_set_menu_checkmark_span(ch[j]);

						}
						else if (spec=="full")
						{	
							if (qmv.interface_full)
								qmv_set_menu_checkmark_span(ch[j]);
						}

					}
					
					

				}


			}



		}


	}

}





function qmv_set_menu_checkmark_span(a)
{

	var mc = document.createElement("SPAN");
	mc.ischeck = 1;
	mc.style.position = "relative";
	mc.style.display = "block";
	mc.style.fontSize = "1px";
	mc.style.width="0px";
	mc.style.height = "0px";
	mc.style.backgroundColor = "#f00";
	mc.innerHTML = '<img src="'+qmv.base+'images/check_red.gif" width="11" height="9" style="position:absolute;border-width:0px;left:-13px;top:2px;">';


	a.insertBefore(mc,a.firstChild);

}



function qmvi_help_navigate(type)
{

	
	var wh = window.frames["qmvi_help_iframe_window"+qmv.helpnum].history;

	try
	{
		if (type=='back')
		{
			if (qmad.br_s3)
			{
				alert("This feature is not avaialbe in Safari, instead use the\r\nhome button to return to the document root.");
				return;
			}

			if (wh.length)
				wh.back();
				
		}
		else if (type=='forward')
		{
			if (qmad.br_s3)
			{
				alert("This feature is not avaialbe in Safari, instead use the\r\nhome button to return to the document root.");
				return;
			}
		
			if (wh.length)
				wh.forward();	
				
		}
		else if (type=='home')
		{

			var ifr = document.getElementById("qmvi_help_iframe"+qmv.helpnum);
			ifr.src = qmv.base+"help/index.html";

		}
	}
	catch(e)
	{


	}

	
}



function qmv_style_settings_help(e,a)
{
	e = e || event;

	var pa = a[qp]
	while (pa.tagName!="A")
		pa = pa[qp];

	var sn = pa.getAttribute("cname");

	
	qmv_show_dialog("help",null,"help-style_settings.html?"+sn);

	
}


function qmvi_report_add_line(section,type,sub_type,cat,msg,aux,prev_value,aux2,mod,mod2)
{


	var lines = qmv["report"+qmv.id].lines;
	var cl = lines["l"+lines.count] = new Object();
	cl.section = section;
	cl.type = type;
	cl.sub_type = sub_type;


	var curs = "pointer";
	if (qmad.br_ie) curs = "hand";	


	if (type=="undo")
	{

		var urspan = "<span onmouseover=\"if(!this[qp].style.textDecoration)this.style.textDecoration='underline'\" onmouseout=\"this.style.textDecoration='none'\" onclick='qmvi_report_mark_line(null,this[qp][qp]);qmvi_report_undo_redo(true)' style='cursor:"+curs+";font-size:12px;color:#444444;'>";
		
				
		if (sub_type=="tree")
		{
		
			
			cl.input = aux;
			cl.uvalue = prev_value;
			cl.value = cl.input.value;
			
			var suv = cl.uvalue;
			if (suv == '') suv = "blank value";
			
			var tuv = cl.input.value;
			if (tuv=='') tuv = "blank value";

			var ruv = aux.rule;
			if (ruv=="addon")
			{
				var bu = cl.input;
				while (bu.tagName!="DIV") bu = bu[qp];

				ruv = bu.getAttribute("addontype");

			}

			var sname = cl.input.getAttribute("sname");
			var acat = cat;


			if (cat=="texturl")
			{


				var sval = qmvi_report_get_item_description_for_line(qmv.cur_item,true);
				cl.istexturl = true;

				var dlgi = cl.input.getAttribute("dlginp")
				if (dlgi)
				{
					//if (dlgi=="text")
						//cl.texturl = qmv.texturl_state;

					cl.input = cl.input.cloneNode(true);
					cl.input.prev_value = "zzzzz1234";  //make the previous value not match
					cl.dialoginput=true;
					
					cl.specitem = qmv.cur_item;
					

					var ttuv = tuv.replace(/<.*?>/g,"");
					ttuv = qmv_rule_truncate(ttuv,30);
					var tsuv = suv.replace(/<.*?>/g,"");
					tsuv = qmv_rule_truncate(tsuv,30);

					cl.msg = "<span isdisable=1>"+dlgi+" value (<span isval=1 style='color:#dd3300;'>"+ttuv+"</span>) set on menu item (<span style='color:#0033dd;'>"+sval+"</span>).&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> value: <span isurval=1 style='color:#dd3300;'>"+tsuv+"</span></span> ]</span>";

				}
				else
				{

					acat = qmv.texturl_state;
					cl.specitem = qmv.cur_item;
					//cl.texturl = qmv.texturl_state;

					var adds = "";
					if (cl.texturl=="url") adds = " (<span style='color:#0033dd;'>"+sval+"</span>)";
					
					var ttuv = tuv.replace(/<.*?>/g,"");
					ttuv = qmv_rule_truncate(ttuv,30);
					var tsuv = suv.replace(/<.*?>/g,"");
					tsuv = qmv_rule_truncate(tsuv,30);

					cl.msg = "<span isdisable=1>"+acat+" value (<span isval=1 style='color:#dd3300;'>"+ttuv+"</span>) set on menu item"+adds+".&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> value: <span isurval=1 style='color:#dd3300;'>"+tsuv+"</span></span> ]</span>";
				}

			}
			else if (cat=="inline")
			{
				acat = 'inline style';
				cl.specitem = qmv.cur_item;
				var sval = qmvi_report_get_item_description_for_line(qmv.cur_item,true);
	
				cl.msg = "<span isdisable=1>"+acat+" <span style='color:#0033dd;'>"+sname+"</span> value (<span isval=1 style='color:#dd3300;'>"+tuv+"</span>) set on menu item / container '"+sval+"'.&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> value: <span isurval=1 style='color:#dd3300;'>"+suv+"</span></span> ]</span>";

			}
			else if (cat=="create")
			{
				ruv = "create menu";
				cl.msg = "<span isdisable=1>"+acat+" <span style='color:#0033dd;'>"+sname+"</span> value (<span isval=1 style='color:#dd3300;'>"+tuv+"</span>) set for rule '"+ruv+"'.&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> value: <span isurval=1 style='color:#dd3300;'>"+suv+"</span></span> ]</span>";
			}
			else if (cat=="iextra")
			{
				acat = 'item extra';
				cl.specitem = qmv.cur_item;
				var sval = qmvi_report_get_item_description_for_line(qmv.cur_item,true);
	
				cl.msg = "<span isdisable=1>"+acat+" <span style='color:#0033dd;'>"+sname+"</span> value (<span isval=1 style='color:#dd3300;'>"+tuv+"</span>) set on menu item '"+sval+"'.&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> value: <span isurval=1 style='color:#dd3300;'>"+suv+"</span></span> ]</span>";

			}
			else
			{
				cl.msg = "<span isdisable=1>"+acat+" <span style='color:#0033dd;'>"+sname+"</span> value (<span isval=1 style='color:#dd3300;'>"+tuv+"</span>) set for rule '"+ruv+"'.&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> value: <span isurval=1 style='color:#dd3300;'>"+suv+"</span></span> ]</span>";
			}
			

			

			
		}
		else if (sub_type=="modify")
		{
			

			if (cat=="add_insert")
			{

				cl.uaction = "delete";
				cl.item = aux;

			}
			else if (cat=="delete")
			{


				if (mod=="prev")				
					cl.uaction = "insert-after";
				else if (mod=="next")
					cl.uaction = "insert";
				else
					cl.uaction = "addsub";
				

				
				cl.classname = prev_value;
				cl.pitem = mod2;
				cl.item = aux2;
				cl.inner = aux;
				

			}
			else if (cat=="moveup")
			{

				cl.uaction = "movedown";
				cl.item = aux;
			}
			else if (cat=="movedown")
			{

				cl.uaction = "moveup";
				cl.item = aux;
			}

			var sval = qmvi_report_get_item_description_for_line(cl.item,true);

			cl.msg = "<span isdisable=1>"+cat+" structure modification on item (<span style='color:#0033dd;'>"+sval+"</span>)&nbsp;&nbsp;[ "+urspan+"undo action: <span style='color:#dd3300;'>"+cl.uaction+"</span></span> ]</span>";
			
		}
		else if (sub_type=="custom_class")
		{

			cl.specitem = aux;
			cl.cname = mod;
			cl.isremove = mod2;

			var p1 = "applied to";
			if (cl.isremove) p1 = "removed from";

			var sval = "";
			if (cl.specitem.tagName=="DIV")
				sval = "container - "+qmvi_report_get_item_description_for_line(cl.specitem.getElementsByTagName("A")[0],true);
			else
				sval = qmvi_report_get_item_description_for_line(cl.specitem,true);

			cl.msg = "<span isdisable=1>custom class name '<span style='color:#0033dd;'>"+cl.cname+"</span>' <span isccra=1>"+p1+"</span> item (<span style='color:#0033dd;'>"+sval+"</span>)&nbsp;&nbsp;[ "+urspan+"<span isur=1>undo</span> this action</span> ]</span>";

		}
		

		lines.upos = lines.count;
		
	}
	else
	{

		var urspan = "<span onmouseover=\"this.style.textDecoration='underline'\" onmouseout=\"this.style.textDecoration='none'\" onclick='qmvi_report_mark_line(null,this[qp]);qmvi_report_show_alert()' style='cursor:"+curs+";font-size:12px;color:#444444;'>";

		cl.origmsg = msg;
		cl.origwidth = aux;

		
		var dm = qmvi_report_info_clean_text(msg);
		if (dm.length>75)
			cl.msg = dm.substring(0,75)+'...&nbsp&nbsp'+urspan+'[ view more ]</span>';
		else
			cl.msg = dm;

	}

	
	cl.index = lines.count;

	lines.count++;	
	qmvi_report_it_addline(cl);

}

function qmvi_report_show_alert()
{

	var lines = qmv["report"+qmv.id].lines;
	var rm = qmv["report"+qmv.id].marked;
	var cline = rm.getAttribute("index");
	var cu = lines["l"+cline];


	qmv_show_dialog("alert",null,cu.origmsg,cu.origwidth,null,null,null,null,true);

}


function qmvi_report_get_item_description_for_line(item)
{
	
	
	var sval = qmv_set_texturl_field(item,true,null,true);
	if (item.className.indexOf("qmdivider")+1)
		sval = "divider";

	sval = sval.replace(/<.*?>/g,"");
	sval = qmv_rule_truncate(sval,60)
	
	return sval;

}


function qmvi_report_it_addline(line)
{

	var ro = document.getElementById("qmvi_report_panel_data_inner");
	var lobj = qmvi_report_get_line_html_or_obj(line,true);


	if (qmv.report.tab=="all" || qmv.report.tab==line.section)
		lobj.style.display = "block";
	else
		lobj.style.display = "none";


	line.div = ro.insertBefore(lobj,ro.firstChild);

	var qr = qmv["report"+qmv.id];

	if (!qr["count_"+line.section])
		qr["count_"+line.section] = 1;
	else
		qr["count_"+line.section]++;

	var count_display = document.getElementById("qmvi_report_tabinfo_"+line.section);
	if (count_display) count_display.innerHTML = qr["count_"+line.section];

	if (!qr.count_all)
		qr.count_all = 1;
	else
		qr.count_all++;

	count_display = document.getElementById("qmvi_report_tabinfo_all");
	if (count_display) count_display.innerHTML = qr.count_all;


	qmvi_report_mark_line(null,lobj);

}


function qmvi_report_get_line_html_or_obj(line,is_obj)
{

	var rs = "";

	if (!is_obj)
		rs += '<div class="qmvi-common qmvi-report-lines" onclick="qmvi_report_mark_line(event,this)" type='+line.type+' section="'+line.section+'" lindex='+cl.index+' style="cursor:default;">';

	rs += '<img src="'+qmv.base+'images/qmv_r_check.gif" width=7 height=9 style="visibility:hidden;margin:0px 4px -1px 0px;"><img src="'+qmv.base+'images/qmv_r_icon_'+line.section+'.gif" width=9 height=9 style="margin:0px 4px -1px 0px;">';	
	rs += line.msg;

	if (!is_obj)
		rs += '</div>';


	if (is_obj)
	{
		var nd = document.createElement("DIV");
		nd.innerHTML = rs;
		nd.className = "qmvi-common qmvi-report-lines";
		nd.setAttribute("section",line.section);
		nd.setAttribute("type",line.type);
		nd.setAttribute("index",line.index);
		nd.style.cursor = "default"

		if (!qmad.br_ie)
			nd.style.MozUserSelect = "none";

		qmvi_report_line_add_events(nd);	

		return nd;
	}
	else
		return rs;
}


function qmvi_report_line_add_events(a)
{

	a.onclick = function(){qmvi_report_mark_line(null,this)}
	a.onselectstart = function(event){qm_kille(event)};

}


function qmvi_report_switch_undo_redo(type,line)
{



	var sp = line.div.getElementsByTagName("SPAN");

	if (type=="none")
	{
		
		for (var i=0;i<sp.length;i++)
		{
			if (sp[i].getAttribute("isdisable"))
			{
			
				sp[i].style.textDecoration = "line-through";
				sp[i].style.color = "#888888";		

			}

		}
		
	}
	else
	{

		for (var i=0;i<sp.length;i++)
		{

			if (sp[i].getAttribute("isval"))
			{
				var sv = line.value;
				if (sv=='') sv = "blank value";

				sv = sv.replace(/<.*?>/g,"");
				sv = qmv_rule_truncate(sv,30);
				sp[i].innerHTML = sv;

			}
			else if (sp[i].getAttribute("isur"))
			{

				sp[i].innerHTML = type;			

			}
			else if (sp[i].getAttribute("isurval"))
			{
				var sv = line.uvalue;
				if (sv=='') sv = "blank value";

				sv = sv.replace(/<.*?>/g,"");
				sv = qmv_rule_truncate(sv,30);
				sp[i].innerHTML = sv;			

			}
			if (sp[i].getAttribute("isccra"))
			{
				if (line.isremove)
					sp[i].innerHTML = "removed from";
				else
					sp[i].innerHTML = "applied to";

			}
			

		}

	}

}


function qmvi_report_undo_redo_button(e,a)
{
	if (a.src.toLowerCase().indexOf("disabled.gif")==-1)
		qmvi_report_undo_redo()		

}

function qmvi_report_undo_redo()
{

	
	var lines = qmv["report"+qmv.id].lines;

	var rm = qmv["report"+qmv.id].marked;
	var cline = rm.getAttribute("index");
	
	var cu = lines["l"+cline];
	if (cu.type!="redo" && cu.type!="undo") return;

	var atype = cu.type;

	if (cu.sub_type=="tree")
	{
		
		var skip = false;


		
		if (!cu.dialoginput && (!cu.input || !cu.input[qp] || !cu.input[qp].tagName))
		{

			qmv_show_dialog("alert",null, atype+" cannot be performed for this change because the custom rule no longer exits.",520,null,null,null,null,true);

			cu.type = "none";
			rm.setAttribute("type",cu.type);
			qmvi_report_switch_undo_redo(cu.type,cu);

			skip = true;
				
		}


		if (cu.specitem)
		{
			
			if (!qmv_is_object_in_document_flow(cu.specitem))
			{

				qmv_show_dialog("alert",null, atype+" cannot be performed for this change because the specifc menu item to which the style was applied no longer exists.",480,null,null,null,null,true);

				cu.type = "none";
				rm.setAttribute("type",cu.type);
				qmvi_report_switch_undo_redo(cu.type,cu);

				skip = true;
				
			}
			else
			{

				qmvi_select_menu_item(cu.specitem);
				
			}


		}

		if (!skip)
		{

			
			cu.input.value = cu.uvalue;
			qmv_evt_update_tree_value(cu.input,null,null,null,true,null,null,null,true);
					
			if (cu.type=="undo")			
				cu.type = "redo";
			else
				cu.type = "undo";

			rm.setAttribute("type",cu.type);

			cu.uvalue = cu.value;
			cu.value = cu.input.value;

			qmvi_report_switch_undo_redo(cu.type,cu);

			if (cu.istexturl)
				qmv_set_texturl_field(qmv.cur_item);
		}


		
			

	}
	else if (cu.sub_type=="modify")
	{

		
		if (!qmv_is_object_in_document_flow(cu.item))
		{

			qmv_show_dialog("alert",null,"Undo cannot be performed for this change because the item or its siblings is no longer present.",480,null,null,null,null,true);
		}
		else
		{

			if (cu.uaction=="delete")
			{
				qmvi_select_menu_item(cu.item);
				qmv_modify_items(cu.uaction,null,true);
			}
			else if (cu.uaction.indexOf("insert")+1)
			{
				qmvi_select_menu_item(cu.item);

				if (cu.classname.indexOf("qmdivider")+1)
					qmv_insert_spanitem("divider",cu.item)
				else if (cu.classname.indexOf("qmtitle")+1)
					qmv_insert_spanitem("title",cu.item)
				else
					qmv_modify_items(cu.uaction,cu.inner,true);

			}
			else if (cu.uaction=="addsub")
			{
				qmvi_select_menu_item(cu.item);
				qmv_modify_items(cu.uaction,cu.inner,true);
			}
			else if (cu.uaction=="movedown" || cu.uaction=="moveup")
			{
				qmvi_select_menu_item(cu.item);
				qmv_modify_items(cu.uaction,null,true);
			}

		}

		cu.type = "none";
		rm.setAttribute("type",cu.type);
		qmvi_report_switch_undo_redo(cu.type,cu);
			
	}
	else if (cu.sub_type=="custom_class")
	{

		if (cu.specitem)
		{
			if (!qmv_is_object_in_document_flow(cu.specitem))
			{

				qmv_show_dialog("alert",null,"Undo cannot be performed for this change because the specifc menu item to which the class name was applied no longer exists.",480,null,null,null,null,true);

				cu.type = "none";
				rm.setAttribute("type",cu.type);
				qmvi_report_switch_undo_redo(cu.type,cu);

				skip = true;
				
			}
			else
				qmvi_select_menu_item(cu.specitem);


		}	

		
		if (cu.type=="undo")			
			cu.type = "redo";
		else
			cu.type = "undo";

		rm.setAttribute("type",cu.type);


		if (cu.isremove)
		{
			qm_arc(cu.cname,cu.specitem,true);
			cu.isremove = false;
		}
		else
		{
			qm_arc(cu.cname,cu.specitem);
			cu.isremove = true;
		}

		qmvi_report_switch_undo_redo(cu.type,cu);		


	}

	var inc = -1;
	if (atype=="redo") inc = 1;

	var si = parseInt(cline)+inc;
	var next_line;
	
	while (next_line = lines["l"+si])
	{
		if (next_line.type==atype)
		{
			rm = next_line.div;
			break;
		}

		si=si+inc;
	}



	qmvi_report_mark_line(null,rm);

}


function qmvi_report_tab_switch(e,a)
{

	var ra = new Array("all","edits","warnings","info");


	var on = null;
	for (var i=0;i<ra.length;i++)
	{

		var tab = document.getElementById("qmvi_report_tab_"+ra[i]);
		if (tab!=a)
		{
			tab.style.backgroundImage = "url("+qmv.base+"images/qmv_r_tab_"+ra[i]+".gif)";
			if (qmad.br_ie)
				tab.style.cursor = "hand";
			else
				tab.style.cursor = "pointer";
			
		}
		else
			on = ra[i];

	}
	
	if (on)
	{
		a.style.backgroundImage = "url("+qmv.base+"images/qmv_r_tab_"+on+"_on.gif)";
		a.style.cursor = "default";
		qmv.report.tab = on;
	}


	qmvi_report_tab_switch_hide_show_items();

}


function qmvi_report_tab_switch_hide_show_items()
{

	var ro = document.getElementById("qmvi_report_panel_data_inner");
	var ch = ro.childNodes;
	
	for (var i=0;i<ch.length;i++)
	{
		if (ch[i].tagName=="DIV")
		{
			var section = ch[i].getAttribute("section");


			if (qmv.report.tab=="all" || section==qmv.report.tab)
				ch[i].style.display = "block";
			else
				ch[i].style.display = "none";

		}

	}

}


function qmvi_report_mark_line(e,a)
{

		
	if (qmv["report"+qmv.id].marked)
		qmv["report"+qmv.id].marked.firstChild.style.visibility = "hidden";

	a.firstChild.style.visibility = "visible";

	if (a.getAttribute("type")=="undo")
	{
		var cb = document.getElementById("qmvi_report_button_undo");
		cb.src = qmv.base+"images/qmv_r_button_undo.gif";
		qmvi_mm_disable_enable_item(false,document.getElementById("qmvmm_undo"));

		cb = document.getElementById("qmvi_report_button_redo");
		cb.src = qmv.base+"images/qmv_r_button_redo_disabled.gif";
		qmvi_mm_disable_enable_item(true,document.getElementById("qmvmm_redo"));

	}
	else if (a.getAttribute("type")=="redo")
	{
		var cb = document.getElementById("qmvi_report_button_redo");
		cb.src = qmv.base+"images/qmv_r_button_redo.gif";
		qmvi_mm_disable_enable_item(false,document.getElementById("qmvmm_redo"));

		cb = document.getElementById("qmvi_report_button_undo");
		cb.src = qmv.base+"images/qmv_r_button_undo_disabled.gif";
		qmvi_mm_disable_enable_item(true,document.getElementById("qmvmm_undo"));
	}
	else
	{

		qmvi_report_disable_undo_and_redo();
	}



	qmv["report"+qmv.id].marked_index = a.getAttribute("index");
	qmv["report"+qmv.id].marked = a;


	var st = a[qp].scrollTop;
	var wh = a[qp].offsetHeight;
	var ot = a.offsetTop;

	if (ot-st>wh)
		a[qp].scrollTop = ot-wh;
	else if ((ot-a.offsetHeight)<st)
		a[qp].scrollTop = (ot-a.offsetHeight-5);
			
	



}


function qmvi_report_button_hover(a,on)
{
	

	var bname = a.getAttribute("bname");

	if (a.src.toLowerCase().indexOf("disabled.gif")==-1)
	{
		if (on)
			a.src = qmv.base+"images/qmv_r_button_"+bname+"_hover.gif";
		else
			a.src = qmv.base+"images/qmv_r_button_"+bname+".gif";
	}


}

function qmvi_mm_disable_enable_item(disabled,item)
{

	if (disabled)
		qm_arc("qmdisabled",item,true);
	else
		qm_arc("qmdisabled",item);
	

}

function qmvi_select_menu_item(item)
{

	if (item.tagName=="DIV")
		item = item.getElementsByTagName("A")[0];


	var rsval = qmv.interface_hide_selected_box;

	if (!rsval)
	{		
		qmv.interface_hide_selected_box = true;
		qmv_hide_pointer("qm"+qmv.id);
	}
				
				

	var sarray = new Array();
	sarray.push(item);


	var po = item[qp];
	while (po.className.indexOf("qmmc")==-1)
	{
		if (po.idiv) sarray.push(po.idiv);
		po = po[qp];
	}

	
	for (var i=sarray.length-1;i>=0;i--)
	{
		if (i==0 || sarray[i].className.indexOf("qmactive")==-1)
			qm_oo(new Object(),sarray[i]);
	}


	if (!rsval)
	{
		qmv.interface_hide_selected_box = rsval;
		qmv_position_pointer(true);
	}

}


function qmvi_change_item_text(item,val)
{

	if (qmv.texturl_state!="text")
		qm_switch_texturl_state("text");


	var inp = document.getElementById("qmv_texturl_field");
	inp.value = val;
	qmv_evt_update_tree_value(inp);
	

}


function qmvi_save_report_object()
{

	if (qmv["report"+qmv.id])
	{
		var ro = document.getElementById("qmvi_report_panel_data_inner");
		qmv["report"+qmv.id].saved = ro.cloneNode(true);

	}

}


function qmvi_initialize_report_object()
{

	if (!qmv["report"+qmv.id])
	{
		
		var tv = qmv["report"+qmv.id] = new Object();	
		tv.lines = new Object();
		tv.lines.count = 0;

		qmv["report"+qmv.id].count_all = 0;
		qmv["report"+qmv.id].count_edits = 0;
		qmv["report"+qmv.id].count_warnings = 0;
		qmv["report"+qmv.id].count_info = 0;


		if (qmv.report.started)
		{

			var ro = document.getElementById("qmvi_report_panel_data_inner");
			ro.innerHTML = "";

			var s1 = document.getElementById("qmvi_report_tabinfo_all");
			s1.innerHTML = 0;

			s1 = document.getElementById("qmvi_report_tabinfo_edits");
			s1.innerHTML = 0;

			s1 = document.getElementById("qmvi_report_tabinfo_warnings");
			s1.innerHTML = 0;

			s1 = document.getElementById("qmvi_report_tabinfo_info");
			s1.innerHTML = 0;

		}


		qmv.report.started = true;

	}
	else
	{
		
		var ro = document.getElementById("qmvi_report_panel_data");
		ro.removeChild(ro.getElementsByTagName("DIV")[0]);
		ro.appendChild(qmv["report"+qmv.id].saved);
		

		var lines = qmv["report"+qmv.id].lines;
		var rindex = qmv["report"+qmv.id].marked_index;
		var ri = document.getElementById("qmvi_report_panel_data_inner");
		var ch = ri.childNodes;
	
		for (var i=0;i<ch.length;i++)
		{
			if (ch[i].tagName=="DIV")
			{
				qmvi_report_line_add_events(ch[i]);			
					
				var ix = ch[i].getAttribute("index");		
				if (rindex == ix)
				{
					qmv["report"+qmv.id].marked_index = ix;
					qmv["report"+qmv.id].marked = ch[i];
				}

				lines["l"+ix].div = ch[i]	
				

			}

		}


		
		
		var count_display = document.getElementById("qmvi_report_tabinfo_all");
		if (count_display) count_display.innerHTML = qmv["report"+qmv.id].count_all;

		count_display = document.getElementById("qmvi_report_tabinfo_edits");
		if (count_display) count_display.innerHTML = qmv["report"+qmv.id].count_edits;

		count_display = document.getElementById("qmvi_report_tabinfo_warnings");
		if (count_display) count_display.innerHTML = qmv["report"+qmv.id].count_warnings;

		count_display = document.getElementById("qmvi_report_tabinfo_info");
		if (count_display) count_display.innerHTML = qmv["report"+qmv.id].count_info;


		if (qmv["report"+qmv.id].marked)
		{
			qmvi_report_tab_switch_hide_show_items();
			qmvi_report_mark_line(new Object(),qmv["report"+qmv.id].marked);
		}


	}

	var rid = document.getElementById('qmvr_menu_id');
	rid.innerHTML = "Menu "+qmv.id;

}


function qmv_save_anchor_settings()
{

	var text = document.getElementById("qmvi_df_urlp_text");
	var url = document.getElementById("qmvi_df_urlp_url");
	var target = document.getElementById("qmvi_df_urlp_target");
	var title = document.getElementById("qmvi_df_urlp_title");
		
	if (text.prev_value!=text.value)
		qmv_evt_update_tree_value(text);
					
	if (url.prev_value!=url.value)
		qmv_evt_update_tree_value(url);

	if (target.prev_value!=target.value)
		qmv_evt_update_tree_value(target);

	if (title.prev_value!=title.value)
		qmv_evt_update_tree_value(title);

	var tuf = document.getElementById("qmv_texturl_field");		
	if (qmv.texturl_state=="text")
		qmv_tree_set_value(tuf,text.value);
	else
		qmv_tree_set_value(tuf,url.value);


}

function qmvi_expand_collapse_report_window(a,a)
{
	var rh = document.getElementById("qmvi_report_panel_data");

	if (a.src.indexOf("collapse.gif")+1)
	{
		qmv.report.height = 0;
		qmv_resize_interface();

		rh.style.visibility = "hidden";
		
		
		a.src = qmv.base+"images/qmv_r_expand.gif";
		a.title = "Expand Event Log Window";
	}
	else
	{
		qmv.report.height = 100;
		qmv_resize_interface();


		rh.style.visibility = "visible";

		a.src = qmv.base+"images/qmv_r_collapse.gif";
		a.title = "Collapse Event Log Window";

	}


}

function qmvi_vd_tab_switch(e,a)
{

	var ra = new Array("design","css","html");


	var on = null;
	for (var i=0;i<ra.length;i++)
	{

		var tab = document.getElementById("qmvi_vd_tab_"+ra[i]);
		if (tab!=a)
		{
			tab.style.backgroundImage = "url("+qmv.base+"images/qmv_v_tab_"+ra[i]+".gif)";
			if (qmad.br_ie)
				tab.style.cursor = "hand";
			else
				tab.style.cursor = "pointer";
			
		}
		else
			on = ra[i];

	}
	
	if (on)
	{
		a.style.backgroundImage = "url("+qmv.base+"images/qmv_v_tab_"+on+"_on.gif)";
		a.style.cursor = "default";
		qmv.vdesign_tab = on;
	}


	qmvi_vd_tab_update_content();

}

function qmvi_vd_tab_update_content()
{


	if (qmv.vdesign_tab=="css")
	{

		var sval = qmv_pubgen_css(null,null,true)+"\r\t";
		var ad = qmvi_vd_size_csshtml_panel(null,null,null,true);
		ad.value = sval;


		qmvi_check_show_htmlcss_dialog();

	}
	else if (qmv.vdesign_tab=="html")
	{

		var sval = qmv_pubgen_structure(null,null,null,null,qmv.id+"l")+"\r\t";
		var ad = qmvi_vd_size_csshtml_panel(null,null,null,true);		
		ad.value = sval;

		qmvi_check_show_htmlcss_dialog();
	}
	else
	{

		var ph = document.getElementById("qmvi_csshtml_panel");
		ph.style.display = "none";
		
	}


}






function qmvi_check_show_htmlcss_dialog()
{

	if (!qmv.htmlcss_dialog_shown)
	{
		qmv_show_dialog("alert",null,"The CSS and HTML tabs are for copy and pasting code snippets only.  To make manual edits, save or publish your menu, then use a plain text editor of your choosing.",570);
		qmv.htmlcss_dialog_shown = true;
	}

}

function qmvi_vd_size_csshtml_panel(mp,a,ad,show)
{

	if (!mp)
		mp = qmv.qmvi_design_panel;

	if (!a)
		a = document.getElementById("qmvi_csshtml_panel");

	if (!ad)
		ad = document.getElementById("qmvi_csshtml_panel_data");


	a.style.top = mp.style.top;
	a.style.left = mp.style.left;
	a.style.width = mp.style.width;
	a.style.height = mp.style.height;


	ad.style.width = (parseInt(mp.style.width)-0-15)+"px";
	ad.style.height = (parseInt(mp.style.height)-1-15)+"px";


	if (show) a.style.display = "block";


	return ad;
}

function qmvi_v_b_click_direction(a)
{

	var kc;

	if (a.src.indexOf("down_hover.gif")+1)
		kc=40;
	else if (a.src.indexOf("up_hover.gif")+1)
		kc= 38;
	else if (a.src.indexOf("left_hover.gif")+1)
		kc= 37;
	else if (a.src.indexOf("right_hover.gif")+1)
		kc= 39;

	
	qmvi_navigate_menu(kc,qmv.cur_item);

}


function qmvi_design_view_keypress_event(e)
{
	
	var kc = e.keyCode;


	if (kc>36 && kc<41)
	{
		/*
		if (e.shiftKey)
		{
			if (kc==38)
				qmv_modify_items("moveup");
			else
				qmv_modify_items("movedown");
		}
		else
		{
			qmvi_navigate_menu(kc,qmv.cur_item);
		}
		*/

		qmvi_navigate_menu(kc,qmv.cur_item);


	}
	else if (kc==13)
	{
		 //enter
		qmv_show_dialog("url",document.getElementById("qmv_texturl_field"));
	}
	else if (kc==46)
	{
		qmv_modify_items("delete");
	}
	else if (kc==45)
	{
		qmv_modify_items("insert");
	}
	else if (kc==107)
	{
		if (e.shiftKey)
			qmv_modify_items("addsub");
		else
			qmv_modify_items("add");

	}	

	


}


function qmvi_navigate_menu(kc,targ)
{


	var na;
	var ish = false;
	
	var c1;
	if (document.defaultView && document.defaultView.getComputedStyle)
		c1 = document.defaultView.getComputedStyle(targ, null).getPropertyValue("float");
	else if (targ.currentStyle)
		c1 = targ.currentStyle.styleFloat;		

	if (c1 && c1.toLowerCase()=="left")
		ish = true;


	
	
	if (kc==40) //down
	{


		if (qmv.addons.tree_menu["on"+qmv.id])
		{

			if (targ.cdiv)
				qmvi_kc_fnl(targ);
			else
			{

				na = qmvi_kc_getnp(targ,"next");
				if (na)
				{
					qm_oo(new Object(),na);
				}
				else if (targ[qp].idiv)
				{
					na = qmvi_kc_getnp(targ[qp].idiv,"next");
					if (na)
						qm_oo(new Object(),na);
				}

			}	



		}
		else
		{
		

			if (targ.cdiv && ish)
			{
			
				qmvi_kc_fnl(targ);

			}
			else
			{
			
				na = qmvi_kc_getnp(targ,"next");
				if (na)
					qm_oo(new Object(),na);

	
			}
		}
		
	
	}
	else if (kc==38) //up
	{
	
		na = qmvi_kc_getnp(targ,"previous");
		if (na)
		{
			qm_oo(new Object(),na);

		}
		else
		{
			
			var pi = qm_kc_get_parent_item(targ[qp][qp]);
			if (pi)
				qm_oo(new Object(),pi);

	
		}


	}
	else if (kc==39) //right
	{	

		if (!qmv.addons.tree_menu["on"+qmv.id])
		{

			if (ish)
			{
			
				na = qmvi_kc_getnp(targ,"next");
				if (na)
					qm_oo(new Object(),na);
				
		
			}
			else if (targ.cdiv)
			{
			
				qmvi_kc_fnl(targ);

			}

		}


	}
	else if (kc==37) //left
	{	

		if (!qmv.addons.tree_menu["on"+qmv.id])
		{

			if (ish)
			{
			
				na = qmvi_kc_getnp(targ,"previous");
				if (na)
					qm_oo(new Object(),na);
				
			}
			else
			{
			
				var pi = qm_kc_get_parent_item(targ[qp][qp]);
				if (pi)
					qm_oo(new Object(),pi);
				

			}	
		}


	}
	
	

}


function qmvi_kc_fnl(t)
{
	var na = t.cdiv.getElementsByTagName("A")[0];
	
	if (qmv.addons.tree_menu["on"+qmv.id])
	{
		if (t.cdiv.className.indexOf("qmfh")+1)
			qm_oo(new Object(),t);	


	}

	qm_oo(new Object(),na);
}


function qmvi_kc_getnp(na,type)
{
	


	while (((na = na[type+"Sibling"]) && na.tagName!="A" && na.tagName!="SPAN") || (na && na.noselect))
		continue;
		
	

	if (!na || na.className.indexOf("qmclear")+1 || na.isselector || na.noselect)
		return;
	else
		return na;
}

function qmvi_change_design_bg_color(get_color_only)
{


	var bgdiv = document.getElementById("qmvi_design_bg_div");
	bgdiv.value = bgdiv.style.backgroundColor;

	if (get_color_only)
		return bgdiv.value;

	qmv_show_dialog("color",bgdiv);

}


function qmvi_set_design_bg_color(hval,bgdiv)
{

	bgdiv.style.backgroundColor = hval;
	var mp = document.getElementById("qmvi_menu_panel");
	mp.style.backgroundColor = hval;

}

function qmvi_indicator_on_off()
{

	var ii = document.getElementById("qmvi_indicator_status_image");


	if (qmv.interface_hide_selected_box)
	{
		ii.title = "Hide Selected Item Indicator";
		ii.src = qmv.base+'images/qmv_v_b_indicator_off.gif';
		qmv.interface_hide_selected_box = false;
		qmv_position_pointer(true);

	}
	else
	{
		ii.title = "Show Selected Item Indicator";	
		ii.src = qmv.base+'images/qmv_v_b_indicator_on.gif';
		qmv.interface_hide_selected_box = true;
		qmv_hide_pointer("qm"+qmv.id);
	}

}

function qmvi_report_info_clean_text(txt)
{

	while (txt.indexOf("<br>")+1)
		txt = txt.replace('<br>',"");

	
	return txt;

}
 
function qmv_is_object_in_document_flow(a)
{
	
	
	while (a=a[qp])
	{

		if (a==document)
			return true;
	}


	return false;

}


function qmv_sync_for_ie_undo_report_items(a,b)
{

	var lines = qmv["report"+qmv.id].lines;

	var i=0;
	var si = null;
	while (si = lines["l"+i])
	{

		if (si.item==a)
			si.item=b;
		
		if (si.specitem==a)
			si.specitem=b;


		i++;
	}


}


function qmvi_report_delete(del)
{

	var lines = qmv["report"+qmv.id].lines;
	if (!lines.l0)
	{
		qmv_show_dialog("alert",null,"The event log is empty.  Use the delete option after items have been added to the log.",450,null,null,null,null,true);
		return;
	}


	if (!del)
		qmv_show_dialog("question-yesno",null,"Are you sure you want to delete all event log items?",400,"qmvi_report_delete(true)");
	else
	{

		var ro = document.getElementById("qmvi_report_panel_data_inner");
		ro.innerHTML = "";

		qmv["report"+qmv.id] = null;
	
		qmvi_initialize_report_object();
		qmvi_report_disable_undo_and_redo();
	}
	
}


function qmvi_report_disable_undo_and_redo()
{

	cb = document.getElementById("qmvi_report_button_redo");
	cb.src = qmv.base+"images/qmv_r_button_redo_disabled.gif";
	qmvi_mm_disable_enable_item(true,document.getElementById("qmvmm_redo"));

	cb = document.getElementById("qmvi_report_button_undo");
	cb.src = qmv.base+"images/qmv_r_button_undo_disabled.gif";
	qmvi_mm_disable_enable_item(true,document.getElementById("qmvmm_undo"));

}

function qmv_delete_menu_ok(id,select_remaining)
{

		
	qmv.pointer["qm"+id]=null;
	var cm = document.getElementById("qm"+id);
	if (cm)
	{

		
		if (qmv.addons.tree_menu["on"+id])
			qmv_update_tree_menu(true,null,true,true,id);
		

		var j;
		for (j in qmv.addons)
			qmv.addons[j]["on"+id] = null;
		

		qmad["qm"+id]=null;

		
		if (cm[qp].menufloater)
			cm[qp][qp].removeChild(cm[qp]);
		else
			cm[qp].removeChild(cm);
		
					
		var s = qmv.styles;
		var r = qmv.style_rules;

		
		for (var i=0;i<r.length;i++)
		{

			if (r[i].selectorText && r[i].selectorText.indexOf("#qm"+id)+1)
			{
				

				if (qmad.br_s3)
				{
					r[i].style.cssText = null;
				}
				else
				{
				
					if (s.removeRule)
						s.removeRule(i);
					else
						s.deleteRule(i);
			
					i--;
				}

								

			}
	
		}


		

		qmv["report"+id] = null;
			
		if (select_remaining)
		{

			for (var i=0;i<10;i++)
			{
				var a;
				if (a = document.getElementById("qm"+i))
				{
					qm_oo(new Object(),a.getElementsByTagName("A")[0]);	
					break;
				}

			}
		}

	}


}

function qmv_add_new_menu(menu)
{

	qmvi_template_show_dialog("add",menu);

}

function qmvi_template_show_dialog_new(go,from_thread)
{



	if (go || !qmv.changed)
	{	
		if (qmad.br_ie && !from_thread)
		{
			qmvi_show_wait_message("Loading Templates...");
			setTimeout("qmvi_template_show_dialog_new(true,true)",100);
			return;
		}
	
		qmvi_template_show_dialog("new");
			
		for (var i=0;i<10;i++)
			qmv_delete_menu_ok(i);

		qmv_hide_dialog();
		qmv_hide_dialog(true);

		qmvi_hide_wait_message();
	}
	else if (qmv.changed)
		qmv_show_dialog("question-yesnocancel",null,"Do you want to save your menu changes?",350,"qmv_show_dialog('save')","qmvi_template_show_dialog_new(true)");

	
}


function qmvi_template_show_dialog(type,structure)
{

	if (type=="load" || type=="new")
		qmv.changed = false;
		
	var def_type=0;
	var def_var='gray';	

	var twin = document.getElementById("qmvi_template_dialog");
	twin.structure = structure;

	if (!twin.initialized)
	{
		qmv.tplate_dialog = twin;

		var wt = '';
		wt += '<div class="qmvi-common qmvi-title">Visual CSS QuickMenu [<span id="qmvi_tplate_title_desc">Start From Template</span>]</div>'
		wt += qmvi_template_get_tree_structure();
		wt += '<div class="qmvi-common;" style="position:absolute;top:41px;left:232px;width:250px;font-family:arial;font-size:12px;font-weight:bold;color:#555555;"><img src="'+qmv.base+'images/qmv_v_b_down_hover.gif" width=13 height=14 style="margin-bottom:-3px;">&nbsp;Preview Menu</div>';
		wt += '<iframe src="" id="qmvi_tplate_iframe"  scrolling=no frameborder=none style="position:absolute;overflow:hidden;top:60px;left:230px;width:600px;height:400px;border-style:none;background-color:#ffffff;margin:0px;padding:0px;border-width:1px;border-style:solid;border-color:#666666;"></iframe>';
	
		wt += '<input id="qmvi_tplate_button" onclick="qmvi_template_customize_menu()" type="button" value="Customize Menu" style="position:absolute;font-family:arial;font-size:12px;font-weight:bold;color:#0033dd;padding:3px 10px 3px 10px;"></input>';
		wt += '<input id="qmvi_tplate_button2" onclick="qmvi_template_close_window()" type="button" value="Cancel" style="visibility:hidden;position:absolute;font-family:arial;font-size:12px;font-weight:bold;color:#333333;padding:3px 10px 3px 10px;"></input>';


		twin.innerHTML = wt;

		qm_create("vt2",false,0,0,false);

		qm_vtree_init(false,true);
		qmv_ibullets_init(false,true);
	
		var def = qmvi_template_init_tree_items();
		
		qmvi_template_tree_click(new Object(),def,true);
		twin.initialized = true;
		
	}

	twin.curtype = type;

	var tt = document.getElementById("qmvi_tplate_title_desc");
	var b1 = document.getElementById("qmvi_tplate_button");
	var b2 = document.getElementById("qmvi_tplate_button2");

	if (qmad.br_ie7)
	{
		b1.style.width = "160px";
		b2.style.width = "160px";
	}



	if (type=="add")
	{
		tt.innerHTML = "Add New Template Menu";
		b1.value = "Customize Menu";
		b2.value = "Cancel";
		b2.style.visibility = "visible";	
	}
	else
	{
		tt.innerHTML = "Start From Template";
		b1.value = "Customize Menu";
		b2.style.visibility = "hidden";	
	}


	twin.style.display = "block";
	

	if (twin.structure)
		qmvi_template_update_preview();
	
	qmvi_template_dialog_resize();
	qmvi_template_turn_structs_on_off();

	twin.style.visibility = "visible";
	
	

}

function qmvi_template_turn_structs_on_off()
{

	
	var pt = document.getElementById("qmvt2");
	var pta = pt.getElementsByTagName("A");
	for (var i=0;i<pta.length;i++)
	{
		
		if (pta[i].getAttribute("isstruct"))
		{
			
			if (qmv.tplate_dialog.structure)
			{
				
				pta[i].style.display="none";
				pta[i].cdiv.style.display = "none";
			}
			else
			{
				
				pta[i].style.display="";

				if (pta[i].cdiv.style.display!="block")
					pta[i].cdiv.style.display = "";

			}


		}

	}
}


function qmvi_template_init_tree_items()
{
	

	var a = document.getElementById("qmvi_tplate_tree");

	var atgs = a.getElementsByTagName("A");
	var deft = null;

	for (var i=0;i<atgs.length;i++)
	{
		if (atgs[i].getAttribute("isdef"))
			deft = atgs[i];

		
		if (atgs[i].getAttribute("qmtv"))
			atgs[i].onclick=qmvi_template_tree_click;
		
		if (atgs[i].getAttribute("isclickboxradio"))
			atgs[i].onclick = qmvi_template_tree_click_radio_or_check_from_atag;
		
		if (qm_a(atgs[i][qp]))
		{
			if (!qmv.tplate_last_tree_root)
				qmv.tplate_last_tree_root = atgs[i];

			atgs[i].onclick = function(event)
			{
				
				if (qmv.tplate_last_tree_root && qmv.tplate_last_tree_root!=this)
				{
					if (qmv.tplate_last_tree_root.cdiv.style.display=="block")
						qmv_tree_oo(event,qmv.tplate_last_tree_root);
				}
				

				if (this.cdiv && this.cdiv.style.display!="block")
				{

					
					qmvi_template_tree_click(event,this.cdiv.getElementsByTagName("A")[0]);

				}

				qmv_tree_oo(event,this);
				qmv.tplate_last_tree_root = this;
				
			}

		}
		
	}

	return deft;

}

function qmvi_template_customize_menu()
{



	var m_id=0;
	if (qmv.tplate_dialog.curtype=="add")
		m_id = qmv_lib_get_new_menu_id();

	qmvi_template_load_menu(qmv.tplate_dialog.mtype,qmv.tplate_dialog.mvar,m_id);




}

function qmvi_template_tree_click(e,obj,skip_focus_kill)
{
	

	if (!obj) obj = this;

	
	var mt = obj.getAttribute("qmtv");
	mt = mt.split("|");
	if (mt.length>2)
	{

		if (qmv.tplatelcur==obj)
			return;
		
		var mtype = parseInt(mt[0]);
		var mvar = mt[1];
		var mvar2 = mt[2];


		if (qmv.tplatelcur)
		{
			qm_arc("qmcur",qmv.tplatelcur);
			tobj = qmv.tplatelcur;
			while ((tobj = tobj[qp]) && !qm_a(tobj))
				qm_arc("qmcur",tobj.idiv);
		}

		qm_arc("qmcur",obj,true);	
		var tobj = obj;
		while ((tobj = tobj[qp]) && !qm_a(tobj))
			qm_arc("qmcur",tobj.idiv,true);


		qmv.tplatelcur = obj;


		
		if (qmv.tplate_dialog.mtype!=mtype || qmv.tplate_dialog.mvar!=mvar || qmv.tplate_dialog.mvar2!=mvar2)
			qmvi_template_dialog_show_template(mtype,mvar,mvar2);

		

		qmv.tplate_dialog.mtype = mtype;
		qmv.tplate_dialog.mvar = mvar;
		qmv.tplate_dialog.mvar2 = mvar2;


	}
	
	if (!skip_focus_kill)
		qmvi_template_tree_click_kill_focus();
	

}


function qmvi_template_tree_click_kill_focus()
{

	document.getElementById("qmvi_tplate_button").focus();

}



function qmvi_template_dialog_resize()
{

	var wd = qmv_lib_get_window_dimensions();

	var ro = qmv.tplate_dialog;
	ro.style.width = wd[0]+"px";
	ro.style.height = wd[1]+"px";
	ro.style.top = "0px";
	ro.style.left = "0px";

	var r1 = document.getElementById("qmvi_tplate_iframe");
	r1.style.width = (wd[0]-parseInt(r1.style.left)-10)+"px"
	r1.style.height = (wd[1]-parseInt(r1.style.top)-60)+"px"

	r1 = document.getElementById("qmvi_tplate_tree");
	r1.style.height = (wd[1]-parseInt(r1.style.top)-60)+"px"

	

	if (ro.curtype=="add" || ro.curtype=="apply")
	{
		var b1 = document.getElementById("qmvi_tplate_button");
		var b2 = document.getElementById("qmvi_tplate_button2");

		b1.style.top = (wd[1]-20-b1.offsetHeight)+"px";
		b1.style.left = (wd[0]-15-(b1.offsetWidth+b2.offsetWidth))+"px";
		b2.style.top = (wd[1]-20-b2.offsetHeight)+"px";
		b2.style.left = (wd[0]-10-b2.offsetWidth)+"px";

	}
	else
	{

		r1 = document.getElementById("qmvi_tplate_button");
		r1.style.top = (wd[1]-20-r1.offsetHeight)+"px";
		r1.style.left = (wd[0]-10-r1.offsetWidth)+"px";

	}

}


function qmvi_template_dialog_show_template(type,v1,v2)
{



	var mid = 0;
	var tt;
	var ts = qmvi_get_templates(type,v1);
	var ifr = document.getElementById("qmvi_tplate_iframe").contentWindow;
	

	var wt = '';
	
	wt += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">';
	wt += '<html>';
	wt += '<head>';


	

	wt += '<style type="text/css">';
	wt += qmv_pubgen_get_core_css(ts.purecsstype,mid,ts.isvert);
	wt += qmvi_template_gethtml_styles(ts,mid);
	wt += '</style>';
	

	if (ts.codetype=="hybrid")
	{
		
		wt += '<script type="text/JavaScript">';
		wt += qmv_get_source_code();
		wt += qmv_get_pure_css_javascript();
		wt += '</script>';
		wt += qmv_pubget_get_core_addon_css();

	
		tt = ts.addons.s;
		wt += '<script type="text/JavaScript">';
		wt += 'a=qmad.qm'+mid+' = new Object();';
		wt += tt;
		wt += '</script>';
	
		wt += '<script type="text/JavaScript">';
		wt += qmvi_template_gethtml_addon_script(ts.addons.use)
		wt += '</script>';
	}



	var addc = '';
	if (ts.bgcolor)
		addc = 'background-color:'+ts.bgcolor+';';

	wt += '</head>';
	wt += '<body onclick="qm_kille(event);return false;" oncontextmenu="qm_kille(event);return false;" style="margin:40px;'+addc+'">';


	
	if (ts.content=="show")
		wt += ts.addcontent_before;

	wt += qmvi_template_gethtml_structure(ts.structure,mid,ts.codetype);
	if (ts.codetype=="hybrid")
		wt += '<script type="text/JavaScript">qm_create('+mid+','+ts.create+')</script>';

	if (ts.content=="show")
		wt += ts.addcontent_after;

	wt += '</body>';
	wt += '</html>';
	
	ifr.document.open();
	ifr.document.write(wt);
	ifr.document.close();
	

	//ifr.location.href = qmv.base+"iframe_blank.html";
	//qmvi_template_gethtml_addon_fire_onloads(ts.addons.use,ifr)
	
}

/*
function qmvi_template_gethtml_addon_fire_onloads(a,win)
{

	var wt = '';

	var as = a.split(',');
	for (var i=0;i<as.length;i++)
	{

		if (as[i] && qmv.addons[as[i]].onload)
			eval("win."+qmv.addons[as[i]].onload);
			
	}


	return wt;


}
*/


function qmvi_template_gethtml_addon_script(a)
{

	var wt = '';

	var as = a.split(',');
	for (var i=0;i<as.length;i++)
	{
		if (as[i])
			wt += qmv.addons[as[i]].code;

		
	}


	return wt;
}


function qmvi_remove_ie6_child_selector_rules(rule)
{

	var rr = rule;

	if (qmad.br_ie && !qmad.br_ie7)
	{
		rr = '';
		var ssc = rule.split(",");
		for (var j=0;j<ssc.length;j++)
		{
					
			if (ssc[j].indexOf(">")==-1)
			{
				
				if (j>0) rr+=",";
				rr+=ssc[j];
			}

		}

	}	

	return rr;


}

function qmvi_template_gethtml_styles(ts,menu_id)
{

	var ss = ts.styles.s;

	var wt = '';

	for (var i=0;i<ss.length;i++)
	{
		var sl = ss[i].split("|");
		if (sl.length>1)
		{
			sl[0] = sl[0].replace(/\[\i\]/g,menu_id);
			sl[0] = qmvi_remove_ie6_child_selector_rules(sl[0]);
			wt += sl[0]+" {"+sl[1]+"}\r\n";
		}
	
	}	

	
	return wt;

}


function qmvi_template_convert_div_to_ul(a,r)
{

	
	var ch = a.childNodes;
	var nli;
	for (var i=0;i<ch.length;i++)
	{
		
		if (ch[i].tagName=="A")
		{
			
			var nli = document.createElement("LI");
			nli.appendChild(ch[i].cloneNode(true));
			r.appendChild(nli);

			
		}


		if (ch[i].tagName=="DIV")
		{

			var cu = document.createElement("UL");
			nli.appendChild(cu);
			
			new qmvi_template_convert_div_to_ul(ch[i],cu);

		}


	}



}

function qmvi_template_gethtml_structure(type,menu_id,codetype)
{


	var mh = "";


	if (qmv.tplate_dialog.structure)
	{
		if (codetype=="pure")
		{
			var r = document.createElement("UL");
			qmvi_template_convert_div_to_ul(qmv.tplate_dialog.structure,r);
			mh += '<ul id="qm'+menu_id+'" class="qmmc">'+r.innerHTML+'<li class="qmclear">&nbsp;</li></ul>';

		}
		else
			mh += '<div id="qm'+menu_id+'" class="qmmc">'+qmv.tplate_dialog.structure.innerHTML+'</div>';

		

	}
	else if (type==0)
	{

		//starter structure
		if (codetype=="pure")
		{

			mh += '<ul id="qm'+menu_id+'" class="qmmc">'

				mh += '<li><a class="qmparent" href="javascript:void(0);">Main Item 1</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Sub Item 1</a></li>'
					mh += '<li><a href="javascript:void(0);">Sub Item 2</a></li>'
					mh += '<li><a href="javascript:void(0);">Sub Item 3</a></li>'
					mh += '</ul></li>'

				mh += '<li><a class="qmparent" href="javascript:void(0);">Main Item 2</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Sub Item 1</a></li>'
					mh += '<li><a href="javascript:void(0);">Sub Item 2</a></li>'
					mh += '<li><a href="javascript:void(0);">Sub Item 3</a></li>'
					mh += '<li><a href="javascript:void(0);">Sub Item 4</a></li>'
					mh += '</ul></li>'

				mh += '<li><a class="qmparent" href="javascript:void(0);">Main Item 3</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Sub Item 1</a></li>'
					mh += '<li><a href="javascript:void(0);">Sub Item 2</a></li>'
					mh += '</ul></li>'

			mh += '<li class="qmclear">&nbsp;</li></ul>'


		}
		else
		{
			mh += '<div id="qm'+menu_id+'" class="qmmc">';
				mh += '<a href="javascript:void(0);">Main Item 1</a>';
					mh += '<div>';
					mh += '<a href="javascript:void(0);">Sub Item 1</a>';
					mh += '<a href="javascript:void(0);">Sub Item 2</a>';
					mh += '<a href="javascript:void(0);">Sub Item 3</a>';
					mh += '</div>';
				mh += '<a href="javascript:void(0);">Main Item 2</a>';
					mh += '<div>';
					mh += '<a href="javascript:void(0);">Sub Item 1</a>';
					mh += '<a href="javascript:void(0);">Sub Item 2</a>';
					mh += '<a href="javascript:void(0);">Sub Item 3</a>';
					mh += '<a href="javascript:void(0);">Sub Item 4</a>';
					mh += '</div>';
				mh += '<a href="javascript:void(0);">Main Item 3</a>';
					mh += '<div>';
					mh += '<a href="javascript:void(0);">Sub Item 1</a>';
					mh += '<a href="javascript:void(0);">Sub Item 2</a>';
					mh += '</div>';
			mh += '<span class="qmclear">&nbsp;</span></div>';
			mh += '</div>';
		}
	
	}
	else if (type==1)
	{

		//professional style

		if (codetype=="pure")
		{


			mh += '<ul id="qm'+menu_id+'" class="qmmc">'

				mh += '<li><a class="qmparent" href="javascript:void(0)">Who We Are</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Management</a></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0)">Global Sites</a>'

						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Asia</a></li>'
						mh += '<li><a href="javascript:void(0)">South America</a></li>'
						mh += '<li><a href="javascript:void(0)">Australia</a></li>'
						mh += '<li><a href="javascript:void(0)">North America</a></li>'
						mh += '<li><a href="javascript:void(0)">Europe</a></li>'
						mh += '<li><a href="javascript:void(0)">Africa</a></li>'
						mh += '</ul></li>'

					mh += '<li><a class="qmparent" href="javascript:void(0)">Investors</a>'

						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Worldwide</a></li>'
						mh += '<li><a href="javascript:void(0)">Equity Funds</a></li>'
						mh += '<li><a href="javascript:void(0)">Multi-National</a></li>'
						mh += '<li><a href="javascript:void(0)">Canadian</a></li>'
						mh += '<li><a href="javascript:void(0)">Specifics</a></li>'
						mh += '<li><a href="javascript:void(0)">US Origins</a></li>'
						mh += '</ul></li>'

					mh += '<li><a href="javascript:void(0)">Worldwide</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Overview</a></li>'
					mh += '<li><a href="javascript:void(0)">Publicity</a></li>'
					mh += '</ul></li>'

				mh += '<li><a class="qmparent" href="javascript:void(0)">Our Commitment</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Satisfaction</a></li>'
					mh += '<li><a href="javascript:void(0)">Our Goals</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Warranty</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Quality</a></li>'
					mh += '<li><a href="javascript:void(0)">Continued Support</a></li>'
					mh += '</ul></li>'

				mh += '<li><a class="qmparent" href="javascript:void(0)">Our Investors</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Annual Meetings</a></li>'
					mh += '<li><a href="javascript:void(0)">Financial Reports</a></li>'
					mh += '<li><a href="javascript:void(0)">Nasdaq Quoting</a></li>'
					mh += '<li><a href="javascript:void(0)">Dividend Information</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">CEO Announcements</a></li>'
					mh += '</ul></li>'

				mh += '<li><a class="qmparent" href="javascript:void(0)">Technology</a>'

					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Satisfaction</a></li>'
					mh += '<li><a href="javascript:void(0)">Our Goals</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Warranty</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Quality</a></li>'
					mh += '<li><a href="javascript:void(0)">Continued Support</a></li>'
					mh += '</ul></li>'

			mh += '<li class="qmclear">&nbsp;</li></ul>'
			


		}
		else
		{
			mh += '<div id="qm'+menu_id+'" class="qmmc">'

				mh += '<a href="javascript:void(0)">Who We Are</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Management</a>'
					mh += '<a href="javascript:void(0)">Global Sites</a>'

						mh += '<div>'
						mh += '<a href="javascript:void(0)">Asia</a>'
						mh += '<a href="javascript:void(0)">South America</a>'
						mh += '<a href="javascript:void(0)">Australia</a>'
						mh += '<a href="javascript:void(0)">North America</a>'
						mh += '<a href="javascript:void(0)">Europe</a>'
						mh += '<a href="javascript:void(0)">Africa</a>'
						mh += '</div>'

					mh += '<a href="javascript:void(0)">Investors</a>'

						mh += '<div>'
						mh += '<a href="javascript:void(0)">Worldwide</a>'
						mh += '<a href="javascript:void(0)">Equity Funds</a>'
						mh += '<a href="javascript:void(0)">Multi National</a>'
						mh += '<a href="javascript:void(0)">Canadian</a>'
						mh += '<a href="javascript:void(0)">Specifics</a>'
						mh += '<a href="javascript:void(0)">US Origins</a>'
						mh += '</div>'

					mh += '<a href="javascript:void(0)">Worldwide</a>'
					mh += '<a href="javascript:void(0)">Product Overview</a>'
					mh += '<a href="javascript:void(0)">Publicity</a>'
					mh += '<a href="javascript:void(0)">Media Events</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0)">Our Commitment</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Satisfaction</a>'
					mh += '<a href="javascript:void(0)">Our Goals</a>'
					mh += '<a href="javascript:void(0)">Product Warranty</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">Product Quality</a>'
					mh += '<a href="javascript:void(0)">Continued Support</a>'
					mh += '</div>'

				mh += '<a href="javascript:void(0)">Our Investors</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Annual Meetings</a>'
					mh += '<a href="javascript:void(0)">Financial Reports</a>'
					mh += '<a href="javascript:void(0)">Nasdaq Quoting</a>'
					mh += '<a href="javascript:void(0)">Dividend Information</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">CEO Announcements</a>'
					mh += '</div>'

				mh += '<a href="javascript:void(0)">Technology</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Satisfaction</a>'
					mh += '<a href="javascript:void(0)">Our Goals</a>'
					mh += '<a href="javascript:void(0)">Product Warranty</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">Product Quality</a>'
					mh += '<a href="javascript:void(0)">Continued Support</a>'
					mh += '</div>'

			mh += '<span class="qmclear">&nbsp;</span></div>'

		}


	}
	else if (type==2)
	{
		//divders and titles

		if (codetype=="pure")
		{

			mh += '<ul id="qm0" class="qmmc">'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Solutions</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmtitle" >Industries</span></li>'
					mh += '<li><a href="javascript:void(0)">Education</a></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0)">Financial Services</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Government</a></li>'
						mh += '<li><a href="javascript:void(0)">Manufacturing</a></li>'
						mh += '<li><a href="javascript:void(0)">Locations</a></li>'
						mh += '<li><a href="javascript:void(0)">Tech. Lending</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a href="javascript:void(0)">Government</a></li>'
					mh += '<li><a href="javascript:void(0)">Manufacturing</a></li>'
					mh += '<li><a href="javascript:void(0)">Telecom Services</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><span class="qmtitle" >Solutions</span></li>'
					mh += '<li><a href="javascript:void(0)">Digital Imaging</a></li>'
					mh += '<li><a href="javascript:void(0);">Mobil</a></li>'
					mh += '<li><a href="javascript:void(0);">Print Publishing</a></li>'
					mh += '<li><a href="javascript:void(0);">Rich Internet Applications</a></li>'
					mh += '<li><a href="javascript:void(0);">Training and eLearning</a></li>'
					mh += '<li><a href="javascript:void(0);">Video and Audio</a></li>'
					mh += '<li><a href="javascript:void(0);">Web Conferencing</a></li>'
					mh += '<li><a href="javascript:void(0);">Web Publishing</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">All Industries and Solutions</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Products</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Acrobat Connect</a></li>'
					mh += '<li><a href="javascript:void(0)">Acrobat Family</a></li>'
					mh += '<li><a href="javascript:void(0)">After Effects</a></li>'
					mh += '<li><a href="javascript:void(0)">Cold Fusion</a></li>'
					mh += '<li><a href="javascript:void(0)">Creative Suite Family</a></li>'
					mh += '<li><a href="javascript:void(0)">Dreamweaver</a></li>'
					mh += '<li><a href="javascript:void(0);">Flash</a></li>'
					mh += '<li><a href="javascript:void(0);">Flex</a></li>'
					mh += '<li><a href="javascript:void(0);">Illustrator</a></li>'
					mh += '<li><a href="javascript:void(0);">LiveCycle Enterprise Suite</a></li>'
					mh += '<li><a href="javascript:void(0);">Mobile Products</a></li>'
					mh += '<li><a href="javascript:void(0);">Photoshop Family</a></li>'
					mh += '<li><a href="javascript:void(0);">Premiere</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">All Products</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Support</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Support Home</a></li>'
					mh += '<li><a href="javascript:void(0)">Customer Service</a></li>'
					mh += '<li><a href="javascript:void(0)">Knowledge Base</a></li>'
					mh += '<li><a href="javascript:void(0)">Books</a></li>'
					mh += '<li><a href="javascript:void(0)">Training and Certification</a></li>'
					mh += '<li><a href="javascript:void(0)">Support Programs</a></li>'
					mh += '<li><a href="javascript:void(0);">Forums</a></li>'
					mh += '<li><a href="javascript:void(0);">Documentation</a></li>'
					mh += '<li><a href="javascript:void(0);">Updates</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">More</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Communities</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmtitle" >By User</span></li>'
					mh += '<li><a href="javascript:void(0)">Graphic Designers</a></li>'
					mh += '<li><a href="javascript:void(0)">Web Developers</a></li>'
					mh += '<li><a href="javascript:void(0)">Educators</a></li>'
					mh += '<li><a href="javascript:void(0)">Partners</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><span class="qmtitle" >By Resource</span></li>'
					mh += '<li><a href="javascript:void(0)">Adobe Labs</a></li>'
					mh += '<li><a href="javascript:void(0)">Technical Forums</a></li>'
					mh += '<li><a href="javascript:void(0);">Idea Exchange</a></li>'
					mh += '<li><a href="javascript:void(0);">Blogs</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0);">Company</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">About Adobe</a></li>'
					mh += '<li><a href="javascript:void(0);">Press</a></li>'
					mh += '<li><a href="javascript:void(0);">Investor Relations</a></li>'
					mh += '<li><a href="javascript:void(0);">Corporate Affairs</a></li>'
					mh += '<li><a href="javascript:void(0);">Jobs</a></li>'
					mh += '<li><a href="javascript:void(0);">Showcase</a></li>'
					mh += '<li><a href="javascript:void(0);">Events</a></li>'
					mh += '<li><a href="javascript:void(0);">Contact Adobe</a></li>'
					mh += '<li><a href="javascript:void(0);">Become an Affiliate</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">More</a></li>'
					mh += '</ul></li>'
			
		mh += '<li class="qmclear">&nbsp;</li></ul>'




		}
		else
		{

			mh += '<div id="qm'+menu_id+'" class="qmmc">'

				mh += '<a href="javascript:void(0)">Solutions</a>'

					mh += '<div>'
					mh += '<span class="qmtitle" >Industries</span>'
					mh += '<a href="javascript:void(0)">Education</a>'
					mh += '<a href="javascript:void(0)">Financial Services</a>'
				
						mh += '<div>'
						mh += '<a href="javascript:void(0)">Government</a>'
						mh += '<a href="javascript:void(0)">Manufacturing</a>'
						mh += '<a href="javascript:void(0)">Locations</a>'
						mh += '<a href="javascript:void(0)">Tech. Lending</a>'
						mh += '</div>'

					mh += '<a href="javascript:void(0)">Government</a>'
					mh += '<a href="javascript:void(0)">Manufacturing</a>'
					mh += '<a href="javascript:void(0)">Telecom Services</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<span class="qmtitle" >Solutions</span>'
					mh += '<a href="javascript:void(0)">Digital Imaging</a>'
					mh += '<a href="javascript:void(0);">Mobil</a>'
					mh += '<a href="javascript:void(0);">Print Publishing</a>'
					mh += '<a href="javascript:void(0);">Rich Internet Applications</a>'
					mh += '<a href="javascript:void(0);">Training and eLearning</a>'
					mh += '<a href="javascript:void(0);">Video and Audio</a>'
					mh += '<a href="javascript:void(0);">Web Conferencing</a>'
					mh += '<a href="javascript:void(0);">Web Publishing</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">All Industries and Solutions</a>'
					mh += '</div>'


				mh += '<a href="javascript:void(0)">Products</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Acrobat Connect</a>'
					mh += '<a href="javascript:void(0)">Acrobat Family</a>'
					mh += '<a href="javascript:void(0)">After Effects</a>'
					mh += '<a href="javascript:void(0)">Cold Fusion</a>'
					mh += '<a href="javascript:void(0)">Creative Suite Family</a>'
					mh += '<a href="javascript:void(0)">Dreamweaver</a>'
					mh += '<a href="javascript:void(0);">Flash</a>'
					mh += '<a href="javascript:void(0);">Flex</a>'
					mh += '<a href="javascript:void(0);">Illustrator</a>'
					mh += '<a href="javascript:void(0);">LiveCycle Enterprise Suite</a>'
					mh += '<a href="javascript:void(0);">Mobile Products</a>'
					mh += '<a href="javascript:void(0);">Photoshop Family</a>'
					mh += '<a href="javascript:void(0);">Premiere</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">All Products</a>'
					mh += '</div>'


				mh += '<a href="javascript:void(0)">Support</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Support Home</a>'
					mh += '<a href="javascript:void(0)">Customer Service</a>'
					mh += '<a href="javascript:void(0)">Knowledge Base</a>'
					mh += '<a href="javascript:void(0)">Books</a>'
					mh += '<a href="javascript:void(0)">Training and Certification</a>'
					mh += '<a href="javascript:void(0)">Support Programs</a>'
					mh += '<a href="javascript:void(0);">Forums</a>'
					mh += '<a href="javascript:void(0);">Documentation</a>'
					mh += '<a href="javascript:void(0);">Updates</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">More</a>'
					mh += '</div>'

	
				mh += '<a href="javascript:void(0)">Communities</a>'

					mh += '<div>'
					mh += '<span class="qmtitle" >By User</span>'
					mh += '<a href="javascript:void(0)">Graphic Designers</a>'
					mh += '<a href="javascript:void(0)">Web Developers</a>'
					mh += '<a href="javascript:void(0)">Educators</a>'
					mh += '<a href="javascript:void(0)">Partners</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<span class="qmtitle" >By Resource</span>'
					mh += '<a href="javascript:void(0)">Adobe Labs</a>'
					mh += '<a href="javascript:void(0)">Technical Forums</a>'
					mh += '<a href="javascript:void(0);">Idea Exchange</a>'
					mh += '<a href="javascript:void(0);">Blogs</a>'
					mh += '</div>'


				mh += '<a href="javascript:void(0);">Company</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0);">About Adobe</a>'
					mh += '<a href="javascript:void(0);">Press</a>'
					mh += '<a href="javascript:void(0);">Investor Relations</a>'
					mh += '<a href="javascript:void(0);">Corporate Affairs</a>'
					mh += '<a href="javascript:void(0);">Jobs</a>'
					mh += '<a href="javascript:void(0);">Showcase</a>'
					mh += '<a href="javascript:void(0);">Events</a>'
					mh += '<a href="javascript:void(0);">Contact Adobe</a>'
					mh += '<a href="javascript:void(0);">Become an Affiliate</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">More</a>'
					mh += '</div>'

			mh += '<span class="qmclear">&nbsp;</span></div>'
		}






	}
	else if (type==3)
	{
		//deeply nested

		if (codetype=="pure")
		{

				mh += '<ul id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<li><a class="qmparent" href="javascript:void(0);">Designs</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Suburban</a></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0);">Technology</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0);">New Wave</a></li>'
						mh += '<li><a href="javascript:void(0);">Futuristic</a></li>'
						mh += '<li><a class="qmparent" href="javascript:void(0);">Deep Space</a>'
			
							mh += '<ul>'
							mh += '<li><a href="javascript:void(0);">Plasma Beem</a></li>'
							mh += '<li><a class="qmparent" href="javascript:void(0);">Exploding Stars</a>'
			
								mh += '<ul>'
								mh += '<li><a href="javascript:void(0);">Gama Cluster 511c</a></li>'
								mh += '<li><a href="javascript:void(0);">Galaxy 5b</a></li>'
								mh += '<li><a href="javascript:void(0);">Moon Based</a></li>'
								mh += '<li><a href="javascript:void(0);">Sister Systems</a></li>'
								mh += '<li><a href="javascript:void(0);">Red Dwarfs</a></li>'
								mh += '<li><a href="javascript:void(0);">Black Holes</a></li>'
								mh += '</ul></li>'
			
							mh += '<li><a href="javascript:void(0);">Space Voyage</a></li>'
							mh += '<li><a href="javascript:void(0);">Enterprise</a></li>'
							mh += '</ul></li>'
			
						mh += '<li><a href="javascript:void(0);">Earth Based</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a href="javascript:void(0);">Global Appeal</a></li>'
					mh += '<li><a href="javascript:void(0);">Air and Space</a></li>'
					mh += '<li><a href="javascript:void(0);">American Heritage</a></li>'
					mh += '<li><a href="javascript:void(0);">Arctic Wildlife</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0);">Media Events</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Network Anchors</a></li>'
					mh += '<li><a href="javascript:void(0);">Conventions</a></li>'
					mh += '<li><a href="javascript:void(0);">Printable Materials</a></li>'
					mh += '<li><a href="javascript:void(0);">December Programs</a></li>'
					mh += '<li><a href="javascript:void(0);">Promotional</a></li>'
					mh += '<li><a href="javascript:void(0);">Hollywood Support</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0);">Outreach</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Community Involvement</a></li>'
					mh += '<li><a href="javascript:void(0);">Non Profit Connections</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a href="javascript:void(0);">Building Block</a></li>'
			mh += '<li class="qmclear">&nbsp;</li></ul>'


		}
		else
		{
			mh += '<div id="qm'+menu_id+'" class="qmmc">'
	
				mh += '<a href="javascript:void(0);">Designs</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0);">Suburban</a>'
					mh += '<a href="javascript:void(0);">Technology</a>'
	
						mh += '<div>'
						mh += '<a href="javascript:void(0);">New Wave</a>'
						mh += '<a href="javascript:void(0);">Futuristic</a>'
						mh += '<a href="javascript:void(0);">Deep Space</a>'
	
							mh += '<div>'
							mh += '<a href="javascript:void(0);">Plasma Beem</a>'
							mh += '<a href="javascript:void(0);">Exploding Stars</a>'
	
								mh += '<div>'
								mh += '<a href="javascript:void(0);">Gama Cluster 511c</a>'
								mh += '<a href="javascript:void(0);">Galaxy 5b</a>'
								mh += '<a href="javascript:void(0);">Moon Based</a>'
								mh += '<a href="javascript:void(0);">Sister Systems</a>'
								mh += '<a href="javascript:void(0);">Red Dwarfs</a>'
								mh += '<a href="javascript:void(0);">Black Holes</a>'
								mh += '</div>'
	
						mh += '<a href="javascript:void(0);">Space Voyage</a>'
						mh += '<a href="javascript:void(0);">Enterprise</a>'
						mh += '</div>'
			
					mh += '<a href="javascript:void(0);">Earth Based</a>'
					mh += '</div>'
	
					mh += '<a href="javascript:void(0);">Global Appeal</a>'
					mh += '<a href="javascript:void(0);">Air and Space</a>'
					mh += '<a href="javascript:void(0);">American Heritage</a>'
					mh += '<a href="javascript:void(0);">Arctic Wildlife</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0);">Media Events</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0);">Network Anchors</a>'
					mh += '<a href="javascript:void(0);">Conventions</a>'
					mh += '<a href="javascript:void(0);">Printable Materials</a>'
					mh += '<a href="javascript:void(0);">December Programs</a>'
					mh += '<a href="javascript:void(0);">Promotional</a>'
					mh += '<a href="javascript:void(0);">Hollywood Support</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0);">Outreach</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0);">Community Involvement</a>'
					mh += '<a href="javascript:void(0);">Non Profit Connections</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0);">Building Block</a>'
			mh += '<span class="qmclear">&nbsp;</span></div>'
		}



	}
	else if (type==4)
	{

		//adobe clone


		if (codetype=="pure")
		{



			mh += '<ul id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">SOLUTIONS</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmtitle" >Industries</span></li>'
					mh += '<li><a href="javascript:void(0)">Education</a></li>'
					mh += '<li><a href="javascript:void(0)">Financial Services</a></li>'
					mh += '<li><a href="javascript:void(0)">Government</a></li>'
					mh += '<li><a href="javascript:void(0)">Manufacturing</a></li>'
					mh += '<li><a href="javascript:void(0)">Telecommunications</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><span class="qmtitle" >Solutions</span></li>'
					mh += '<li><a href="javascript:void(0)">Digital Imaging</a></li>'
					mh += '<li><a href="javascript:void(0);">Mobil</a></li>'
					mh += '<li><a href="javascript:void(0);">Print Publishing</a></li>'
					mh += '<li><a href="javascript:void(0);">Rich Internet Applications</a></li>'
					mh += '<li><a href="javascript:void(0);">Training and eLearning</a></li>'
					mh += '<li><a href="javascript:void(0);">Video and Audio</a></li>'
					mh += '<li><a href="javascript:void(0);">Web Conferencing</a></li>'
					mh += '<li><a href="javascript:void(0);">Web Publishing</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">All Industries and Solutions</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0)">PRODUCTS</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Acrobat Connect</a></li>'
					mh += '<li><a href="javascript:void(0)">Acrobat Family</a></li>'
					mh += '<li><a href="javascript:void(0)">After Effects</a></li>'
					mh += '<li><a href="javascript:void(0)">Cold Fusion</a></li>'
					mh += '<li><a href="javascript:void(0)">Creative Suite Family</a></li>'
					mh += '<li><a href="javascript:void(0)">Dreamweaver</a></li>'
					mh += '<li><a href="javascript:void(0);">Flash</a></li>'
					mh += '<li><a href="javascript:void(0);">Flex</a></li>'
					mh += '<li><a href="javascript:void(0);">Illustrator</a></li>'
					mh += '<li><a href="javascript:void(0);">LiveCycle Enterprise Suite</a></li>'
					mh += '<li><a href="javascript:void(0);">Mobile Products</a></li>'
					mh += '<li><a href="javascript:void(0);">Photoshop Family</a></li>'
					mh += '<li><a href="javascript:void(0);">Premiere</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">All Products</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0)">SUPPORT</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Support Home</a></li>'
					mh += '<li><a href="javascript:void(0)">Customer Service</a></li>'
					mh += '<li><a href="javascript:void(0)">Knowledge Base</a></li>'
					mh += '<li><a href="javascript:void(0)">Books</a></li>'
					mh += '<li><a href="javascript:void(0)">Training and Certification</a></li>'
					mh += '<li><a href="javascript:void(0)">Support Programs</a></li>'
					mh += '<li><a href="javascript:void(0);">Forums</a></li>'
					mh += '<li><a href="javascript:void(0);">Documentation</a></li>'
					mh += '<li><a href="javascript:void(0);">Updates</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">More</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0)">COMMUNITIES</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmtitle" >By User</span></li>'
					mh += '<li><a href="javascript:void(0)">Graphic Designers</a></li>'
					mh += '<li><a href="javascript:void(0)">Web Developers</a></li>'
					mh += '<li><a href="javascript:void(0)">Educators</a></li>'
					mh += '<li><a href="javascript:void(0)">Partners</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><span class="qmtitle" >By Resource</span></li>'
					mh += '<li><a href="javascript:void(0)">National Adobe Lab Locations</a></li>'
					mh += '<li><a href="javascript:void(0)">Forums</a></li>'
					mh += '<li><a href="javascript:void(0);">Exchange</a></li>'
					mh += '<li><a href="javascript:void(0);">Blogs</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0);">COMPANY</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">About Adobe</a></li>'
					mh += '<li><a href="javascript:void(0);">Press</a></li>'
					mh += '<li><a href="javascript:void(0);">Investor Relations and Data</a></li>'
					mh += '<li><a href="javascript:void(0);">Corporate Affairs</a></li>'
					mh += '<li><a href="javascript:void(0);">Jobs</a></li>'
					mh += '<li><a href="javascript:void(0);">Showcase</a></li>'
					mh += '<li><a href="javascript:void(0);">Events</a></li>'
					mh += '<li><a href="javascript:void(0);">Contact Adobe</a></li>'
					mh += '<li><a href="javascript:void(0);">Become an Affiliate</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">More</a></li>'
					mh += '</ul></li>'
			
			mh += '<li class="qmclear">&nbsp;</li></ul>'



		}
		else
		{

		
			mh += '<div id="qm'+menu_id+'" class="qmmc">'

				mh += '<a href="javascript:void(0)">SOLUTIONS</a>'

					mh += '<div>'
					mh += '<span class="qmtitle" >Industries</span>'
					mh += '<a href="javascript:void(0)">Education</a>'
					mh += '<a href="javascript:void(0)">Financial Services</a>'
					mh += '<a href="javascript:void(0)">Government</a>'
					mh += '<a href="javascript:void(0)">Manufacturing</a>'
					mh += '<a href="javascript:void(0)">Telecommunications</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<span class="qmtitle" >Solutions</span>'
					mh += '<a href="javascript:void(0)">Digital Imaging</a>'
					mh += '<a href="javascript:void(0);">Mobil</a>'
					mh += '<a href="javascript:void(0);">Print Publishing</a>'
					mh += '<a href="javascript:void(0);">Rich Internet Applications</a>'
					mh += '<a href="javascript:void(0);">Training and eLearning</a>'
					mh += '<a href="javascript:void(0);">Video and Audio</a>'
					mh += '<a href="javascript:void(0);">Web Conferencing</a>'
					mh += '<a href="javascript:void(0);">Web Publishing</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">All Industries and Solutions</a>'
					mh += '</div>'

				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0)">PRODUCTS</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Acrobat Connect</a>'
					mh += '<a href="javascript:void(0)">Acrobat Family</a>'
					mh += '<a href="javascript:void(0)">After Effects</a>'
					mh += '<a href="javascript:void(0)">Cold Fusion</a>'
					mh += '<a href="javascript:void(0)">Creative Suite Family</a>'
					mh += '<a href="javascript:void(0)">Dreamweaver</a>'
					mh += '<a href="javascript:void(0);">Flash</a>'
					mh += '<a href="javascript:void(0);">Flex</a>'
					mh += '<a href="javascript:void(0);">Illustrator</a>'
					mh += '<a href="javascript:void(0);">LiveCycle Enterprise Suite</a>'
					mh += '<a href="javascript:void(0);">Mobile Products</a>'
					mh += '<a href="javascript:void(0);">Photoshop Family</a>'
					mh += '<a href="javascript:void(0);">Premiere</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">All Products</a>'
					mh += '</div>'

				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0)">SUPPORT</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Support Home</a>'
					mh += '<a href="javascript:void(0)">Customer Service</a>'
					mh += '<a href="javascript:void(0)">Knowledge Base</a>'
					mh += '<a href="javascript:void(0)">Books</a>'
					mh += '<a href="javascript:void(0)">Training and Certification</a>'
					mh += '<a href="javascript:void(0)">Support Programs</a>'
					mh += '<a href="javascript:void(0);">Forums</a>'
					mh += '<a href="javascript:void(0);">Documentation</a>'
					mh += '<a href="javascript:void(0);">Updates</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">More</a>'
					mh += '</div>'

				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0)">COMMUNITIES</a>'

					mh += '<div>'
					mh += '<span class="qmtitle" >By User</span>'
					mh += '<a href="javascript:void(0)">Graphic Designers</a>'
					mh += '<a href="javascript:void(0)">Web Developers</a>'
					mh += '<a href="javascript:void(0)">Educators</a>'
					mh += '<a href="javascript:void(0)">Partners</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<span class="qmtitle" >By Resource</span>'
					mh += '<a href="javascript:void(0)">National Adobe Lab Locations</a>'
					mh += '<a href="javascript:void(0)">Forums</a>'
					mh += '<a href="javascript:void(0);">Exchange</a>'
					mh += '<a href="javascript:void(0);">Blogs</a>'
					mh += '</div>'

				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0);">COMPANY</a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0);">About Adobe</a>'
					mh += '<a href="javascript:void(0);">Press</a>'
					mh += '<a href="javascript:void(0);">Investor Relations and Data</a>'
					mh += '<a href="javascript:void(0);">Corporate Affairs</a>'
					mh += '<a href="javascript:void(0);">Jobs</a>'
					mh += '<a href="javascript:void(0);">Showcase</a>'
					mh += '<a href="javascript:void(0);">Events</a>'
					mh += '<a href="javascript:void(0);">Contact Adobe</a>'
					mh += '<a href="javascript:void(0);">Become an Affiliate</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">More</a>'
					mh += '</div>'

			mh += '<span class="qmclear">&nbsp;</span></div>'



		}


	}
	else if (type==5)
	{

		//sony style

		if (codetype=="pure")
		{

			mh += '<ul id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Tech Divisions</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Management</a></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0)">Global Sites</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Asia</a></li>'
						mh += '<li><a href="javascript:void(0)">South America</a></li>'
						mh += '<li><a href="javascript:void(0)">Australia</a></li>'
						mh += '<li><a href="javascript:void(0)">North America</a></li>'
						mh += '<li><a href="javascript:void(0)">Europe654</a></li>'
						mh += '<li><a href="javascript:void(0)">Africa</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a class="qmparent" href="javascript:void(0)">Investors</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Sony</a></li>'
						mh += '<li><a href="javascript:void(0)">Fed-Ex</a></li>'
						mh += '<li><a href="javascript:void(0)">Corp. A and B</a></li>'
						mh += '<li><a href="javascript:void(0)">Smuckers</a></li>'
						mh += '<li><a href="javascript:void(0)">Phillips</a></li>'
						mh += '<li><a href="javascript:void(0)">Slats Brewery</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a href="javascript:void(0)">Worldwide</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Overview</a></li>'
					mh += '<li><a href="javascript:void(0)">Publicity</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Advancement</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Satisfaction</a></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0)">Our Goals</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0);">Customer Satisfaction</a></li>'
						mh += '<li><a href="javascript:void(0);">Sales Forcast</a></li>'
						mh += '<li><a href="javascript:void(0);">Projections</a></li>'
						mh += '<li><a href="javascript:void(0);">Advanced Products</a></li>'
						mh += '<li><a href="javascript:void(0);">Employee Commitment</a></li>'
						mh += '<li><a href="javascript:void(0);">Environmental</a></li>'
						mh += '<li><a href="javascript:void(0);">Law Suit Avoidence</a></li>'
						mh += '<li><a href="javascript:void(0);">Free Ice Cream</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a href="javascript:void(0)">Product Warranty</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Quality</a></li>'
					mh += '<li><a href="javascript:void(0)">Continued Support</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Our Investors</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Annual Meetings</a></li>'
					mh += '<li><a href="javascript:void(0)">Financial Reports</a></li>'
					mh += '<li><a href="javascript:void(0)">Nasdaq Quoting</a></li>'
					mh += '<li><a href="javascript:void(0)">Dividend Information</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">CEO Announcements</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Relations</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Satisfaction</a></li>'
					mh += '<li><a href="javascript:void(0)">Our Goals</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Warranty</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Quality</a></li>'
					mh += '<li><a href="javascript:void(0)">Continued Support</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0);">Propulsion</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0);">Advanced Science</a></li>'
					mh += '<li><a href="javascript:void(0);">Biological Impact</a></li>'
					mh += '<li><a href="javascript:void(0);">Trajectories</a></li>'
					mh += '<li><a href="javascript:void(0);">Gravity Boosting</a></li>'
					mh += '<li><a href="javascript:void(0);">Clean Fuels</a></li>'
					mh += '</ul></li>'
			
			mh += '<li class="qmclear">&nbsp;</li></ul>'





		}
		else
		{

			mh += '<div id="qm'+menu_id+'" class="qmmc">'
	
				mh += '<a href="javascript:void(0)">Tech Divisions</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Management</a>'
					mh += '<a href="javascript:void(0)">Global Sites</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Asia</a>'
					mh += '<a href="javascript:void(0)">South America</a>'
					mh += '<a href="javascript:void(0)">Australia</a>'
					mh += '<a href="javascript:void(0)">North America</a>'
					mh += '<a href="javascript:void(0)">Europe654</a>'
					mh += '<a href="javascript:void(0)">Africa</a>'
					mh += '</div>'
	
					mh += '<a href="javascript:void(0)">Investors</a>'
	
						mh += '<div>'
						mh += '<a href="javascript:void(0)">Sony</a>'
						mh += '<a href="javascript:void(0)">Fed-Ex</a>'
						mh += '<a href="javascript:void(0)">Corp. A and B</a>'
						mh += '<a href="javascript:void(0)">Smuckers</a>'
						mh += '<a href="javascript:void(0)">Phillips</a>'
						mh += '<a href="javascript:void(0)">Slats Brewery</a>'
						mh += '</div>'
	
					mh += '<a href="javascript:void(0)">Worldwide</a>'
					mh += '<a href="javascript:void(0)">Product Overview</a>'
					mh += '<a href="javascript:void(0)">Publicity</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0)">Advancement</a>'
	
				mh += '<div>'
					mh += '<a href="javascript:void(0)">Satisfaction</a>'
					mh += '<a href="javascript:void(0)">Our Goals</a>'
	
						mh += '<div>'
						mh += '<a href="javascript:void(0);">Customer Satisfaction</a>'
						mh += '<a href="javascript:void(0);">Sales Forcast</a>'
						mh += '<a href="javascript:void(0);">Projections</a>'
						mh += '<a href="javascript:void(0);">Advanced Products</a>'
						mh += '<a href="javascript:void(0);">Employee Commitment</a>'
						mh += '<a href="javascript:void(0);">Environmental</a>'
						mh += '<a href="javascript:void(0);">Law Suit Avoidence</a>'
						mh += '<a href="javascript:void(0);">Free Ice Cream</a>'
						mh += '</div>'
	
					mh += '<a href="javascript:void(0)">Product Warranty</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">Product Quality</a>'
					mh += '<a href="javascript:void(0)">Continued Support</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0)">Our Investors</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Annual Meetings</a>'
					mh += '<a href="javascript:void(0)">Financial Reports</a>'
					mh += '<a href="javascript:void(0)">Nasdaq Quoting</a>'
					mh += '<a href="javascript:void(0)">Dividend Information</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">CEO Announcements</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0)">Relations</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Satisfaction</a>'
					mh += '<a href="javascript:void(0)">Our Goals</a>'
					mh += '<a href="javascript:void(0)">Product Warranty</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">Product Quality</a>'
					mh += '<a href="javascript:void(0)">Continued Support</a>'
					mh += '</div>'
	
				mh += '<a href="javascript:void(0);">Propulsion</a>'
	
					mh += '<div>'
					mh += '<a href="javascript:void(0);">Advanced Science</a>'
					mh += '<a href="javascript:void(0);">Biological Impact</a>'
					mh += '<a href="javascript:void(0);">Trajectories</a>'
					mh += '<a href="javascript:void(0);">Gravity Boosting</a>'
					mh += '<a href="javascript:void(0);">Clean Fuels</a>'
					mh += '</div>'
	
			mh += '<span class="qmclear">&nbsp;</span></div>'



		}

	}
	else if (type==6)
	{
		//divders and titles

		if (codetype=="pure")
		{

			mh += '<ul id="qm0" class="qmmc">'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/cat50.jpg" width="110" height="82"></a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmtitle" >Industries</span></li>'
					mh += '<li><a href="javascript:void(0)">Education</a></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0)">Financial Services</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Government</a></li>'
						mh += '<li><a href="javascript:void(0)">Manufacturing</a></li>'
						mh += '<li><a href="javascript:void(0)">Locations</a></li>'
						mh += '<li><a href="javascript:void(0)">Tech. Lending</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a href="javascript:void(0)">Government</a></li>'
					mh += '<li><a href="javascript:void(0)">Manufacturing</a></li>'
					mh += '<li><a href="javascript:void(0)">Telecom Services</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><span class="qmtitle" >Solutions</span></li>'
					mh += '<li><a href="javascript:void(0)">Digital Imaging</a></li>'
					mh += '<li><a href="javascript:void(0);">Mobil</a></li>'
					mh += '<li><a href="javascript:void(0);">Print Publishing</a></li>'
					mh += '<li><a href="javascript:void(0);">Rich Internet Applications</a></li>'
					mh += '<li><a href="javascript:void(0);">Training and eLearning</a></li>'
					mh += '<li><a href="javascript:void(0);">Video and Audio</a></li>'
					mh += '<li><a href="javascript:void(0);">Web Conferencing</a></li>'
					mh += '<li><a href="javascript:void(0);">Web Publishing</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">All Industries and Solutions</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/city0.jpg" width="110" height="82"></a></a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Acrobat Connect</a></li>'
					mh += '<li><a href="javascript:void(0)">Acrobat Family</a></li>'
					mh += '<li><a href="javascript:void(0)">After Effects</a></li>'
					mh += '<li><a href="javascript:void(0)">Cold Fusion</a></li>'
					mh += '<li><a href="javascript:void(0)">Creative Suite Family</a></li>'
					mh += '<li><a href="javascript:void(0)">Dreamweaver</a></li>'
					mh += '<li><a href="javascript:void(0);">Flash</a></li>'
					mh += '<li><a href="javascript:void(0);">Flex</a></li>'
					mh += '<li><a href="javascript:void(0);">Illustrator</a></li>'
					mh += '<li><a href="javascript:void(0);">LiveCycle Enterprise Suite</a></li>'
					mh += '<li><a href="javascript:void(0);">Mobile Products</a></li>'
					mh += '<li><a href="javascript:void(0);">Photoshop Family</a></li>'
					mh += '<li><a href="javascript:void(0);">Premiere</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">All Products</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/phone0.jpg" width="110" height="82"></a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Support Home</a></li>'
					mh += '<li><a href="javascript:void(0)">Customer Service</a></li>'
					mh += '<li><a href="javascript:void(0)">Knowledge Base</a></li>'
					mh += '<li><a href="javascript:void(0)">Books</a></li>'
					mh += '<li><a href="javascript:void(0)">Training and Certification</a></li>'
					mh += '<li><a href="javascript:void(0)">Support Programs</a></li>'
					mh += '<li><a href="javascript:void(0);">Forums</a></li>'
					mh += '<li><a href="javascript:void(0);">Documentation</a></li>'
					mh += '<li><a href="javascript:void(0);">Updates</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0);">More</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)" style="padding:0px;"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/table0.jpg" width="110" height="82"></a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmtitle" >By User</span></li>'
					mh += '<li><a href="javascript:void(0)">Graphic Designers</a></li>'
					mh += '<li><a href="javascript:void(0)">Web Developers</a></li>'
					mh += '<li><a href="javascript:void(0)">Educators</a></li>'
					mh += '<li><a href="javascript:void(0)">Partners</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><span class="qmtitle" >By Resource</span></li>'
					mh += '<li><a href="javascript:void(0)">Adobe Labs</a></li>'
					mh += '<li><a href="javascript:void(0)">Technical Forums</a></li>'
					mh += '<li><a href="javascript:void(0);">Idea Exchange</a></li>'
					mh += '<li><a href="javascript:void(0);">Blogs</a></li>'
					mh += '</ul></li>'
			
				
			
			mh += '<li class="qmclear">&nbsp;</li></ul>'




		}
		else
		{

			mh += '<div id="qm'+menu_id+'" class="qmmc">'

				mh += '<a href="javascript:void(0)"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/cat50.jpg" width="110" height="82"></a>'

					mh += '<div>'
					mh += '<span class="qmtitle" >Industries</span>'
					mh += '<a href="javascript:void(0)">Education</a>'
					mh += '<a href="javascript:void(0)">Financial Services</a>'
				
						mh += '<div>'
						mh += '<a href="javascript:void(0)">Government</a>'
						mh += '<a href="javascript:void(0)">Manufacturing</a>'
						mh += '<a href="javascript:void(0)">Locations</a>'
						mh += '<a href="javascript:void(0)">Tech. Lending</a>'
						mh += '</div>'

					mh += '<a href="javascript:void(0)">Government</a>'
					mh += '<a href="javascript:void(0)">Manufacturing</a>'
					mh += '<a href="javascript:void(0)">Telecom Services</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<span class="qmtitle" >Solutions</span>'
					mh += '<a href="javascript:void(0)">Digital Imaging</a>'
					mh += '<a href="javascript:void(0);">Mobil</a>'
					mh += '<a href="javascript:void(0);">Print Publishing</a>'
					mh += '<a href="javascript:void(0);">Rich Internet Applications</a>'
					mh += '<a href="javascript:void(0);">Training and eLearning</a>'
					mh += '<a href="javascript:void(0);">Video and Audio</a>'
					mh += '<a href="javascript:void(0);">Web Conferencing</a>'
					mh += '<a href="javascript:void(0);">Web Publishing</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">All Industries and Solutions</a>'
					mh += '</div>'


				mh += '<a href="javascript:void(0)"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/city0.jpg" width="110" height="82"></a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Acrobat Connect</a>'
					mh += '<a href="javascript:void(0)">Acrobat Family</a>'
					mh += '<a href="javascript:void(0)">After Effects</a>'
					mh += '<a href="javascript:void(0)">Cold Fusion</a>'
					mh += '<a href="javascript:void(0)">Creative Suite Family</a>'
					mh += '<a href="javascript:void(0)">Dreamweaver</a>'
					mh += '<a href="javascript:void(0);">Flash</a>'
					mh += '<a href="javascript:void(0);">Flex</a>'
					mh += '<a href="javascript:void(0);">Illustrator</a>'
					mh += '<a href="javascript:void(0);">LiveCycle Enterprise Suite</a>'
					mh += '<a href="javascript:void(0);">Mobile Products</a>'
					mh += '<a href="javascript:void(0);">Photoshop Family</a>'
					mh += '<a href="javascript:void(0);">Premiere</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">All Products</a>'
					mh += '</div>'


				mh += '<a href="javascript:void(0)"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/phone0.jpg" width="110" height="82"></a>'

					mh += '<div>'
					mh += '<a href="javascript:void(0)">Support Home</a>'
					mh += '<a href="javascript:void(0)">Customer Service</a>'
					mh += '<a href="javascript:void(0)">Knowledge Base</a>'
					mh += '<a href="javascript:void(0)">Books</a>'
					mh += '<a href="javascript:void(0)">Training and Certification</a>'
					mh += '<a href="javascript:void(0)">Support Programs</a>'
					mh += '<a href="javascript:void(0);">Forums</a>'
					mh += '<a href="javascript:void(0);">Documentation</a>'
					mh += '<a href="javascript:void(0);">Updates</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0);">More</a>'
					mh += '</div>'

	
				mh += '<a href="javascript:void(0)" style="padding:0px;"><img  class="qm-is qm-ia" src="'+qmv.base+'qmimages/table0.jpg" width="110" height="82"></a>'

					mh += '<div>'
					mh += '<span class="qmtitle" >By User</span>'
					mh += '<a href="javascript:void(0)">Graphic Designers</a>'
					mh += '<a href="javascript:void(0)">Web Developers</a>'
					mh += '<a href="javascript:void(0)">Educators</a>'
					mh += '<a href="javascript:void(0)">Partners</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<span class="qmtitle" >By Resource</span>'
					mh += '<a href="javascript:void(0)">Adobe Labs</a>'
					mh += '<a href="javascript:void(0)">Technical Forums</a>'
					mh += '<a href="javascript:void(0);">Idea Exchange</a>'
					mh += '<a href="javascript:void(0);">Blogs</a>'
					mh += '</div>'


				

			mh += '<span class="qmclear">&nbsp;</span></div>'
		}

	}
	else if (type==7)
	{
	
		//Divided Main Items

		if (codetype=="pure")
		{

			mh += '<ul id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Who We Are</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Management</a></li>'
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a class="qmparent" href="javascript:void(0)">Global Sites</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Asia</a></li>'
						mh += '<li><a href="javascript:void(0)">South America</a></li>'
						mh += '<li><a href="javascript:void(0)">Australia</a></li>'
						mh += '<li><a href="javascript:void(0)">North America</a></li>'
						mh += '<li><a href="javascript:void(0)">Europe</a></li>'
						mh += '<li><a href="javascript:void(0)">Africa</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><a class="qmparent" href="javascript:void(0)">Investors</a>'
			
						mh += '<ul>'
						mh += '<li><a href="javascript:void(0)">Asia</a></li>'
						mh += '<li><a href="javascript:void(0)">South America</a></li>'
						mh += '<li><a href="javascript:void(0)">Australia</a></li>'
						mh += '<li><a href="javascript:void(0)">North America</a></li>'
						mh += '<li><a href="javascript:void(0)">Europe</a></li>'
						mh += '<li><a href="javascript:void(0)">Africa</a></li>'
						mh += '</ul></li>'
			
					mh += '<li><span class="qmdivider qmdividerx" ></span></li>'
					mh += '<li><a href="javascript:void(0)">Worldwide</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Overview</a></li>'
					mh += '<li><a href="javascript:void(0)">Publicity</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0)">Commitment</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Satisfaction</a></li>'
					mh += '<li><a href="javascript:void(0)">Our Goals</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Warranty</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Quality</a></li>'
					mh += '<li><a href="javascript:void(0)">Continued Support</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0)">Our Investors</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Annual Meetings</a></li>'
					mh += '<li><a href="javascript:void(0)">Financial Reports</a></li>'
					mh += '<li><a href="javascript:void(0)">Nasdaq Quoting</a></li>'
					mh += '<li><a href="javascript:void(0)">Dividend Information</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">CEO Announcements</a></li>'
					mh += '</ul></li>'
			
				mh += '<li><span class="qmdivider qmdividery" ></span></li>'
				mh += '<li><a class="qmparent" href="javascript:void(0)">Technology</a>'
			
					mh += '<ul>'
					mh += '<li><a href="javascript:void(0)">Satisfaction</a></li>'
					mh += '<li><a href="javascript:void(0)">Our Goals</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Warranty</a></li>'
					mh += '<li><a href="javascript:void(0)">Future Outlook</a></li>'
					mh += '<li><a href="javascript:void(0)">Product Quality</a></li>'
					mh += '<li><a href="javascript:void(0)">Continued Support</a></li>'
					mh += '</ul></li>'
			
			mh += '<li class="qmclear">&nbsp;</li></ul>'



		}
		else
		{


			mh += '<div id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<a href="javascript:void(0)">Who We Are</a>'
			
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Management</a>'
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0)">Global Sites</a>'
			
						mh += '<div>'
						mh += '<a href="javascript:void(0)">Asia</a>'
						mh += '<a href="javascript:void(0)">South America</a>'
						mh += '<a href="javascript:void(0)">Australia</a>'
						mh += '<a href="javascript:void(0)">North America</a>'
						mh += '<a href="javascript:void(0)">Europe</a>'
						mh += '<a href="javascript:void(0)">Africa</a>'
						mh += '</div>'
			
					mh += '<a href="javascript:void(0)">Investors</a>'
			
						mh += '<div>'
						mh += '<a href="javascript:void(0)">Asia</a>'
						mh += '<a href="javascript:void(0)">South America</a>'
						mh += '<a href="javascript:void(0)">Australia</a>'
						mh += '<a href="javascript:void(0)">North America</a>'
						mh += '<a href="javascript:void(0)">Europe</a>'
						mh += '<a href="javascript:void(0)">Africa</a>'
						mh += '</div>'
			
					mh += '<span class="qmdivider qmdividerx" ></span>'
					mh += '<a href="javascript:void(0)">Worldwide</a>'
					mh += '<a href="javascript:void(0)">Product Overview</a>'
					mh += '<a href="javascript:void(0)">Publicity</a>'
					mh += '</div>'
			
				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0)">Commitment</a>'
			
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Satisfaction</a>'
					mh += '<a href="javascript:void(0)">Our Goals</a>'
					mh += '<a href="javascript:void(0)">Product Warranty</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">Product Quality</a>'
					mh += '<a href="javascript:void(0)">Continued Support</a>'
					mh += '</div>'
			
				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0)">Our Investors</a>'
			
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Annual Meetings</a>'
					mh += '<a href="javascript:void(0)">Financial Reports</a>'
					mh += '<a href="javascript:void(0)">Nasdaq Quoting</a>'
					mh += '<a href="javascript:void(0)">Dividend Information</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">CEO Announcements</a>'
					mh += '</div>'
			
				mh += '<span class="qmdivider qmdividery" ></span>'
				mh += '<a href="javascript:void(0)">Technology</a>'
			
					mh += '<div>'
					mh += '<a href="javascript:void(0)">Satisfaction</a>'
					mh += '<a href="javascript:void(0)">Our Goals</a>'
					mh += '<a href="javascript:void(0)">Product Warranty</a>'
					mh += '<a href="javascript:void(0)">Future Outlook</a>'
					mh += '<a href="javascript:void(0)">Product Quality</a>'
					mh += '<a href="javascript:void(0)">Continued Support</a>'
					mh += '</div>'
			
			mh += '<span class="qmclear">&nbsp;</span></div>'




		}


	}
	else if (type==8)
	{
	
		//Content Boxes

		if (codetype=="pure")
		{

			mh += '<ul id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<li><a class="qm-startopen qmparent" href="javascript:void(0)">Support</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmcbox" ><table style="border-width: 0px; width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td><img src="'+qmv.base+'qmimages/content_cust_service.gif" height="155" width="196"></td><td style="width: 30px;"></td><td style="vertical-align: top;"><a href="javascript:void(0);" style="display:block;">Customer Service</a><div style="">Available Monday - Friday between 9AM and 5PM EST.  Call 1-207-947-3777</div><div style="font-size: 1px; height: 30px;"></div><a href="javascript:void(0);" style="display:block;">Technical Support</a><div style="">Tech support is free for all evaluation users and OpenCube customers.<br><br>Available Monday - Friday between 9AM and 5PM EST.  Call 1-207-947-3777</div></td></tr><tr><td><div style="font-size: 1px; height: 30px;"></div></td></tr><tr><td colspan="3"><a href="javascript:void(0);" style="display:block;">Online Forums</a><div style="">Research answers to commenly asked questions or post a new query.  Online forums are monitored and mainted by OpenCube staff members and are free for all users.<br><br></div></td></tr></tbody></table></span></li>'
					mh += '</ul></li>'
			
				mh += '<li><a class="qmparent" href="javascript:void(0)">Site Map</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmcbox" ><table style="border-width: 0px; width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td style="vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Who We Are</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Our Diversity</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Technology</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Investment Capitol</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Networking Philosophy</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Cummunity Outreach</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Data Collection</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Strip Mining Locations</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Headquarters</a></div></div><div style="font-size: 1px; height: 15px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Community</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Involvement</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Action Centers</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Charitable Organizations</a></div></div></td><td style="width: 30px;"></td><td style="vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Investors</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Global Reach</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Stock Quotes</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Future Outlook</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Board of Directors</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Notes from the CEO</a></div></div><div style="font-size: 1px; height: 15px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Global Locations</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Asia</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">North America</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">South America</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Europe</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Africa</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Australia</a></div></div></td><td style="width: 30px;"></td><td style="vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Find a Product</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Building Supplies</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Retail Forcasting</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Jellybeans and Fruit</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Software Technology</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Daycare Facilities</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">The Dharma Initiative</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Tractor Supplies</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Greenhouse Gases</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Space Travel and Aeronics</a></div></div><div style="font-size: 1px; height: 15px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Contact Us</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Customer Service</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Technical Support</a></div></div></td></tr></tbody></table></span></li>'
					mh += '</ul></li>'

					mh += '<li><a class="qmparent" href="javascript:void(0)">Add-ons</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmcbox" ><table style="border-width: 0px; width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td style="width: 45%; vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Fade Effect</a></div><div style="margin: 5px 5px 0px;">Sub menus fade on a custom timer before displaying and hiding. Set custom animation timers and effects.</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Hover Fill</a></div><div style="margin: 5px 5px 0px;">Individual items fill with a custom background effect upon mouse over. Set custom animation timers and effects</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Rounded Corners</a></div><div style="margin: 5px 5px 0px;">Round the corners of sub menu containers without the use of images, set colors and rounding sizes.</div></td><td style="width: 10%;"></td><td style="width: 45%; vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Bump Effect</a></div><div style="margin: 5px 5px 0px;">Sub menus will animate with a bump in a custom direction.  Includes animation speed settings and distance.</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Persistent State</a></div><div style="margin: 5px 5px 0px;">Links within the menu that match the documents URL highlight and optionally show thier associated sub menu.</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Tree Style</a></div><div style="margin: 5px 5px 0px;">Create tree style menu structures with custom animation effects and unique layouts.</div></td></tr></tbody></table></span></li>'
					mh += '</ul></li>'

					mh += '<li><a class="qmparent" href="javascript:void(0)">Products</a>'
			
					mh += '<ul>'
					mh += '<li><span class="qmcbox" ><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Visual CSS QuickMenu</a></div><div style="margin: 7px 5px 0px;">Create Pure CSS based drop down and tree style navigation menus with ease.  Visual QuickMenu includes hundreds of customizable options and dozens of add-ons.<br><br>The menus produced are lighweight, fast loading, search engine optomized, and developer friendly.</div><div style="font-size: 1px; height: 30px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);"></a><a href="javascript:void(0);">Web Effects</a></div><div style="margin: 7px 5px 0px;">OpenCube\'s full suite of pure CSS, DHTML and Java effects. Easy to customize, maintain and fast loading! Download includes full documentation and templates.</div><div style="font-size: 1px; height: 30px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">MouseTrends</a></div><div style="margin: 7px 5px 0px;">Track visitor mouse movements and play back movie like replays of individual users mouse movements on your pages.  Includes heat map overlays.</div></span></li>'
					mh += '</ul></li>'
			
			mh += '<li class="qmclear">&nbsp;</li></ul>'



		}
		else
		{


			mh += '<div id="qm'+menu_id+'" class="qmmc">'
			
				mh += '<a class="qm-startopen" href="javascript:void(0)">Support</a>'
			
					mh += '<div>'
					mh += '<span class="qmcbox" ><table style="border-width: 0px; width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td><img src="'+qmv.base+'qmimages/content_cust_service.gif" height="155" width="196"></td><td style="width: 30px;"></td><td style="vertical-align: top;"><a href="javascript:void(0);" style="display:block;">Customer Service</a><div style="">Available Monday - Friday between 9AM and 5PM EST.  Call 1-207-947-3777</div><div style="font-size: 1px; height: 30px;"></div><a href="javascript:void(0);" style="display:block;">Technical Support</a><div style="">Tech support is free for all evaluation users and OpenCube customers.<br><br>Available Monday - Friday between 9AM and 5PM EST.  Call 1-207-947-3777</div></td></tr><tr><td><div style="font-size: 1px; height: 30px;"></div></td></tr><tr><td colspan="3"><a href="javascript:void(0);" style="display:block;">Online Forums</a><div style="">Research answers to commenly asked questions or post a new query.  Online forums are monitored and mainted by OpenCube staff members and are free for all users.<br><br></div></td></tr></tbody></table></span>'
					mh += '</div>'
			


				mh += '<a href="javascript:void(0)">Site Map</a>'
			
					mh += '<div>'
					mh += '<span class="qmcbox" ><table style="border-width: 0px; width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td style="vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Who We Are</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Our Diversity</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Technology</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Investment Capitol</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Networking Philosophy</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Cummunity Outreach</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Data Collection</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Strip Mining Locations</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Headquarters</a></div></div><div style="font-size: 1px; height: 15px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Community</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Involvement</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Action Centers</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Charitable Organizations</a></div></div></td><td style="width: 30px;"></td><td style="vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Investors</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Global Reach</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Stock Quotes</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Future Outlook</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Board of Directors</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Notes from the CEO</a></div></div><div style="font-size: 1px; height: 15px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Global Locations</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Asia</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">North America</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">South America</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Europe</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Africa</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Australia</a></div></div></td><td style="width: 30px;"></td><td style="vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Find a Product</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Building Supplies</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Retail Forcasting</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Jellybeans and Fruit</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Software Technology</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Daycare Facilities</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">The Dharma Initiative</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Tractor Supplies</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Greenhouse Gases</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Space Travel and Aeronics</a></div></div><div style="font-size: 1px; height: 15px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px; background-color: rgb(230, 230, 230); margin-bottom: 3px;">Contact Us</div><div style="margin-left: 10px;"><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Customer Service</a></div><div style="margin-bottom: 2px;"><a href="javascript:void(0);">Technical Support</a></div></div></td></tr></tbody></table></span>'
					mh += '</div>'



				mh += '<a href="javascript:void(0)">Add-ons</a>'
			
					mh += '<div>'
					mh += '<span class="qmcbox" ><table style="border-width: 0px; width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td style="width: 45%; vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px; cursor: move;"><a href="javascript:void(0);">Fade Effect</a></div><div style="margin: 5px 5px 0px;">Sub menus fade on a custom timer before displaying and hiding. Set custom animation timers and effects.</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Hover Fill</a></div><div style="margin: 5px 5px 0px;">Individual items fill with a custom background effect upon mouse over. Set custom animation timers and effects</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Rounded Corners</a></div><div style="margin: 5px 5px 0px;">Round the corners of sub menu containers without the use of images, set colors and rounding sizes.</div></td><td style="width: 10%;"></td><td style="width: 45%; vertical-align: top;"><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Bump Effect</a></div><div style="margin: 5px 5px 0px;">Sub menus will animate with a bump in a custom direction.  Includes animation speed settings and distance.</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Persistent State</a></div><div style="margin: 5px 5px 0px;">Links within the menu that match the documents URL highlight and optionally show thier associated sub menu.</div><div style="font-size: 1px; height: 25px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Tree Style</a></div><div style="margin: 5px 5px 0px;">Create tree style menu structures with custom animation effects and unique layouts.</div></td></tr></tbody></table></span>'
					mh += '</div>'


				mh += '<a href="javascript:void(0)">Products</a>'
			
					mh += '<div>'
					mh += '<span class="qmcbox" ><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">Visual CSS QuickMenu</a></div><div style="margin: 7px 5px 0px;">Create Pure CSS based drop down and tree style navigation menus with ease.  Visual QuickMenu includes hundreds of customizable options and dozens of add-ons.<br><br>The menus produced are lighweight, fast loading, search engine optomized, and developer friendly.</div><div style="font-size: 1px; height: 30px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);"></a><a href="javascript:void(0);">Web Effects</a></div><div style="margin: 7px 5px 0px;">OpenCube\'s full suite of pure CSS, DHTML and Java effects. Easy to customize, maintain and fast loading! Download includes full documentation and templates.</div><div style="font-size: 1px; height: 30px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(230, 230, 230); margin-bottom: 3px;"><a href="javascript:void(0);">MouseTrends</a></div><div style="margin: 7px 5px 0px;">Track visitor mouse movements and play back movie like replays of individual users mouse movements on your pages.  Includes heat map overlays.</div></span>'
					mh += '</div>'

			
			mh += '<span class="qmclear">&nbsp;</span></div>'




		}


	}



	return mh;

}

function qmvi_template_get_tree_structure_modtag(desc,qmmod,type,id,name,typeid,checked,attr1)
{

	var ins_id = '';
	if (id) ins_id = 'id="'+id+'"';


	var ins_name = '';
	if (name) ins_name = 'name="qmtt'+typeid+'_'+name+'"';

	var cval = '';
	if (checked) cval="checked";

	var ac = '';
	if (type=="checkbox" || type=="radio")
		ac = 'isclickboxradio=1';
	
	if (!attr1)
		attr1 = '';


	var isadd = '';
	if (qmmod.indexOf("addon")+1 || (qmmod.indexOf("create")+1 && qmmod.indexOf("isvertical")==-1))
		isadd = "isadd=1";
	

	return '<a href="#" '+isadd+'  class="ttinputdesc" qmmod="'+qmmod+'" '+ac+'><input '+attr1+' type="'+type+'" '+ins_id+' '+ins_name+' '+cval+' onclick="qmvi_template_tree_click_radio_or_check(event,this)"  class="qmttcheck"></input>'+desc+'</a>';




}

function qmvi_template_tree_click_radio_or_check_from_atag(e)
{
	

	

	var inp = this.getElementsByTagName("INPUT")[0];
	if (inp)
	{
		if (!inp.checked || inp.getAttribute("type")=="checkbox")
		{
			inp.checked = !inp.checked;
			qmvi_switch_template_type_if_different(this);
			qmvi_template_update_preview();
		}
	}

	qm_kille(e);


}

function qmvi_template_tree_click_radio_or_check(event,a)
{

	
	qmvi_template_update_preview();
	qmvi_switch_template_type_if_different(a);
	qm_kille(event,true);
}


function qmvi_template_find_root_node(a)
{

	while (a=a[qp])
	{

		if (a[qp] && qm_a(a[qp]))
		{
			a=a.idiv;
			break;
		}
	}


	return a;


}


function qmvi_switch_template_type_if_different(a)
{

		
	var clicka = qmvi_template_find_root_node(a);
	var cura = qmvi_template_find_root_node(qmv.tplatelcur);

	if (clicka!=cura)
	{
		
		var alla = clicka.cdiv.getElementsByTagName("A");
		for (var i=0;i<alla.length;i++)
		{

			if (alla[i].getAttribute("qmtv"))
			{
				
				qmvi_template_tree_click(new Object(),alla[i],true);
				break;
			}


		}


	}
	
	
	if (a.getAttribute('isadd') && clicka && clicka.cdiv)
	{
	
		var inps = clicka.cdiv.getElementsByTagName("INPUT");
		var scripti = null;
		for (var i=0;i<inps.length;i++)
		{

		
			if (inps[i].getAttribute("jscr"))
			{
				
				var m = inps[i][qp].getAttribute("qmmod");
				if (m.indexOf("pure")+1 && inps[i].checked)
				{
					inps[i].checked = false;
					scripti.checked = true;
				}
				else if (m.indexOf("hybrid")+1)
					scripti = inps[i];

			}	


		}

	}

}



function qmvi_template_update_preview()
{

	
	qmvi_template_dialog_show_template(qmv.tplate_dialog.mtype,qmv.tplate_dialog.mvar,qmv.tplate_dialog.mvar2);


}


function qmvi_template_gts_part1(typeid,span_space)
{

	

	var wt = '';

	wt += '<a href="#" class="ttinputtitle">JavaScript</a>';
		wt += '<div>'
		wt += span_space;
		wt += qmvi_template_get_tree_structure_modtag("Enabled","codetype|hybrid","radio",null,"codetype",typeid,true,"jscr=1");
		wt += qmvi_template_get_tree_structure_modtag("Disabled","codetype|pure","radio",null,"codetype",typeid,false,"jscr=1");
		wt += span_space;
	wt += '</div>'

	return wt;

}


function qmvi_template_gts_part2(typeid,span_space,optwidth,defvert)
{

	var defv = defvert;
	var defh = true;
	if (defv) defh = false;

	var wt = '';

	if (!optwidth)
		optwidth = '';
	else
		optwidth = '|'+optwidth;
	

	wt += '<a href="#" class="ttinputtitle">Orientation</a>';
	wt += '<div>'
		wt += span_space;
		wt += qmvi_template_get_tree_structure_modtag("horizontal","create|isvertical|false","radio",null,"isvertical",typeid,defh);
		wt += qmvi_template_get_tree_structure_modtag("vertical","create|isvertical|true"+optwidth,"radio",null,"isvertical",typeid,defv);
		wt += span_space;
	wt += '</div>'	

	return wt;

}





function qmvi_template_get_tree_structure()
{

	var wt = '';
	var span_space = '<span style="font-size:1px;height:8px;display:block;"></span>';

	var typeid=0;

	
	wt += '<div class="qmvi-common;" style="position:absolute;top:41px;left:12px;width:250px;font-family:arial;font-size:12px;font-weight:bold;color:#555555;"><img src="'+qmv.base+'images/qmv_v_b_down_hover.gif" width=13 height=14 style="margin-bottom:-3px;">&nbsp;Choose Template</div>';
	wt += '<div id="qmvi_tplate_tree" style="position:absolute;width:210px;height:400px;top:60px;left:10px;overflow-y:scroll;border-width:1px;border-style:solid;border-color:#666666;background-color:#f6f6f6;">';
	wt += '<div id="qmvt2" class="qmmc">';

		

		typeid=1;
		wt += '<a initshow=1 href="#">Rounded Adobe</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a isdef=1 href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" initshow=1 class="ttinputtitle">Page Content</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("show","content|show","radio",null,"pcontent",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("hide","content|hide","radio",null,"pcontent",typeid,false);
					wt += span_space;
				wt += '</div>'

				
				wt += '<a href="#" initshow=1 class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:8px;,#qm[i] div a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:13px;,#qm[i] div a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Animation Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'


				wt += '<a href="#" class="ttinputtitle">Main Gaps</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] .qmdividery,margin:4px 2px 0px 2px;","radio",null,"mgaps",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("normal","css|#qm[i] .qmdividery,margin:4px 6px 0px 6px;","radio",null,"mgaps",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] .qmdividery,margin:4px 10px 0px 10px;","radio",null,"mgaps",typeid,false);
				wt += '</div>'				


				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=15;
		wt += '<a href="#">Center Arrow</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				wt += '<a href="#" initshow=1 isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

				
												
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		//zzzzzzzzzzzzzzzzzzz
		typeid=20;
		wt += '<a href="#">Content Tabs</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';

			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'


				
				wt += span_space;

				
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'

				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'

				

			wt += '</div>'

			

		wt += span_space;
		wt += span_space;
		wt += '</div>'





		typeid=0;
		wt += '<a href="#">Basic Boxed</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|redgold|null">Red / Gold</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';

			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'


				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);
				

				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'



				wt += qmvi_template_gts_part2(typeid,span_space);
				

				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'

			
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'


				
				wt += '<a href="#" class="ttinputtitle">Arrow Types</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("arrow","addon_settings|a.ibcss_main_type = 'arrow';a.ibcss_sub_type = 'arrow';","radio",null,"arrowtypes",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("v arrow","addon_settings|a.ibcss_main_type = 'arrow-v';a.ibcss_sub_type = 'arrow-v';","radio",null,"arrowtypes",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("v arrow head","addon_settings|a.ibcss_main_type = 'arrow-head-v';a.ibcss_sub_type = 'arrow-head-v';","radio",null,"arrowtypes",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("v arrow gap","addon_settings|a.ibcss_main_type = 'arrow-gap-v';a.ibcss_sub_type = 'arrow-gap-v';","radio",null,"arrowtypes",typeid,false);
					wt += span_space;
				wt += '</div>'


				wt += '<a href="#" class="ttinputtitle">Show Sub Delay</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","create|showdelay|0","radio",null,"showdelay",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("short","create|showdelay|200","radio",null,"showdelay",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("normal","create|showdelay|400","radio",null,"showdelay",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("long","create|showdelay|700","radio",null,"showdelay",typeid,false);
					wt += span_space;
				wt += '</div>'	


				

			wt += '</div>'

			

		wt += span_space;
		wt += span_space;
		wt += '</div>'




		typeid=2;
		wt += '<a href="#">Hover Fill (lev2 click)</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;


				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);


				wt += '<a href="#" initshow=1 class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:10px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:12px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] div a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Animation Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
				wt += '</div>'


						


				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'





		typeid=3;
		wt += '<a href="#">Border Caps</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;


				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'
				

				wt += qmvi_template_gts_part2(typeid,span_space);


				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'


				wt += '<a href="#" class="ttinputtitle">Sub Item Gaps</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] div a,padding:1px 40px 1px 5px;","radio",null,"subitemgaps",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] div a,padding:2px 40px 2px 5px;","radio",null,"subitemgaps",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] div a,padding:4px 40px 4px 5px;","radio",null,"subitemgaps",typeid,false);
				wt += '</div>'		


				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'




		typeid=4;
		wt += '<a href="#">Full Gradient Bar</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;


				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'
				

				 wt += qmvi_template_gts_part2(typeid,span_space);


				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] div a,font-size:13px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'


				wt += '<a href="#" class="ttinputtitle">Sub Item Gaps</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] div a,padding:1px 40px 1px 5px;","radio",null,"subitemgaps",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] div a,padding:2px 40px 2px 5px;","radio",null,"subitemgaps",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] div a,padding:4px 40px 4px 5px;","radio",null,"subitemgaps",typeid,false);
					wt += span_space;
				wt += '</div>'		
				

				wt += '<a href="#" class="ttinputtitle">Show Sub Delay</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","create|showdelay|0","radio",null,"showdelay",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("short","create|showdelay|200","radio",null,"showdelay",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("normal","create|showdelay|400","radio",null,"showdelay",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("long","create|showdelay|700","radio",null,"showdelay",typeid,false);
				wt += '</div>'	

				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'




		typeid=5;
		wt += '<a href="#">Gradient Hover</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;


				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'
				

				
				 wt += qmvi_template_gts_part2(typeid,span_space,"150px");


				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] div a,font-size:13px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'


				wt += '<a href="#" class="ttinputtitle">Sub Item Gaps</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] div a,padding:1px 40px 1px 5px;","radio",null,"subitemgaps",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] div a,padding:2px 40px 2px 5px;","radio",null,"subitemgaps",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] div a,padding:4px 40px 4px 5px;","radio",null,"subitemgaps",typeid,false);
					wt += span_space;
				wt += '</div>'		
				

				wt += '<a href="#" class="ttinputtitle">Show Sub Delay</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","create|showdelay|0","radio",null,"showdelay",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("short","create|showdelay|200","radio",null,"showdelay",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("normal","create|showdelay|400","radio",null,"showdelay",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("long","create|showdelay|700","radio",null,"showdelay",typeid,false);

				wt += '</div>'	

				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'

		
		typeid=6;
		wt += '<a href="#">Blended Angles</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += span_space;
				wt += '</div>'

				
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:10px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:12px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] div a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Animation Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					
				wt += '</div>'

				


				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'
		


		typeid=7;
		wt += '<a href="#">Border Connect</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

				
				 wt += qmvi_template_gts_part2(typeid,span_space,"130px",true);

				
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] .qmtitle,font-size:14px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Animation Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					
				wt += '</div>'

				


				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'



		typeid=8;
		wt += '<a href="#">Thick Sub Borders</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

				
				 wt += qmvi_template_gts_part2(typeid,span_space,"140px");


				
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] .qmtitle,font-size:14px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Animation Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					
				wt += '</div>'

							

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'




		typeid=9;
		wt += '<a href="#">Match Widths</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += span_space;
				wt += '</div>'

				
				 wt += qmvi_template_gts_part2(typeid,span_space,"140px");


				
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] div a,font-size:13px;,#qm[i] ul a,font-size:13px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Animation Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'

				wt += '<a href="#" class="ttinputtitle">Border Thickness</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,border-width:0px 0px 4px 0px;","radio",null,"borderthickness",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,border-width:0px 0px 8px 0px;","radio",null,"borderthickness",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,border-width:0px 0px 12px 0px;","radio",null,"borderthickness",typeid,false);
					wt += span_space;
				wt += '</div>'


				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=10;
		wt += '<a href="#">Tabbed Items</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

								
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:14px;,#qm[i] div a,font-size:13px;,#qm[i] ul a,font-size:13px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("match widths","addon|match_widths|0","radio",null,"ani",typeid,false);
					wt += span_space;
				wt += '</div>'

				wt += '<a href="#" class="ttinputtitle">Tab Shape</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("Angled","addon_settings|a.tabscss_type  = 'angled';","radio",null,"tabshape",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("Rounded","addon_settings|a.tabscss_type  = 'rounded';","radio",null,"tabshape",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Tab Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","addon_settings|a.tabscss_size  = 3;","radio",null,"tabsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","addon_settings|a.tabscss_size  = 5;","radio",null,"tabsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","addon_settings|a.tabscss_size  = 7;","radio",null,"tabsize",typeid,false);
				wt += '</div>'
				
				

			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=11;
		wt += '<a href="#">Jagged Edges</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

				 wt += qmvi_template_gts_part2(typeid,span_space,"175px",true);

								
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		
		typeid=12;
		wt += '<a href="#">Image Based</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
				 wt += qmvi_template_gts_part2(typeid,span_space,"110px");

								
				wt += '<a href="#" initshow=1 class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=13;
		wt += '<a href="#">Horizontal Subs</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				wt += '<a href="#" isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += span_space;
				wt += '</div>'
												
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("drop shadow","addon|drop_shadow|0","radio",null,"ani",typeid,false);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=14;
		wt += '<a href="#">Half Round Subs</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				wt += '<a href="#" initshow=1 isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("technology","structure|5","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("divided / titled","structure|2","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

				wt += qmvi_template_gts_part2(typeid,span_space,"150px",false);
												
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		
		typeid=16;
		wt += '<a href="#">Gradient Buttons</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';
			wt += '<a href="#" qmtv="'+typeid+'|orange|null">Orange</a>';



			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				wt += '<a href="#" initshow=1 isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

				wt += qmvi_template_gts_part2(typeid,span_space,"200px",false);
												
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("Drop Shadow","addon|drop_shadow|0","radio",null,"ani",typeid,true);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'

	
		typeid=17;
		wt += '<a href="#">Divided Mains</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';


			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

				
																
				wt += '<a href="#" initshow=1 class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
				wt += '<a href="#" class="ttinputtitle">Sub Effects</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("none","none","radio",null,"ani",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("fade","addon|fade|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("slide","addon|slide_effect|1","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("merge","addon|merge_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("bump","addon|bump_effect|0","radio",null,"ani",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("box","addon|box_effect|0","radio",null,"ani",typeid,false);
				wt += '</div>'

				
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=18;
		wt += '<a href="#">Gradient Tree</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';


			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

						
				wt += '<a href="#" initshow=1 isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

										
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
								
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=19;
		wt += '<a href="#">Text Tree</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';
			wt += '<a href="#" qmtv="'+typeid+'|black|null">Dark</a>';


			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				if (!(qmad.br_ie && !qmad.br_ie7))
					 wt += qmvi_template_gts_part1(typeid,span_space);

						
				wt += '<a href="#" initshow=1 isstruct=1 class="ttinputtitle" initshow=1>Menu Structure</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("starter","structure|0","radio",null,"structure",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("professional","structure|1","radio",null,"structure",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("deeply nested","structure|3","radio",null,"structure",typeid,false);
					wt += span_space;
				wt += '</div>'

										
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:12px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:15px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
								
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'


		typeid=21;
		wt += '<a href="#">Content Tree</a>'
		wt += '<div>'

			wt += span_space;
			wt += '<a href="#" qmtv="'+typeid+'|gray|null">Gray Scale</a>';
			wt += '<a href="#" qmtv="'+typeid+'|reds|null">Reds</a>';
			wt += '<a href="#" qmtv="'+typeid+'|greens|null">Greens</a>';
			wt += '<a href="#" qmtv="'+typeid+'|blues|null">Blues</a>';
			
			wt += span_space;
			wt += '<a href="#" initshow=1 ismod=1 style="text-decoration:underline;">Modifiers</a>';
			wt += '<div>'
				
				wt += span_space;

				
						
				wt += '<a href="#" class="ttinputtitle">Font Size</a>';
				wt += '<div>'
					wt += span_space;
					wt += qmvi_template_get_tree_structure_modtag("small","css|#qm[i] a,font-size:10px;,#qm[i] div a,font-size:9px;,#qm[i] ul a,font-size:9px;,#qm[i] .qmtitle,font-size:9px;","radio",null,"fontsize",typeid,false);
					wt += qmvi_template_get_tree_structure_modtag("medium","css|#qm[i] a,font-size:13px;,#qm[i] div a,font-size:11px;,#qm[i] ul a,font-size:11px;,#qm[i] .qmtitle,font-size:11px;","radio",null,"fontsize",typeid,true);
					wt += qmvi_template_get_tree_structure_modtag("large","css|#qm[i] a,font-size:16px;,#qm[i] div a,font-size:14px;,#qm[i] ul a,font-size:14px;,#qm[i] .qmtitle,font-size:13px;","radio",null,"fontsize",typeid,false);
					wt += span_space;
				wt += '</div>'
				
				
								
			wt += '</div>'

		wt += span_space;
		wt += span_space;
		wt += '</div>'

	wt += '</div>';
	wt += '</div>';


	return wt;

}





function qmvi_get_templates(type,v,for_interface)
{
	
	

	var ws = new Object();	
	ws.addons = new Object();
	ws.styles = new Object();
	ws.variations = new Object();
	ws.structure = 0;
	ws.addcontent_before = '';
	ws.addcontent_after = '';
	ws.codetype = "hybrid";
	ws.purecsstype = "standard";  //set to tree below for tree menus
	ws.content = 'show';

	ws.isvert = false;

	var mod_names = new Array();
	var mod_vals = new Array();
	
	
	

	if (qmv.tplatelcur)
	{
		

		var froot = qmv.tplatelcur;
		while (froot = froot[qp])
		{

			if (froot.tagName && froot.tagName=="DIV" && froot.idiv)
			{
				
				var alla = froot.getElementsByTagName("A");
				for (var i=0;i<alla.length;i++)
				{
					if (alla[i].getAttribute("ismod"))
						break;
					
				}

				break;
			}

		}	


		

		if (froot)
		{
			
			var inps = froot.getElementsByTagName("INPUT");
			for (var i=0;i<inps.length;i++)
			{
				

				var mt = inps[i][qp].getAttribute("qmmod");

				if (inps[i].getAttribute("type").toLowerCase()=="radio" || inps[i].getAttribute("type").toLowerCase()=="checkbox")
				{
					if (inps[i].checked)
					{
						

						mod_names.push(mt);
						mod_vals.push(true);
					}

				}
			}
		}
	
	}



	ws.codetype = qmvi_template_modify_codetype(ws.codetype,mod_names);
	if (type==0)
	{

		//***  template 0 (css bullets) *****

		ws.structure = 2;
		ws.addons.use = ",ibcss";

		ws.addons.s = 'a.ibcss_apply_to = "parent";		\
		a.ibcss_main_type = "arrow-head-v";			\
		a.ibcss_main_direction = "down";			\
		a.ibcss_main_size = 5;					\
		a.ibcss_main_bg_color = "transparent";			\
		a.ibcss_main_border_color = "#555555";			\
		a.ibcss_main_border_color_hover = "#dd3300";		\
		a.ibcss_main_position_x = -19;				\
		a.ibcss_main_position_y = -4;				\
		a.ibcss_main_align_x = "right";				\
		a.ibcss_main_align_y = "middle";			\
		a.ibcss_sub_type = "arrow-head-v";			\
		a.ibcss_sub_direction = "right";			\
		a.ibcss_sub_size = 5;					\
		a.ibcss_sub_bg_color = "transparent";			\
		a.ibcss_sub_bg_color_hover = "";			\
		a.ibcss_sub_border_color = "#555555";			\
		a.ibcss_sub_border_color_hover = "#dd3300";		\
		a.ibcss_sub_position_x = -16;				\
		a.ibcss_sub_position_y = 0;				\
		a.ibcss_sub_align_x = "right";				\
		a.ibcss_sub_align_y = "middle";				'


		ws.addons.s+=qmvi_template_modify_addon_setting(mod_names);
		

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="redgold")
		{
					
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;background-color:#FFFFFF;color:#000000;font-family:Arial;font-size:11px;text-decoration:none;border-width:1px;border-style:solid;border-color:#DD3300;");
			ws.styles.s.push("#qm[i] a:hover, #qm[i] li:hover>a|background-color:#FCEBCD;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#F9D08C;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#FCEBCD;border-width:1px;border-style:solid;border-color:#DD3300;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:transparent;color:#DD3300;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:transparent;color:#DD3300;");

		}
		else if (v=="blues")
		{
					

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;background-color:#FFFFFF;color:#000000;font-family:Arial;font-size:11px;text-decoration:none;border-width:1px;border-style:solid;border-color:#1A39FB;");
			ws.styles.s.push("#qm[i] a:hover, #qm[i] li:hover>a|background-color:#DBE8FD;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#94BEF1;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#DBE8FD;border-width:1px;border-style:solid;border-color:#1A39FB;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:transparent;color:#1A39FB;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:transparent;color:#1A39FB;");

		}
		else if (v=="greens")
		{
			
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;background-color:#FFFFFF;color:#000000;font-family:Arial;font-size:11px;text-decoration:none;border-width:1px;border-style:solid;border-color:#47A538;");
			ws.styles.s.push("#qm[i] a:hover, #qm[i] li:hover>a|background-color:#E2FECB;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#5CEB60;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#E2FECB;border-width:1px;border-style:solid;border-color:#47A538;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:transparent;color:#47A538;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:transparent;color:#47A538;");

		}
		else
		{
			
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|color:#000000;background-color:#ffffff;font-family:Arial;font-size:11px;text-decoration:none;padding:5px 40px 5px 8px;border-style:solid;border-color:#a6a6a6;border-width:1px;");
			ws.styles.s.push("#qm[i] a:hover, #qm[i] li:hover>a|background-color:#e6e6e6;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#e6e6e6;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|background-color:#e6e6e6;padding:5px;border-style:solid;border-width:1px;border-color:#a6a6a6;margin:-1px 0px 0px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|background-color:transparent;padding:2px 40px 2px 5px;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#ffffff;");
		}


		


		if (ws.isvert)
		{
			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right.gif);background-repeat:no-repeat;background-position:97%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right_hover.gif);");
				
		}
		else
		{

			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_down.gif);background-repeat:no-repeat;background-position:97%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/cssalt1_arrow_down_hover.gif);");

			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right_hover.gif);");
				
		}


		if (ws.structure==2)
		{

			ws.styles.s.push("#qm0 .qmtitle|cursor:default;padding:3px 0px 3px 4px;color:#444444;font-family:arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm0 .qmdividerx|border-top-width:1px;margin:4px 0px;border-color:#bfbfbf;");
			ws.styles.s.push("#qm0 .qmdividery|border-left-width:1px;height:15px;margin:4px 2px 0px;border-color:#aaaaaa;");

		}



		


	}
	else if (type==1)
	{

		//***  template 2 (rounded adobe) *****

		/*
		if (!qmv.firstalert_adobe_template && for_interface && !qmad.br_safari)
		{
			
			qmv_show_dialog("alert",null,"The Adobe template is a transparent menu which sits on top of a gradient container with a search field to the right.  During customization, the container which creates the backdrop will not be visible.<br><br>The transparent menu may be blended with your site.  To do this, publish to any HTML element within your web pages.",500,null,null,null,null,true);
			qmv.firstalert_adobe_template = true;
		}
		*/


		ws.content = qmvi_template_modify_content(ws.content,mod_names);		
		ws.addcontent_before = '<div style="background-image:url('+qmv.base+'qmimages/center_tile.gif)"><table cellpadding=0 cellspacing=0 style="width:100%;"><tr><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/left_cap.gif);"></div></td><td style="width:100%;">';
		ws.addcontent_after = '</td><td><div style="border-width:0px 0px 0px 1px;border-color:#aaaaaa;border-style:solid;font-size:1px;width:8px;height:31px;"></div><td style="padding:0px 5px 0px 0px;"><input type="text" style="font-family:arial;font-size:12px;width:100px;border-style:solid;border-width:1px;border-color:#ffffff;border-top-color:#aca899;border-left-color:#aca899;" value=""></td><td style="padding:0px 5px 0px 0px;font-family:arial;font-size:10px;color:#444444">SEARCH</td><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/right_cap.gif);"></div></td></tr></table></div>';


		ws.structure = 4;
		ws.addons.use = "round_corners,ritem";

		ws.addons.s = 'a.rcorner_size = 6;				\
		a.rcorner_border_color = "#dadada";				\
		a.rcorner_bg_color = "#F7F7F7";					\
		a.rcorner_apply_corners = new Array(false,true,true,true);	\
		a.rcorner_top_line_auto_inset = true;				\
		a.ritem_size = 4;						\
		a.ritem_apply = "main";						\
		a.ritem_main_apply_corners = new Array(true,true,false,false);	\
		a.ritem_show_on_actives = true;					'

		

		ws.styles.s = new Array();
		if (v=="reds")
		{
			
			ws.addcontent_before = '<div style="background-image:url('+qmv.base+'qmimages/center_tile_red.gif)"><table cellpadding=0 cellspacing=0 style="width:100%;"><tr><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/left_cap_red.gif);"></div></td><td style="width:100%;">';
			ws.addcontent_after = '</td><td><div style="border-width:0px 0px 0px 1px;border-color:#aaaaaa;border-style:solid;font-size:1px;width:8px;height:31px;"></div><td style="padding:0px 5px 0px 0px;"><input type="text" style="font-family:arial;font-size:12px;width:100px;border-style:solid;border-width:1px;border-color:#ffffff;border-top-color:#aca899;border-left-color:#aca899;" value=""></td><td style="padding:0px 5px 0px 0px;font-family:arial;font-size:10px;color:#444444">SEARCH</td><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/right_cap_red.gif);"></div></td></tr></table></div>';
			

			ws.styles.s.push("#qm[i] a|padding:5px 4px 5px 5px;color:#555555;font-family:Arial;font-size:10px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;background-color:transparent;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:#dcd9d2;color:#cc0000;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#dcd9d2;color:#cc0000;");
			ws.styles.s.push("#qm[i] .qmtitle|cursor:default;padding:3px 0px 3px 4px;color:#b9190d;font-family:arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px;border-color:#f36358;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:1px;height:15px;margin:4px 2px 0px;border-color:#aaaaaa;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#f35959;background-color:#f2eceb;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 4px;");

			
			
			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#F2ECEB;");
			ws.styles.s.push("ul#qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:#F2ECEB;border-style:solid;border-width:1px;border-color:#F35959;");
			

			ws.addons.s += 'a.rcorner_border_color = "#F35959";';
			ws.addons.s += 'a.rcorner_bg_color = "#F2ECEB";';


		}
		else if (v=="blues")
		{
		
			ws.addcontent_before = '<div style="background-image:url('+qmv.base+'qmimages/center_tile_blue.gif)"><table cellpadding=0 cellspacing=0 style="width:100%;"><tr><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/left_cap_blue.gif);"></div></td><td style="width:100%;">';
			ws.addcontent_after = '</td><td><div style="border-width:0px 0px 0px 1px;border-color:#aaaaaa;border-style:solid;font-size:1px;width:8px;height:31px;"></div><td style="padding:0px 5px 0px 0px;"><input type="text" style="font-family:arial;font-size:12px;width:100px;border-style:solid;border-width:1px;border-color:#ffffff;border-top-color:#aca899;border-left-color:#aca899;" value=""></td><td style="padding:0px 5px 0px 0px;font-family:arial;font-size:10px;color:#444444">SEARCH</td><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/right_cap_blue.gif);"></div></td></tr></table></div>';

			ws.styles.s.push("#qm[i] a|padding:5px 4px 5px 5px;color:#555555;font-family:Arial;font-size:10px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-2px 0px 0px 0px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;background-color:transparent;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:#B7D8FD;color:#CC0000;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#B7D8FD;color:#CC0000;");
			ws.styles.s.push("#qm[i] .qmtitle|cursor:default;padding:3px 0px 3px 4px;color:#444444;font-family:arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px 4px 0px;border-color:#96C7FD;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:1px;height:15px;margin:4px 2px 0px 2px;border-color:#AAAAAA;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#0570E7;background-color:#D8EEFD;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 4px;");
			

			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#D8EEFD;");
			ws.styles.s.push("ul#qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:#D8EEFD;border-style:solid;border-width:1px;border-color:#0570E7;");
			

			ws.addons.s += 'a.rcorner_border_color = "#0570E7";';
			ws.addons.s += 'a.rcorner_bg_color = "#D8EEFD";';


		}
		else if (v=="greens")
		{
			
			ws.addcontent_before = '<div style="background-image:url('+qmv.base+'qmimages/center_tile_green.gif)"><table cellpadding=0 cellspacing=0 style="width:100%;"><tr><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/left_cap_green.gif);"></div></td><td style="width:100%;">';
			ws.addcontent_after = '</td><td><div style="border-width:0px 0px 0px 1px;border-color:#aaaaaa;border-style:solid;font-size:1px;width:8px;height:31px;"></div><td style="padding:0px 5px 0px 0px;"><input type="text" style="font-family:arial;font-size:12px;width:100px;border-style:solid;border-width:1px;border-color:#ffffff;border-top-color:#aca899;border-left-color:#aca899;" value=""></td><td style="padding:0px 5px 0px 0px;font-family:arial;font-size:10px;color:#444444">SEARCH</td><td><div style="font-size:1px;width:6px;height:34px;background-image:url('+qmv.base+'qmimages/right_cap_green.gif);"></div></td></tr></table></div>';


			ws.styles.s.push("#qm[i] a|padding:5px 4px 5px 5px;color:#33392f;font-family:Arial;font-size:10px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;background-color:transparent;font-size:11px;border-width:1px;border-style:dotted;border-color:#efffe7;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:transparent;color:#065706;border-color:#065706;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#cafbd7;color:#cc0000;");
			ws.styles.s.push("#qm[i] .qmtitle|cursor:default;padding:3px 0px 3px 4px;color:#444444;font-family:arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px;border-color:#aab3a4;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:1px;height:15px;margin:4px 2px 0px;border-color:#aaaaaa;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#0fbc3f;background-color:#efffe7;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 4px;");
	

			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#EFFFE7;");
			ws.styles.s.push("ul#qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:#EFFFE7;border-style:solid;border-width:1px;border-color:#0FBC3F;");
						

			ws.addons.s += 'a.rcorner_border_color = "#0FBC3F";';
			ws.addons.s += 'a.rcorner_bg_color = "#EFFFE7";';

		}
		else
		{
			
			ws.styles.s.push("#qm[i] a|padding:5px 4px 5px 5px;color:#555555;font-family:Arial;font-size:10px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;background-color:transparent;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|background-color:#dadada;color:#cc0000;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#dadada;color:#cc0000;");
			ws.styles.s.push("#qm[i] .qmtitle|cursor:default;padding:3px 0px 3px 4px;color:#444444;font-family:arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px;border-color:#bfbfbf;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:1px;height:15px;margin:4px 2px 0px;border-color:#aaaaaa;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#dadada;background-color:#f7f7f7;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 4px;");


			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#f7f7f7;");
			ws.styles.s.push("ul#qm[i] ul|padding:10px;margin:-2px 0px 0px;background-color:#f7f7f7;border-style:solid;border-width:1px;border-color:#dadada;");
			
			

		}

		ws.create = "false,0,500,false,false,false,false,false";

	}
	else if (type==2)
	{

		//***  template 3 (Hover Fill) *****

		
		ws.structure = 5;
		ws.addons.use = "round_corners,ritem,hoverfill";
		
		ws.addons.s = 'a.hoverfill_apply_to = "all";				\
		a.hoverfill_main_type = "none";						\
		a.hoverfill_sub_type = "grow";						\
		a.hoverfill_sub_direction = "up";					\
		a.hoverfill_sub_step_size = 2;						\
		a.rcorner_size = 4;							\
		a.rcorner_border_color = "#3F3F3F";					\
		a.rcorner_bg_color = "#3F3F3F";						\
		a.rcorner_top_line_auto_inset = true;					\
		a.ritem_size = 4;							\
		a.ritem_apply = "main";							\
		a.ritem_main_apply_corners = new Array(true,true,false,false);		\
		a.ritem_show_on_actives = true;						'



		

		ws.styles.s = new Array();
		if (v=="reds")
		{
		

			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 15px 5px 20px;color:#C93847;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_main_red.gif);background-repeat:no-repeat;background-position:9px 10px;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-2px 0px 0px -6px;background-color:transparent;border-width:1px;border-style:none;border-color:#621C28;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:5px 50px 5px 20px;background-color:transparent;color:#F5F5F5;font-size:12px;font-weight:bold;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|color:#621C28;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#621C28;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub.gif);");
			ws.styles.s.push("#qm[i] div .qmparent:hover|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_main_red.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#C93847;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_sub.gif);color:#EEEEEE;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#621C28;background-color:#621C28;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_main.gif);background-repeat:no-repeat;background-position:9px 5px;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 20px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#666666;background-color:#EEEEEE;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");
			ws.styles.s.push("#qm[i] div .qmhoverfill|background-color:#EBB3B9;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a|color:#C93847;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#621C28;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#621C28;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -6px;");



			ws.addons.s += 'a.rcorner_border_color = "#621c28";';
			ws.addons.s += 'a.rcorner_bg_color = "#621C28";';


		}
		else if (v=="blues")
		{
		
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 15px 5px 20px;color:#272768;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_main_blue.gif);background-repeat:no-repeat;background-position:9px 10px;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-2px 0px 0px -6px;background-color:transparent;border-width:1px;border-style:none;border-color:#4D68BB;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:5px 50px 5px 20px;background-color:transparent;color:#F5F5F5;font-size:12px;font-weight:bold;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|color:#8E9FD4;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#8E9FD4;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub.gif);");
			ws.styles.s.push("#qm[i] div .qmparent:hover|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub_hover_blue.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#272768;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_sub.gif);color:#EEEEEE;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#4D68BB;background-color:#4D68BB;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_main_blue.gif);background-repeat:no-repeat;background-position:9px 5px;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 20px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#666666;background-color:#EEEEEE;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");
			ws.styles.s.push("#qm[i] div .qmhoverfill|background-color:#272768;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -6px;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#4D68BB;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#4D68BB;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a|color:#272768;");

			ws.addons.s += 'a.rcorner_border_color = "#4D68BB";';
			ws.addons.s += 'a.rcorner_bg_color = "#4D68BB";';


		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 15px 5px 20px;color:#356827;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_main_green.gif);background-repeat:no-repeat;background-position:9px 10px;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-2px 0px 0px -6px;background-color:transparent;border-width:1px;border-style:none;border-color:#78BB47;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:5px 50px 5px 20px;background-color:transparent;color:#F5F5F5;font-size:12px;font-weight:bold;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|color:#78BB47;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#78BB47;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub.gif);");
			ws.styles.s.push("#qm[i] div .qmparent:hover|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub_hover_green.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#356827;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_sub.gif);color:#EEEEEE;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#78BB47;background-color:#78BB47;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_main_green.gif);background-repeat:no-repeat;background-position:9px 5px;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 20px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#666666;background-color:#EEEEEE;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");
			ws.styles.s.push("#qm[i] div .qmhoverfill|background-color:#356827;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -6px;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#78BB47;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#78BB47;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a|color:#356827;");

			ws.addons.s += 'a.rcorner_border_color = "#78BB47";';
			ws.addons.s += 'a.rcorner_bg_color = "#78BB47";';

		}
		else
		{
			
			
			
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 15px 5px 20px;color:#6585b9;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_main.gif);background-repeat:no-repeat;background-position:9px 10px;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#c7c7c7;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-2px 0px 0px -6px;background-color:transparent;border-width:1px;border-style:none;border-color:#a6a6a6;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:5px 50px 5px 20px;background-color:transparent;color:#f5f5f5;font-size:11px;font-weight:bold;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover, #qm[i] ul li:hover>a|color:#3f3f3f;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub.gif);");
			ws.styles.s.push("#qm[i] div .qmparent:hover|background-image:url("+qmv.base+"qmimages/qthoverfill_plus_sub_hover.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#747a86;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_sub.gif);color:#eeeeee;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#a6a6a6;background-color:#3f3f3f;background-image:url("+qmv.base+"qmimages/qthoverfill_minus_main.gif);background-repeat:no-repeat;background-position:9px 5px;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:0px 0px 0px 20px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#666666;background-color:#eeeeee;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");
			ws.styles.s.push("#qm[i] div .qmhoverfill|background-color:#c0cae3;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -6px;");


			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#3F3F3F;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#3F3F3F;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a|color:#6585b9;");
						

		}


		if (ws.structure==2)
		{
			ws.styles.s.push("#qm[i] .qmtitle|margin:5px 0px 10px 10px;color:#f1a08f;font-family:Arial;font-size:13px;font-weight:bold;font-variant:small-caps;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 10px;border-color:#f5f5f5;");

		}


		ws.create = "false,0,500,'lev2',false,false,false,true";

	}
	else if (type==3)
	{

		//***  template 4 (Border Caps) *****
		

		ws.structure = 1;
		ws.addons.use = "slide_effect,item_bullets";
		
				
		ws.addons.s = 'a.ibullets_apply_to = "parent";					\
		a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_down.gif";	\
		a.ibullets_main_image_width = 9;						\
		a.ibullets_main_image_height = 6;						\
		a.ibullets_main_position_x = -16;						\
		a.ibullets_main_position_y = -4;						\
		a.ibullets_main_align_x = "right";						\
		a.ibullets_main_align_y = "middle";						\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right.gif";	\
		a.ibullets_sub_image_width = 6;							\
		a.ibullets_sub_image_height = 9;						\
		a.ibullets_sub_position_x = -12;						\
		a.ibullets_sub_position_y = -2;							\
		a.ibullets_sub_align_x = "right";						\
		a.ibullets_sub_align_y = "middle";						'


		
		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
		

			ws.styles.s.push("#qm[i]|background-color:#FAE8E9;border-width:3px 0px 3px 0px;border-style:solid;border-color:#E16B6F;");
			ws.styles.s.push("#qm[i] a|padding:6px 40px 6px 8px;color:#112747;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#EFB1B4;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#EFB1B4;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#EFB1B4;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px;background-color:#EFB1B4;border-width:3px 1px 1px 1px;border-style:solid;border-color:#B22429;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#FAE8E9;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");

			if (ws.isvert)
			{
				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right.gif";';
				ws.addons.s += 'a.ibullets_main_image_width = 6;';
				ws.addons.s += 'a.ibullets_main_image_height = 9;';

			}


		}
		else if (v=="blues")
		{
		
			ws.styles.s.push("#qm[i]|background-color:#d7e3f6;border-width:4px 0px 4px 0px;border-style:solid;border-color:#a2bfe9;");
			ws.styles.s.push("#qm[i] a|padding:6px 40px 6px 8px;color:#112747;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover,#qm[i] li:hover>a|background-color:#a2bfe9;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#a2bfe9;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px 0px 0px 0px;background-color:#d7e3f6;border-width:4px 1px 1px;border-style:solid;border-color:#598DD8;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover,#qm[i] ul li:hover>a|text-decoration:underline;");

			if (ws.isvert)
			{
				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right.gif";';
				ws.addons.s += 'a.ibullets_main_image_width = 6;';
				ws.addons.s += 'a.ibullets_main_image_height = 9;';

			}


		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i]|background-color:#E7FCE6;border-width:3px 0px 3px 0px;border-style:solid;border-color:#0E550B;");
			ws.styles.s.push("#qm[i] a|padding:6px 40px 6px 8px;color:#082E06;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover,#qm[i] li:hover>a|background-color:#98F293;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#98F293;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px;background-color:#98F293;border-width:3px 1px 1px 1px;border-style:solid;border-color:#189012;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover,#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#E7FCE6;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");

			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_down_gray.gif";';
			ws.addons.s += 'a.ibullets_main_image_width = 8;';
			ws.addons.s += 'a.ibullets_main_image_height = 6;';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right_gray.gif";';
			ws.addons.s += 'a.ibullets_sub_image_width = 6;';
			ws.addons.s += 'a.ibullets_sub_image_height = 8;';	

			if (ws.isvert)
			{
				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right_gray.gif";';
				ws.addons.s += 'a.ibullets_main_image_width = 6;';
				ws.addons.s += 'a.ibullets_main_image_height = 8;';

			}


		}
		else
		{
			

			ws.styles.s.push("#qm[i]|background-color:#F1F1F1;border-width:3px 0px 3px 0px;border-style:solid;border-color:#A5A7A7;");
			ws.styles.s.push("#qm[i] a|padding:6px 40px 6px 8px;color:#112747;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover,#qm[i] li:hover>a|background-color:#D7D8D8;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#D7D8D8;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px;background-color:#D7D8D8;border-width:3px 1px 1px 1px;border-style:solid;border-color:#7B7E7E;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover,#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#f1f1f1;");
			

			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_down_gray.gif";';
			ws.addons.s += 'a.ibullets_main_image_width = 8;';
			ws.addons.s += 'a.ibullets_main_image_height = 6;';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right_gray.gif";';
			ws.addons.s += 'a.ibullets_sub_image_width = 6;';
			ws.addons.s += 'a.ibullets_sub_image_height = 8;';
			
			if (ws.isvert)
			{
				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/qtbordercaps_arrow_right_gray.gif";';
				ws.addons.s += 'a.ibullets_main_image_width = 6;';
				ws.addons.s += 'a.ibullets_main_image_height = 8;';
			}


			/*
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#3F3F3F;");
			ws.styles.s.push("#qm[i] ul|background-color:#3F3F3F;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#6585b9;");
			*/

			

		}


		ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#112747;font-family:Arial;font-size:12px;font-weight:bold;");
		ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:2px;margin:4px 5px 4px 5px;border-color:#A2A1AD;");




		if (ws.isvert)
		{
			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right.gif);background-repeat:no-repeat;background-position:97%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right_hover.gif);");
				
		}
		else
		{

			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_down.gif);background-repeat:no-repeat;background-position:97%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/cssalt1_arrow_down_hover.gif);");

			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/cssalt1_arrow_right_hover.gif);");
				
		}


		

		if (ws.structure==2)
		{
			ws.styles.s.push("#qm[i] .qmtitle|margin:5px 0px 10px 10px;color:#f1a08f;font-family:Arial;font-size:13px;font-weight:bold;font-variant:small-caps;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 10px;border-color:#f5f5f5;");

		}


		

	}
	else if (type==4)
	{

		//***  template 5 (Full Gradient Bar) *****

		ws.structure = 1;
		ws.addons.use = "item_bullets";
		
			
		ws.addons.s = 'a.ibullets_apply_to = "parent";				\
		a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_3.gif";		\
		a.ibullets_main_image_hover = "'+qmv.base+'qmimages/arrow_2.gif";	\
		a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_2.gif";	\
		a.ibullets_main_image_width = 6;					\
		a.ibullets_main_image_height = 3;					\
		a.ibullets_main_position_x = -16;					\
		a.ibullets_main_position_y = -5;					\
		a.ibullets_main_align_x = "right";					\
		a.ibullets_main_align_y = "middle";					\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_0.gif";		\
		a.ibullets_sub_image_width = 3;						\
		a.ibullets_sub_image_height = 6;					\
		a.ibullets_sub_position_x = -12;					\
		a.ibullets_sub_position_y = -2;						\
		a.ibullets_sub_align_x = "right";					\
		a.ibullets_sub_align_y = "middle";					'
		

		
		
		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
		
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/gradient_4.gif);border-width:1px 0px 1px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:5px 20px 5px 8px;background-color:transparent;color:#FFFFFF;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 1px 0px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#EDE8E8;color:#B62828;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#EDE8E8;color:#B62828;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#EDE8E8;color:#B62828;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px 0px 0px -1px;background-color:#DACFCF;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;color:#333333;font-size:11px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#EDE8E8;color:#B62828;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#EDE8E8;color:#B62828;text-decoration:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#EDE8E8;color:#B62828;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#672D2D;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#CA8484;");
			
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|background-image:url("+qmv.base+"qmimages/gradient_5.gif);border-width:0px 1px;padding:20px 0px;");
				ws.styles.s.push("#qm[i] a|border-style:none;border-width:0px;");
			}
			

		}
		else if (v=="blues")
		{
		
			ws.styles.s.push("#qm[i]|background-color:#ffffff;background-image:url("+qmv.base+"qmimages/gradient_0.gif);border-width:1px 0px 1px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:5px 20px 5px 8px;background-color:transparent;color:#ffffff;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 1px 0px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#eff4fa;color:#000000;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#eff4fa;color:#000000;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#eff4fa;color:#000000;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px 0px 0px -1px;background-color:#d6dce2;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 30px 3px 5px;color:#333333;font-size:11px;border-width:0px 1px;border-style:solid;border-color:#d6dce2;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#eff4fa;color:#000000;text-decoration:none;border-color:#666666;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#eff4fa;color:#000000;text-decoration:none;border-color:#666666;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#eff4fa;color:#000000;text-decoration:underline;border-color:#666666;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#112747;font-family:Arial;font-size:12px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:2px;margin:4px 5px 4px 5px;border-color:#A2A1AD;");
			
		
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|background-image:url("+qmv.base+"qmimages/gradient_1.gif);border-width:0px 1px;padding:20px 0px;");
				ws.styles.s.push("#qm[i] a|border-style:none;border-width:0px;");
			}
			

		}
		else if (v=="greens")
		{
		
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/gradient_6.gif);border-width:1px 0px 1px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:5px 20px 5px 8px;background-color:transparent;color:#FFFFFF;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 1px 0px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#B0E9A8;color:#1D1D1D;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#B0E9A8;color:#1D1D1D;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#B0E9A8;color:#1D1D1D;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px 0px 0px -1px;background-color:#DDF6DA;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;color:#333333;font-size:11px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#B0E9A8;color:#1D1D1D;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#B0E9A8;color:#1D1D1D;text-decoration:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#B0E9A8;color:#1D1D1D;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#194812;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#A0A0A1;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_0.gif);text-decoration:underline;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_2.gif);text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_2.gif);text-decoration:underline;");
			
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|background-image:url("+qmv.base+"qmimages/gradient_7.gif);border-width:0px 1px;padding:20px 0px;");
				ws.styles.s.push("#qm[i] a|border-style:none;border-width:0px;");
			}

			
		}
		else
		{
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/gradient_2.gif);border-width:1px 0px 1px 1px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a|padding:5px 20px 5px 8px;background-color:transparent;color:#FFFFFF;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 1px 0px 0px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#EAEAEA;color:#333333;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#EAEAEA;color:#333333;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#EAEAEA;color:#333333;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:0px 0px 0px 0px;background-color:#DADADA;border-width:1px;border-style:solid;border-color:#999999;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;color:#333333;font-size:11px;border-width:0px 1px 0px 1px;border-style:solid;border-color:#DADADA;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#EAEAEA;color:#333333;text-decoration:none;border-color:#666666;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#EAEAEA;color:#333333;text-decoration:none;border-color:#666666;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#EAEAEA;color:#222222;text-decoration:underline;border-color:#666666;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:2px;margin:4px 5px 4px 5px;border-color:#A2A1AD;");

		
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|background-image:url("+qmv.base+"qmimages/gradient_3.gif);border-width:0px 1px;padding:20px 0px;");
				ws.styles.s.push("#qm[i] a|border-style:none;border-width:0px;");
			}



		}


		
	
		if (ws.isvert)
		{
			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_0.gif);");

			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_1.gif";';
			ws.addons.s += 'a.ibullets_main_image_hover = "'+qmv.base+'qmimages/arrow_0.gif";';
			ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_0.gif";';
			ws.addons.s += 'a.ibullets_main_image_width = 3;';
			ws.addons.s += 'a.ibullets_main_image_height = 6;';
				
		}
		else
		{
			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_3.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_2.gif);");

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_0.gif);");

		}
			
	}
	else if (type==5)
	{

		//***  template 6 (Gradient Hover) *****

		

		//ws.bgcolor = "#bdcdf1";
		ws.bgcolor = "#f6f6f6";

		ws.structure = 1;
		ws.addons.use = "item_bullets";
		
			
		ws.addons.s = 'a.ibullets_apply_to = "parent";			\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_0.gif";	\
		a.ibullets_sub_image_width = 3;					\
		a.ibullets_sub_image_height = 6;				\
		a.ibullets_sub_position_x = -15;				\
		a.ibullets_sub_position_y = -3;					\
		a.ibullets_sub_align_x = "right";				\
		a.ibullets_sub_align_y = "middle";				'	


		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);


		if (ws.isvert)
		{

			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_0.gif";		\
			a.ibullets_main_image_width = 3;							\
			a.ibullets_main_image_height = 6;							\
			a.ibullets_main_position_x = -15;							\
			a.ibullets_main_position_y = -3;							\
			a.ibullets_main_align_x = "right";							\
			a.ibullets_main_align_y = "middle";							'	


		}



		if (v=="reds")
		{
		
			ws.styles.s.push("#qm[i]|width:auto;padding:0px 0px 0px 10px;margin:0px;background-color:#FFFFFF;border-width:1px 0px 1px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 8px;background-color:transparent;color:#333333;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 0px 0px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#612727;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#612727;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:92% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#612727;background-image:url("+qmv.base+"qmimages/gradient_12.gif);color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;background-color:#FFFFFF;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;color:#333333;font-size:11px;border-width:0px 0px 0px 4px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:none;border-color:#D84338;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:none;border-color:#D84338;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_13.gif);background-repeat:repeat;border-color:#D84338;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#112747;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#D84338;");
			

			if (ws.isvert)
			{
		
				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;");
			
				ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_13.gif);background-repeat:repeat;");
				
				ws.addons.s += 'a.ibullets_main_image_hover = "'+qmv.base+'qmimages/arrow_1.gif";';
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_1.gif";';

	
			}

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_1.gif);");

			ws.addons.s += 'a.ibullets_sub_image_hover = "'+qmv.base+'qmimages/arrow_1.gif";';
			ws.addons.s += 'a.ibullets_sub_image_active = "'+qmv.base+'qmimages/arrow_1.gif";';


		}
		else if (v=="blues")
		{
		
			ws.styles.s.push("#qm[i]|padding:0px 0px 0px 10px;margin:0px;background-color:#ffffff;border-width:1px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 8px;background-color:transparent;color:#444444;font-family:Arial;font-size:11px;text-decoration:none;border-width:0px 0px 0px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#CDDDEF;color:#000000;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#CDDDEF;color:#000000;text-decoration:underline;background-image:url("+qmv.base+"qmimages/gradient_8.gif);");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:92% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#eff4fa;background-image:url("+qmv.base+"qmimages/gradient_8.gif);color:#000000;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;background-color:#ffffff;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#333333;font-size:11px;border-width:0px 0px 0px 4px;border-style:solid;border-color:#ffffff;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:none;border-color:#75b1c2;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:none;border-color:#75b1c2;background-image:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-repeat:repeat;background-image:url("+qmv.base+"qmimages/gradient_9.gif);text-decoration:underline;border-color:#75b1c2;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#112747;font-family:Arial;font-size:12px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#A2A1AD;");
		

			if (ws.isvert)
			{
		
				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;");
			
				ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_9.gif);background-repeat:repeat;");
				ws.styles.s.push("#qm[i] li:hover>a|background-image:url("+qmv.base+"qmimages/gradient_9.gif);background-repeat:repeat;");
	
			}

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_0.gif);");

			

		}
		else if (v=="greens")
		{
		
			
			

			ws.styles.s.push("#qm[i]|width:auto;padding:0px 0px 0px 10px;margin:0px;background-color:#FFFFFF;border-width:1px 0px 1px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 8px;background-color:transparent;color:#333333;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 0px 0px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#51844C;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#51844C;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:92% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#51844C;background-image:url("+qmv.base+"qmimages/gradient_14.gif);color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;background-color:#FFFFFF;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;color:#333333;font-size:11px;border-width:0px 0px 0px 4px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:none;border-color:#32522F;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:none;border-color:#32522F;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_15.gif);background-repeat:repeat;border-color:#32522F;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#112747;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#32522F;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);text-decoration:underline;");
			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92% 50%;");

			if (ws.isvert)
			{
		
				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;");
			
				ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_15.gif);background-repeat:repeat;");
				
				ws.addons.s += 'a.ibullets_main_image_hover = "'+qmv.base+'qmimages/arrow_1.gif";';
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_1.gif";';

	
			}

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_1.gif);");

			ws.addons.s += 'a.ibullets_sub_image_hover = "'+qmv.base+'qmimages/arrow_1.gif";';
			ws.addons.s += 'a.ibullets_sub_image_active = "'+qmv.base+'qmimages/arrow_1.gif";';
			

			
		}
		else
		{
			


			

			ws.styles.s.push("#qm[i]|width:auto;padding:0px 0px 0px 10px;margin:0px;background-color:#FFFFFF;border-width:1px 0px 1px 0px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 8px;background-color:transparent;color:#333333;font-family:Arial;font-size:12px;text-decoration:none;border-width:0px 0px 0px 1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#444444;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#444444;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:92% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#444444;color:#ffffff;background-image:url("+qmv.base+"qmimages/gradient_10.gif);text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;background-color:#FFFFFF;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;color:#333333;font-size:11px;border-width:0px 0px 0px 4px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:none;border-color:#A2A1AD;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:none;border-color:#A2A1AD;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_11.gif);background-repeat:repeat;border-color:#A2A1AD;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#112747;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#A2A1AD;");
			
		
			if (ws.isvert)
			{
		
				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;");
			
				ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-image:url("+qmv.base+"qmimages/gradient_11.gif);background-repeat:repeat;");
				
				ws.addons.s += 'a.ibullets_main_image_hover = "'+qmv.base+'qmimages/arrow_1.gif";';
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_1.gif";';

	
			}

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|text-decoration:underline;background-image:url("+qmv.base+"qmimages/arrow_1.gif);");

			ws.addons.s += 'a.ibullets_sub_image_hover = "'+qmv.base+'qmimages/arrow_1.gif";';
			ws.addons.s += 'a.ibullets_sub_image_active = "'+qmv.base+'qmimages/arrow_1.gif";';

			

		}

	}
	else if (type==6)
	{
		
		//***  template 7 (Blended Angles) *****

		ws.structure = 2;
		ws.addons.use = "round_corners,item_bullets,ritem";

		
		ws.addons.s = 'a.rcorner_size = 6;							\
		a.rcorner_border_color = "#285DA8";							\
		a.rcorner_bg_color = "#D7E3F6";								\
		a.rcorner_angle_corners = true;								\
		a.rcorner_top_line_auto_inset = true;							\
		a.ritem_size = 4;									\
		a.ritem_apply = "main";									\
		a.ritem_angle_corners = true;								\
		a.ritem_main_apply_corners = new Array(true,true,false,false);				\
		a.ritem_show_on_actives = true;								\
		a.ibullets_apply_to = "parent";								\
		a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_6.gif";				\
		a.ibullets_main_image_width = 9;							\
		a.ibullets_main_image_height = 6;							\
		a.ibullets_main_position_x = -18;							\
		a.ibullets_main_position_y = -4;							\
		a.ibullets_main_align_x = "right";							\
		a.ibullets_main_align_y = "middle";							\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_4.gif";				\
		a.ibullets_sub_image_active = "'+qmv.base+'qmimages/arrow_5.gif";			\
		a.ibullets_sub_image_width = 6;								\
		a.ibullets_sub_image_height = 9;							\
		a.ibullets_sub_position_x = -14;							\
		a.ibullets_sub_position_y = -3;								\
		a.ibullets_sub_align_x = "right";							\
		a.ibullets_sub_align_y = "middle";							'
		
		

		ws.styles.s = new Array();
		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|padding:3px 0px 3px 8px;background-color:#F4F4F4;border-width:1px;border-style:solid;border-color:#8F4141;");
			ws.styles.s.push("#qm[i] a|padding:5px 30px 5px 8px;color:#2F2F2F;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 15px 15px 15px;margin:-4px 0px 0px -6px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;margin:0px;background-color:transparent;font-size:12px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|color:#8F4141;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#8F4141;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#8F4141;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|padding:2px 0px 2px 5px;margin:10px -4px 5px -4px;background-color:#B05252;color:#F4F4F4;font-family:Arial;font-size:11px;font-weight:bold;border-width:1px;border-style:solid;border-color:#8F4141;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#8F4141;background-color:#e4d3bd;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:1px 0px 0px 7px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#8F4141;background-color:#F4F4F4;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");


			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_9.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);");
			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#e4d3bd;");
			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_8.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a|background-color:transparent;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#E4D3BD;border-style:solid;border-width:1px;border-color:#8F4141;");

								
			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_9.gif";';
			ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_7.gif";';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_8.gif";';


			ws.addons.s += 'a.rcorner_border_color = "#8F4141";';
			ws.addons.s += 'a.rcorner_bg_color = "#e4d3bd";';


		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i]|padding:3px 0px 3px 8px;background-color:#eeeeee;border-width:1px;border-style:solid;border-color:#a2bfe9;");
			ws.styles.s.push("#qm[i] a|padding:5px 30px 5px 8px;margin:0px 0px 0px 0px;color:#112747;font-family:Arial;font-size:11px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 15px 15px;margin:-4px 0px 0px -6px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;margin:0px;background-color:transparent;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#285da8;color:#eeeeee;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#285da8;color:#eeeeee;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#285da8;color:#eeeeee;");
			ws.styles.s.push("#qm[i] .qmtitle|padding:2px 0px 2px 5px;margin:10px -4px 5px;background-color:#afc8ec;color:#112747;font-family:Arial;font-size:11px;font-weight:bold;border-width:1px;border-style:solid;border-color:#285da8;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#285da8;background-color:#d7e3f6;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:1px 0px 0px 7px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#666666;background-color:#eeeeee;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");
			

			

			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_6.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#D7E3F6;");

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_4.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");

			ws.styles.s.push("ul#qm[i] ul li:hover>a|background-color:#285da8;");

			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#D7E3F6;border-style:solid;border-width:1px;border-color:#285DA8;");


			
			

		

		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i]|padding:3px 0px 3px 8px;background-color:#F4F4F4;border-width:1px;border-style:solid;border-color:#577D53;");
			ws.styles.s.push("#qm[i] a|padding:5px 30px 5px 8px;color:#2F2F2F;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 15px 15px 15px;margin:-4px 0px 0px -6px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;margin:0px;background-color:transparent;font-size:12px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|color:#577D53;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#577D53;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#577D53;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|padding:2px 0px 2px 5px;margin:10px -4px 5px -4px;background-color:#577D53;color:#F4F4F4;font-family:Arial;font-size:11px;font-weight:bold;border-width:1px;border-style:solid;border-color:#577D53;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#577D53;background-color:#D4E1D3;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:1px 0px 0px 7px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#577D53;background-color:#F4F4F4;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");


			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_11.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);");
			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#D4E1D3;");

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");

			ws.styles.s.push("ul#qm[i] ul li:hover>a|background-color:transparent;");

			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#D4E1D3;border-style:solid;border-width:1px;border-color:#577D53;");

								
			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_11.gif";';
			ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_7.gif";';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_10.gif";';


			ws.addons.s += 'a.rcorner_border_color = "#577D53";';
			ws.addons.s += 'a.rcorner_bg_color = "#D4E1D3";';
			

		}
		else
		{

			

			ws.styles.s.push("#qm[i]|padding:3px 0px 3px 8px;background-color:#F4F4F4;border-width:1px;border-style:solid;border-color:#686868;");
			ws.styles.s.push("#qm[i] a|padding:5px 30px 5px 8px;color:#112747;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 15px 15px 15px;margin:-4px 0px 0px -6px;background-color:transparent;border-style:none;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 10px 3px 5px;margin:0px;background-color:transparent;font-size:12px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#686868;color:#F4F4F4;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#686868;color:#F4F4F4;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#686868;color:#F4F4F4;");
			ws.styles.s.push("#qm[i] .qmtitle|padding:2px 0px 2px 5px;margin:10px -4px 5px -4px;background-color:#AFC8EC;color:#112747;font-family:Arial;font-size:11px;font-weight:bold;border-width:1px;border-style:solid;border-color:#686868;");
			ws.styles.s.push("#qm[i] .qmritem span|border-color:#686868;background-color:#DFDFDF;");
			ws.styles.s.push("#qm[i] .qmritemcontent|padding:1px 0px 0px 7px;");
			ws.styles.s.push("#qm[i] div .qmritem span|border-color:#686868;background-color:#F4F4F4;");
			ws.styles.s.push("#qm[i] div .qmritemcontent|padding:0px 0px 0px 4px;");

			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_6.gif);background-repeat:no-repeat;background-position:92%;");
			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#DFDFDF;");

			ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_4.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");

			ws.styles.s.push("ul#qm[i] ul li:hover>a|background-color:#686868;");

			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#DFDFDF;border-style:solid;border-width:1px;border-color:#686868;");

			
			ws.addons.s += 'a.rcorner_border_color = "#686868";';
			ws.addons.s += 'a.rcorner_bg_color = "#DFDFDF";';

			

		}

		ws.create = "false,0,500,false,false,false,false,false";

	}
	else if (type==7)
	{

		//***  template 8 (Border Connect) *****

		ws.structure = 1;
		ws.addons.use = ",item_bullets";

			
		ws.addons.s = 'a.ibullets_apply_to = "parent";					\
		a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_12.gif";			\
		a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_13.gif";		\
		a.ibullets_main_image_width = 6;						\
		a.ibullets_main_image_height = 8;						\
		a.ibullets_main_position_x = -6;						\
		a.ibullets_main_position_y = -3;						\
		a.ibullets_main_align_x = "right";						\
		a.ibullets_main_align_y = "middle";						\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_12.gif";			\
		a.ibullets_sub_image_active = "'+qmv.base+'qmimages/arrow_13.gif";		\
		a.ibullets_sub_image_width = 6;							\
		a.ibullets_sub_image_height = 8;						\
		a.ibullets_sub_position_x = -12;							\
		a.ibullets_sub_position_y = -2;							\
		a.ibullets_sub_align_x = "right";						\
		a.ibullets_sub_align_y = "middle";						'


		ws.styles.s = new Array();
		ws.create = "true,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

	
		if (v=="reds")
		{
			
						

			ws.styles.s.push("#qm[i]|width:130px;padding:40px 10px 40px 10px;margin:0px;background-color:#603235;background-image:url("+qmv.base+"qmimages/gradient_19.gif);border-width:1px;border-style:solid;border-color:#603235;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 3px;margin:0px 0px 2px 0px;background-color:transparent;color:#EDE6E5;font-family:Arial;font-size:11px;text-decoration:none;border-width:0px 0px 1px 0px;border-style:solid;border-color:#EDE6E5;");
			ws.styles.s.push("#qm[i] a:hover|color:#EDE6E5;border-color:#FF3C3C;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#EDE6E5;border-color:#FF3C3C;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#EDE6E5;border-color:#FF3C3C;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;background-color:#603235;border-width:1px;border-style:solid;border-color:#FF3C3C;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#EDE6E5;border-width:0px;border-color:#FF3C3C;");
			ws.styles.s.push("#qm[i] div a:hover|color:#FF3C3C;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#FF3C3C;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#FF3C3C;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#F6F6F6;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#EDE6E5;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");
			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_16.gif);background-repeat:no-repeat;background-position:97% 50%;");


			
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|padding:40px 10px;margin:0px;background-image:url("+qmv.base+""+qmv.base+"qmimages/gradient_19.gif);");
				ws.styles.s.push("#qm[i] a|margin:0px 0px 2px 0px;");

				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'"+qmv.base+"qmimages/arrow_16.gif";'
				ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'"+qmv.base+"qmimages/arrow_16.gif";'

				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_16.gif);background-repeat:no-repeat;background-position:97%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");
			

			}
			else
			{
				ws.styles.s.push("#qm[i]|padding:5px 20px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_18.gif);");
				ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 3px;margin:0px 20px 0px 0px;border-width:0px 1px 0px 0px;");
				ws.styles.s.push("#qm[i] div a, #qm[i] ul a|margin:0px;");
				ws.styles.s.push("#qm[i] div,#qm[i] ul|padding:15px;");

				
				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_17.gif";'
				ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_16.gif";'
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_15.gif";'
				ws.addons.s += 'a.ibullets_main_image_width = 8;'
				ws.addons.s += 'a.ibullets_main_image_height = 6;'
				ws.addons.s += 'a.ibullets_main_position_x = -20;';
				

				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_17.gif);background-repeat:no-repeat;background-position:90%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_15.gif);");
				ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_16.gif);");
				ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");

				
			}
			



		




		}
		else if (v=="blues")
		{
		
			
			

			ws.styles.s.push("#qm[i]|width:130px;padding:40px 10px 40px 10px;margin:0px;background-color:#424161;background-image:url("+qmv.base+"qmimages/gradient_23.gif);border-width:1px;border-style:solid;border-color:#1B1A27;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 3px;margin:0px 0px 2px 0px;background-color:transparent;color:#EDE6E5;font-family:Arial;font-size:11px;text-decoration:none;border-width:0px 0px 1px 0px;border-style:solid;border-color:#EDE6E5;");
			ws.styles.s.push("#qm[i] a:hover|color:#EDE6E5;border-color:#7ED8FA;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#EDE6E5;border-color:#7ED8FA;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#EDE6E5;border-color:#7ED8FA;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;background-color:#424161;border-width:1px;border-style:solid;border-color:#7ED8FA;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#EDE6E5;border-width:0px;border-color:#7ED8FA;");
			ws.styles.s.push("#qm[i] div a:hover|color:#7ED8FA;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#7ED8FA;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#7ED8FA;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#F6F6F6;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#EDE6E5;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");
			ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_16.gif);background-repeat:no-repeat;background-position:97% 50%;");

			
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|padding:40px 10px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_23.gif);");
				ws.styles.s.push("#qm[i] a|margin:0px 0px 2px 0px;");

				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_12.gif);background-repeat:no-repeat;background-position:97%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");
					
		

			}
			else
			{
				ws.styles.s.push("#qm[i]|padding:5px 20px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_22.gif);");
				ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 3px;margin:0px 20px 0px 0px;border-width:0px 1px 0px 0px;");
				ws.styles.s.push("#qm[i] div a,#qm[i] ul a|margin:0px;");
				ws.styles.s.push("#qm[i] div,#qm[i] ul|padding:15px;");

				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_14.gif";'
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_15.gif";'
				ws.addons.s += 'a.ibullets_main_image_width = 8;'
				ws.addons.s += 'a.ibullets_main_image_height = 6;'
				ws.addons.s += 'a.ibullets_main_position_x = -20;';


				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_14.gif);background-repeat:no-repeat;background-position:90%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_15.gif);");
				ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_12.gif);");
				ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");

				
		
			}

			

		

		}
		else if (v=="greens")
		{
			
			

			

			ws.styles.s.push("#qm[i]|width:130px;padding:40px 10px 40px 10px;margin:0px;background-color:#607D51;background-image:url("+qmv.base+"qmimages/gradient_21.gif);border-width:1px;border-style:solid;border-color:#555555;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 3px;margin:0px 0px 2px 0px;background-color:transparent;color:#EDE6E5;font-family:Arial;font-size:11px;text-decoration:none;border-width:0px 0px 1px 0px;border-style:solid;border-color:#EDE6E5;");
			ws.styles.s.push("#qm[i] a:hover|color:#EDE6E5;border-color:#90F77B;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#EDE6E5;border-color:#90F77B;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#EDE6E5;border-color:#90F77B;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;background-color:#607D51;border-width:1px;border-style:solid;border-color:#90F77B;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#EDE6E5;border-width:0px;border-color:#90F77B;");
			ws.styles.s.push("#qm[i] div a:hover|color:#90F77B;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#90F77B;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#90F77B;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#F6F6F6;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#EDE6E5;");
			

			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|padding:40px 10px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_21.gif);");
				ws.styles.s.push("#qm[i] a|margin:0px 0px 2px 0px;");

				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_12.gif);background-repeat:no-repeat;background-position:97%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");
					
		

			}
			else
			{
				ws.styles.s.push("#qm[i]|padding:5px 20px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_20.gif);");
				ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 3px;margin:0px 20px 0px 0px;border-width:0px 1px 0px 0px;");
				ws.styles.s.push("#qm[i] div a,#qm[i] ul a|margin:0px;");
				ws.styles.s.push("#qm[i] div,#qm[i] ul|padding:15px;");

				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_14.gif";'
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_15.gif";'
				ws.addons.s += 'a.ibullets_main_image_width = 8;'
				ws.addons.s += 'a.ibullets_main_image_height = 6;'
				ws.addons.s += 'a.ibullets_main_position_x = -20;';


				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_14.gif);background-repeat:no-repeat;background-position:90%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_15.gif);");
				ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_12.gif);");
				ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");

				
		
			}

			

		}
		else
		{


			
			ws.styles.s.push("#qm[i]|padding:40px 10px;margin:0px;background-color:#000000;background-image:url("+qmv.base+"qmimages/gradient_17.gif);border-width:1px;border-style:solid;border-color:#000000;");
			ws.styles.s.push("#qm[i] a|padding:3px 20px 3px 3px;background-color:transparent;color:#aaaaaa;font-family:Arial;font-size:11px;text-decoration:none;border-width:0px 0px 1px;border-style:solid;border-color:#aaaaaa;");
			ws.styles.s.push("#qm[i] a:hover|color:#ffffff;border-color:#ffcc33;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#ffffff;border-color:#ffcc33;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#ffffff;border-color:#ffcc33;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;background-color:#000000;border-width:1px;border-style:solid;border-color:#ffcc33;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#cccccc;border-width:0px;border-color:#ffcc33;");
			ws.styles.s.push("#qm[i] div a:hover|color:#ffcc33;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#ffcc33;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#ffcc33;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#f6f6f6;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#aaaaaa;");
			

			
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i]|padding:40px 10px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_17.gif);");
				ws.styles.s.push("#qm[i] a|margin:0px 0px 2px 0px;");

				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_12.gif);background-repeat:no-repeat;background-position:97%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");
					
		

			}
			else
			{
				ws.styles.s.push("#qm[i]|padding:5px 20px;margin:0px;background-image:url("+qmv.base+"qmimages/gradient_16.gif);");
				ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 3px;margin:0px 20px 0px 0px;border-width:0px 1px 0px 0px;");
				ws.styles.s.push("#qm[i] div a,#qm[i] ul a|margin:0px;");
				ws.styles.s.push("#qm[i] div,#qm[i] ul|padding:15px;");

				ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_14.gif";'
				ws.addons.s += 'a.ibullets_main_image_active = "'+qmv.base+'qmimages/arrow_15.gif";'
				ws.addons.s += 'a.ibullets_main_image_width = 8;'
				ws.addons.s += 'a.ibullets_main_image_height = 6;'
				ws.addons.s += 'a.ibullets_main_position_x = -20;';


				ws.styles.s.push("ul#qm[i] li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_14.gif);background-repeat:no-repeat;background-position:90%;");
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_15.gif);");
				ws.styles.s.push("ul#qm[i] ul li .qmparent|background-image:url("+qmv.base+"qmimages/arrow_12.gif);");
				ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_13.gif);");

				
		
			}


		}


		

		

	}
	else if (type==8)
	{
		
		//***  template 9 (Border Connect) *****

		ws.structure = 1;
		ws.addons.use = ",item_bullets";

			
		ws.addons.s = '';
		
		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);


		
		if (v=="reds")
		{
			
						

			
			
			ws.styles.s.push("#qm[i]|width:auto;margin:0px;background-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 10px;background-color:transparent;color:#222222;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#FF3300;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#FF3300;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 5px 5px 0px;background-color:#FFFFFF;border-width:1px 1px 1px 5px;border-style:solid;border-color:#FF3300;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 10px;color:#222222;font-size:11px;text-align:left;border-width:0px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|color:#FF3300;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#FF3300;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#FF3300;color:#FFFFFF;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 10px 5px 10px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 10px 4px 10px;border-color:#999999;");
			
		
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-color:#ff3300;color:#ffffff;");			



		




		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i]|width:auto;margin:0px;background-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 10px;background-color:transparent;color:#222222;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#3B3B7C;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#3B3B7C;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 5px 5px 0px;background-color:#FFFFFF;border-width:1px 1px 1px 5px;border-style:solid;border-color:#3B3B7C;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 10px;color:#222222;font-size:11px;text-align:left;border-width:0px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|color:#43698B;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#3B3B7C;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 10px 5px 10px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 10px 4px 10px;border-color:#999999;");


			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#3B3B7C;color:#FFFFFF;background-color:#3B3B7C;color:#FFFFFF;");

		

		

		}
		else if (v=="greens")
		{
			

			ws.styles.s.push("#qm[i]|width:auto;margin:0px;background-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 10px;background-color:transparent;color:#222222;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#4DB251;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#4DB251;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 5px 5px 0px;background-color:#FFFFFF;border-width:1px 1px 1px 5px;border-style:solid;border-color:#4DB251;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 10px;color:#222222;font-size:11px;text-align:left;border-width:0px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|color:#4DB251;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#4DB251;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 10px 5px 10px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 10px 4px 10px;border-color:#999999;");


			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#4DB251;color:#FFFFFF;background-color:#4DB251;color:#FFFFFF;");
		
			

		}
		else
		{


			

			

			ws.styles.s.push("#qm[i]|width:auto;margin:0px;background-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a|padding:3px 30px 3px 10px;background-color:transparent;color:#3F3F3F;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#3F3F3F;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#3F3F3F;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 5px 5px 0px;background-color:#FFFFFF;border-width:1px 1px 1px 5px;border-style:solid;border-color:#3F3F3F;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 10px;color:#3F3F3F;font-size:11px;text-align:left;border-width:0px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|color:#9F3F46;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#3F3F3F;color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 10px 5px 10px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 10px 4px 10px;border-color:#999999;");
		

			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#3F3F3F;color:#FFFFFF;background-color:#3F3F3F;color:#FFFFFF;");

		


		}


		

		

	}
	else if (type==9)
	{

		//***  template 10 (Match Widths) *****

		ws.structure = 1;
		ws.addons.use = ",match_widths";

			
		ws.addons.s = 'a.mwidths_active = true;';
		
		
		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);


		
		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 60px 3px 0px;margin:0px 5px 0px 0px;color:#C80000;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;border-width:0px 0px 8px 0px;border-style:solid;border-color:#C80000;");
			ws.styles.s.push("#qm[i] a:hover|color:#000000;border-color:#999999;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#000000;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#000000;text-decoration:none;border-color:#999999;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 5px 10px 5px;background-color:#EEEEEE;border-width:1px;border-style:solid;border-color:#999999;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 5px 3px 5px;background-color:transparent;color:#000000;font-size:11px;font-weight:normal;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#C80000;color:#FFFFFF;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#C80000;color:#FFFFFF;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#C80000;background-image:url("+qmv.base+"qmimages/arrow_1.gif);color:#FFFFFF;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("ul#qm[i] ul|width:100%;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);");

						

		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 60px 3px 0px;margin:0px 5px 0px 0px;color:#1359B0;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;border-width:0px 0px 8px 0px;border-style:solid;border-color:#1359B0;");
			ws.styles.s.push("#qm[i] a:hover|border-color:#6BA6EF;");
			ws.styles.s.push("#qm[i] li:hover>a|border-color:#6BA6EF;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;border-color:#6BA6EF;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 5px 10px 5px;background-color:#EEEEEE;border-width:1px;border-style:solid;border-color:#6BA6EF;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 5px 3px 5px;background-color:transparent;color:#000000;font-size:11px;font-weight:normal;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#1359B0;color:#FFFFFF;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#1359B0;color:#FFFFFF;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#1359B0;background-image:url("+qmv.base+"qmimages/arrow_1.gif);color:#FFFFFF;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");



			ws.styles.s.push("ul#qm[i] ul|width:100%;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);");


		

		}
		else if (v=="greens")
		{
			
		
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 60px 3px 0px;margin:0px 5px 0px 0px;color:#326D3A;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;border-width:0px 0px 8px 0px;border-style:solid;border-color:#326D3A;");
			ws.styles.s.push("#qm[i] a:hover|border-color:#6BBB75;");
			ws.styles.s.push("#qm[i] li:hover>a|border-color:#6BBB75;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;border-color:#6BBB75;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 5px 10px 5px;background-color:#EEEEEE;border-width:1px;border-style:solid;border-color:#6BBB75;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 5px 3px 5px;background-color:transparent;color:#000000;font-size:11px;font-weight:normal;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#326D3A;color:#FFFFFF;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#326D3A;color:#FFFFFF;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#326D3A;background-image:url("+qmv.base+"qmimages/arrow_1.gif);color:#FFFFFF;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);");
			ws.styles.s.push("ul#qm[i] ul|width:100%;");


		}
		else
		{




			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|margin:0px 5px 0px 0px;padding:5px 60px 3px 0px;color:#666;font-family:Arial;font-size:13px;text-decoration:none;font-weight:bold;border-width:0px 0px 8px;border-style:solid;border-color:#666666;");
			ws.styles.s.push("#qm[i] a:hover|color:#000000;border-color:#ff0000;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#000000;border-color:#ff0000;");
			ws.styles.s.push("#qm[i] .qmparent|background-repeat:no-repeat;background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#000000;text-decoration:none;border-color:#ff0000;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 5px;background-color:#eeeeee;border-width:1px;border-style:solid;border-color:#ff0000;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 5px 3px 5px;background-color:transparent;color:#000000;font-size:12px;font-weight:normal;border-width:0px;border-style:none;border-color:#000000;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#666666;color:#ffffff;text-decoration:none;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#666666;color:#ffffff;text-decoration:none;");
			ws.styles.s.push("#qm[i] div .qmparent,#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#666666;color:#ffffff;background-image:url("+qmv.base+"qmimages/arrow_1.gif);");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
		
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);");
			ws.styles.s.push("ul#qm[i] ul|width:100%;");

	

		}


		if (ws.isvert)
			ws.styles.s.push("#qm[i] a|margin:0px 0px 5px 0px;");
			
				

		

	}	
	else if (type==10)
	{

		//***  template 7 (Tabbed Items) *****

		ws.structure = 2;
		ws.addons.use = ",tabscss";

		
		ws.addons.s = 'a.tabscss_type = "angled";			\
		a.tabscss_size = 5;						\
		a.tabscss_left_offset = -1;					\
		a.tabscss_apply_far_left = true;				\
		a.tabscss_apply_far_right = true;				\
		a.tabscss_apply_middles = true;					\
		a.tabscss_bg_color = "#ffffff";					\
		a.tabscss_border_color = "#687a54";				'
		
		ws.addons.s+=qmvi_template_modify_addon_setting(mod_names);

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#E83838;");
			ws.styles.s.push("#qm[i] a|padding:4px 40px 4px 10px;background-color:#EFE6E6;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#E83838;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#D7C1C1;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px -1px;background-color:#EFE6E6;border-width:1px;border-style:solid;border-color:#E83838;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#222222;font-size:11px;text-align:left;border-width:1px 0px 1px 0px;border-color:#EFE6E6;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#D7C1C1;color:#222222;border-color:#E83838;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#D7C1C1;color:#222222;border-color:#E83838;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#E83838;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#D7C1C1;");
	
			ws.addons.s += 'a.tabscss_border_color = "#E83838";';
			

		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#49536C;");
			ws.styles.s.push("#qm[i] a|padding:4px 40px 4px 10px;background-color:#E0E3EA;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#49536C;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#ADB5C8;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px -1px;background-color:#E0E3EA;border-width:1px;border-style:solid;border-color:#49536C;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#222222;font-size:11px;text-align:left;border-width:1px 0px 1px 0px;border-color:#E0E3EA;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#ADB5C8;color:#222222;border-color:#49536C;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#ADB5C8;color:#222222;border-color:#49536C;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#49536C;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#ADB5C8;");

			ws.addons.s += 'a.tabscss_border_color = "#49536C";';
					

		}
		else if (v=="greens")
		{
			
			ws.styles.s.push("#qm[i]|margin:0px;background-color:#ffffff;border-width:0px 0px 0px 1px;border-style:solid;border-color:#687a54;");
			ws.styles.s.push("#qm[i] a|padding:4px 40px 4px 10px;background-color:#dcedcd;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#687a54;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#c2e0a9;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:-1px 0px 0px -1px;padding:5px;background-color:#dcedcd;border-width:1px;border-style:solid;border-color:#687a54;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#222222;font-size:12px;text-align:left;border-width:1px 0px;border-color:#dcedcd;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#c2e0a9;color:#222222;border-color:#687a54;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#c2e0a9;color:#222222;border-color:#687a54;");
			ws.styles.s.push("#qm[i] div .qmparent,#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#687a54;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");

			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#c2e0a9;");
			

						

		}
		else
		{

						

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] a|padding:4px 40px 4px 10px;background-color:#E6E6E6;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#B4B4B4;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px -1px;background-color:#E6E6E6;border-width:1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 5px;color:#222222;font-size:11px;text-align:left;border-width:1px 0px 1px 0px;border-color:#E6E6E6;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#B4B4B4;color:#222222;border-color:#676767;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#B4B4B4;color:#222222;border-color:#676767;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#676767;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#B4B4B4;");

			ws.addons.s += 'a.tabscss_border_color = "#676767";';
		}



	}
	else if (type==11)
	{


		//***  template 12 (Jagged Edges) *****

		ws.structure = 2;
		ws.addons.use = ",ibcss";

		
		
		ws.addons.s = 'a.ibcss_apply_to = "parent";			\
		a.ibcss_main_type = "arrow-head";				\
		a.ibcss_main_direction = "right";				\
		a.ibcss_main_size = 5;						\
		a.ibcss_main_bg_color = "#B5B897";				\
		a.ibcss_main_bg_color_active = "#E5E7DB";			\
		a.ibcss_main_border_color = "#3e3f2b";				\
		a.ibcss_main_border_color_active = "#000000";			\
		a.ibcss_main_position_x = -16;					\
		a.ibcss_main_position_y = -2;					\
		a.ibcss_main_align_x = "right";					\
		a.ibcss_main_align_y = "middle";				\
		a.ibcss_sub_type = "arrow-head";				\
		a.ibcss_sub_direction = "right";				\
		a.ibcss_sub_size = 5;						\
		a.ibcss_sub_bg_color = "#B5B897";				\
		a.ibcss_sub_bg_color_active = "#E5E7DB";			\
		a.ibcss_sub_border_color = "#3e3f2b";				\
		a.ibcss_sub_border_color_active = "#000000";			\
		a.ibcss_sub_position_x = -16;					\
		a.ibcss_sub_align_x = "right";					\
		a.ibcss_sub_align_y = "middle";					'

		
		
		//ws.addons.s+=qmvi_template_modify_addon_setting(mod_names);

		ws.styles.s = new Array();
		ws.create = "true,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
			
			ws.styles.s.push("#qm[i]|width:175px;padding:10px;background-color:#E6E3DC;border-width:10px 1px 1px 1px;border-style:solid;border-color:#841010;");
			ws.styles.s.push("#qm[i] a|padding:3px 40px 3px 8px;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:dashed;border-color:#E6E3DC;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#841010;color:#E6E3DC;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:0px 0px 0px -1px;background-color:#E6E3DC;border-width:1px;border-style:solid;border-color:#841010;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:1px 40px 2px 5px;font-size:11px;border-width:1px 0px 1px 0px;border-style:dashed;border-color:#E6E3DC;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#841010;color:#E6E3DC;");
			

			ws.addons.s += 'a.ibcss_main_bg_color = "#D3D3D3";		\
			a.ibcss_main_bg_color_active = "#D3D3D3";			\
			a.ibcss_main_border_color = "#333333";				\
			a.ibcss_main_border_color_active = "#000000";			\
			a.ibcss_sub_bg_color = "#D3D3D3";				\
			a.ibcss_sub_bg_color_active = "#D3D3D3";			\
			a.ibcss_sub_border_color = "#333333";				\
			a.ibcss_sub_border_color_active = "#000000";			'
			
			

		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i]|width:175px;padding:10px;background-color:#E5E7FE;border-width:10px 1px 1px 1px;border-style:solid;border-color:#081AAF;");
			ws.styles.s.push("#qm[i] a|padding:3px 40px 3px 8px;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:dashed;border-color:#E5E7FE;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#081AAF;color:#E5E7FE;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:0px 0px 0px -1px;background-color:#E5E7FE;border-width:1px;border-style:solid;border-color:#081AAF;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:1px 40px 2px 5px;font-size:11px;border-width:1px 0px 1px 0px;border-style:dashed;border-color:#E5E7FE;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");

			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#081AAF;color:#E5E7FE;");
			
			ws.addons.s += 'a.ibcss_main_bg_color = "#D3D3D3";		\
			a.ibcss_main_bg_color_active = "#D3D3D3";			\
			a.ibcss_main_border_color = "#333333";				\
			a.ibcss_main_border_color_active = "#000000";			\
			a.ibcss_sub_bg_color = "#D3D3D3";				\
			a.ibcss_sub_bg_color_active = "#D3D3D3";			\
			a.ibcss_sub_border_color = "#333333";				\
			a.ibcss_sub_border_color_active = "#000000";			'
			

								

		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i]|width:175px;padding:10px;background-color:#D2DDD4;border-width:10px 1px 1px 1px;border-style:solid;border-color:#394B3C;");
			ws.styles.s.push("#qm[i] a|padding:3px 40px 3px 8px;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:dashed;border-color:#D2DDD4;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#394B3C;color:#D2DDD4;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:0px 0px 0px -1px;background-color:#D2DDD4;border-width:1px;border-style:solid;border-color:#394B3C;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:1px 40px 2px 5px;font-size:11px;border-width:1px 0px 1px 0px;border-style:dashed;border-color:#D2DDD4;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#394B3C;color:#D2DDD4;");
			
			
			ws.addons.s += 'a.ibcss_main_bg_color = "#D3D3D3";		\
			a.ibcss_main_bg_color_active = "#D3D3D3";			\
			a.ibcss_main_border_color = "#333333";				\
			a.ibcss_main_border_color_active = "#000000";			\
			a.ibcss_sub_bg_color = "#D3D3D3";				\
			a.ibcss_sub_bg_color_active = "#D3D3D3";			\
			a.ibcss_sub_border_color = "#333333";				\
			a.ibcss_sub_border_color_active = "#000000";			'			


			

		}
		else
		{

			

			ws.styles.s.push("#qm[i]|width:auto;padding:10px;background-color:#EFEFEF;border-width:10px 1px 1px 1px;border-style:solid;border-color:#4D4D4D;");
			ws.styles.s.push("#qm[i] a|padding:3px 40px 3px 8px;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:dashed;border-color:#EFEFEF;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#4D4D4D;color:#EFEFEF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:0px 0px 0px -1px;background-color:#EFEFEF;border-width:1px;border-style:solid;border-color:#4D4D4D;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:1px 40px 2px 5px;font-size:11px;border-width:1px 0px 1px 0px;border-style:dashed;border-color:#EFEFEF;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");

			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-color:#4D4D4D;color:#EFEFEF;");



			ws.addons.s += 'a.ibcss_main_bg_color = "#D3D3D3";		\
			a.ibcss_main_bg_color_active = "#D3D3D3";			\
			a.ibcss_main_border_color = "#333333";				\
			a.ibcss_main_border_color_active = "#000000";			\
			a.ibcss_sub_bg_color = "#D3D3D3";				\
			a.ibcss_sub_bg_color_active = "#D3D3D3";			\
			a.ibcss_sub_border_color = "#333333";				\
			a.ibcss_sub_border_color_active = "#000000";			'

					
		}


		if (!ws.isvert)
		{
			ws.styles.s.push("#qm[i]|padding:5px 10px;");
			ws.styles.s.push("#qm[i] div,#qm[i] ul|margin:-1px 0px 0px 0px;");

			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
		}	
		else
		{

			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:95% 55%;");

		}

	

	}
	else if (type==12)
	{


		//***  template 12 (Image Based) *****

		ws.structure = 6;
		ws.addons.use = ",image";

		
		
		ws.addons.s = '';

			
		

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
			
		

			ws.styles.s.push("#qm[i] a|padding:0px 3px 0px 0px;background-color:#C83732;color:#FFFFFF;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-1px 0px 0px 0px;background-color:transparent;background-image:url("+qmv.base+"qmimages/gradient_24.gif);background-repeat:repeat-y;background-position:left center;border-width:1px;border-style:solid;border-color:#C83732;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 2px;margin:0px;background-color:transparent;color:#EEEEEE;font-family:Arial;font-size:11px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div a:hover|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;background-position:97% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/arrow_0.gif);color:#C83732;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 0px 5px 0px;color:#EEEEEE;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px 4px 0px;border-color:#999999;");

			ws.styles.s.push("ul#qm[i] a img|border-style:none;display:block;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/arrow_0.gif);color:#C83732;text-decoration:underline;");

			
		}
		else if (v=="blues")
		{
		
			


			ws.styles.s.push("#qm[i] a|padding:0px 3px 0px 0px;background-color:#39ABC8;color:#FFFFFF;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-1px 0px 0px 0px;background-color:transparent;background-image:url("+qmv.base+"qmimages/gradient_26.gif);background-repeat:repeat-y;background-position:left center;border-width:1px;border-style:solid;border-color:#39ABC8;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 2px;margin:0px;background-color:transparent;color:#EEEEEE;font-family:Arial;font-size:11px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div a:hover|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;background-position:97% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/arrow_0.gif);color:#236C7F;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 0px 5px 0px;color:#EEEEEE;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px 4px 0px;border-color:#999999;");
			ws.styles.s.push("ul#qm[i] a img|border-style:none;display:block;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-color:#FFFFFF;color:#236C7F;background-image:url("+qmv.base+"qmimages/arrow_0.gif);text-decoration:underline;");


			
		}
		else if (v=="greens")
		{

			ws.styles.s.push("#qm[i] a|padding:0px 3px 0px 0px;background-color:#47B352;color:#FFFFFF;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px;margin:-1px 0px 0px 0px;background-color:transparent;background-image:url("+qmv.base+"qmimages/gradient_25.gif);background-repeat:repeat-y;background-position:left center;border-width:1px;border-style:solid;border-color:#47B352;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 2px;margin:0px;background-color:transparent;color:#EEEEEE;font-family:Arial;font-size:11px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div a:hover|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#FFFFFF;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;background-position:97% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/arrow_0.gif);color:#2D7234;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 0px 5px 0px;color:#EEEEEE;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px 4px 0px;border-color:#999999;");
		
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/arrow_0.gif);color:#2D7234;text-decoration:underline;");
			ws.styles.s.push("ul#qm[i] a img|border-style:none;display:block;");

		}
		else
		{

			

			ws.styles.s.push("#qm[i] a|padding:0px 3px 0px 0px;background-color:#222222;color:#ffffff;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|background-color:transparent;background-image:url("+qmv.base+"qmimages/gradient_11.gif);background-repeat:repeat-y;background-position:left center;border-width:1px;border-style:solid;border-color:#222222;padding:10px;margin:-1px 0px 0px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:3px 20px 3px 2px;margin:0px;background-color:transparent;color:#eeeeee;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] div a:hover|color:#ffffff;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|color:#ffffff;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div .qmparent,#qm[i] ul .qmparent|background-repeat:no-repeat;background-position:97%;background-image:url("+qmv.base+"qmimages/arrow_1.gif);");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|text-decoration:underline;background-color:#ffffff;color:#000000;background-image:url("+qmv.base+"qmimages/arrow_0.gif);");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 0px 5px 0px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 0px 4px 0px;border-color:#999999;");


			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);text-decoration:underline;background-color:#ffffff;color:#000000;");
			ws.styles.s.push("ul#qm[i] a img|border-style:none;display:block;");


		}


		if (ws.isvert)
			ws.styles.s.push("#qm[i] a|padding:0px 0px 3px 0px;");		
	


	}	
	else if (type==13)
	{


		//***  template 14 (Image Based) *****

		ws.structure = 1;
		ws.addons.use = "";

		
		
		ws.addons.s = '';

			

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,true,true,true,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
			
			ws.styles.s.push("#qm[i] a|padding:2px 40px 5px 10px;color:#E6E7E7;font-family:Arial;font-size:12px;text-decoration:none;font-weight:normal;border-width:0px 1px 1px 0px;border-style:dashed;border-color:#9B9B9B;");
			ws.styles.s.push("#qm[i] a:hover|color:#FA3030;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#FA3030;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#FA3030;border-color:#FA3030;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:2px 5px 0px 5px;margin:0px 0px 0px -1px;background-color:#6A4040;border-width:0px 1px 1px 1px;border-style:dashed;border-color:#FA3030;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:6px 15px 6px 5px;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-style:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul ul|border-width:1px;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px 0px 0px -1px;");

			ws.bgcolor = "#6A4040";
			ws.addons.s += 'a.shadow_color = "#4F2F2F";';

			
		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i] a|padding:2px 40px 5px 10px;color:#E6E7E7;font-family:Arial;font-size:12px;text-decoration:none;font-weight:normal;border-width:0px 1px 1px 0px;border-style:dashed;border-color:#D4DEE9;");
			ws.styles.s.push("#qm[i] a:hover|color:#93FAEC;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#93FAEC;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#93FAEC;border-color:#D4DEE9;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:2px 5px 0px 5px;margin:0px 0px 0px -1px;background-color:#2F455A;border-width:0px 1px 1px 1px;border-style:dashed;border-color:#D4DEE9;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:6px 15px 6px 5px;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-style:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul ul|border-width:1px;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px 0px 0px -1px;");

			
			ws.bgcolor = "#2F455A";
			ws.addons.s += 'a.shadow_color = "#233343";';
			
		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i] a|padding:2px 40px 5px 10px;color:#E6E7E7;font-family:Arial;font-size:12px;text-decoration:none;font-weight:normal;border-width:0px 1px 1px 0px;border-style:dashed;border-color:#9B9B9B;");
			ws.styles.s.push("#qm[i] a:hover|color:#75E371;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#75E371;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#75E371;border-color:#75E371;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:2px 5px 0px 5px;margin:0px 0px 0px -1px;background-color:#3F633F;border-width:0px 1px 1px 1px;border-style:dashed;border-color:#75E371;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:6px 15px 6px 5px;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-style:none;");

			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul ul|border-width:1px;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px 0px 0px -1px;");


			ws.bgcolor = "#3F633F";
			ws.addons.s += 'a.shadow_color = "#2F4A2F";';
			
		}
		else
		{

			

			
			

			ws.styles.s.push("#qm[i] a|padding:2px 40px 5px 10px;color:#E6E7E7;font-family:Arial;font-size:12px;text-decoration:none;font-weight:normal;border-width:0px 1px 1px 0px;border-style:dashed;border-color:#9B9B9B;");
			ws.styles.s.push("#qm[i] a:hover|color:#F7D57B;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#F7D57B;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|color:#F7D57B;border-color:#F7D57B;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:2px 5px 0px 5px;margin:0px 0px 0px -1px;background-color:#313131;border-width:0px 1px 1px 1px;border-style:dashed;border-color:#F7D57B;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:6px 15px 6px 5px;font-size:11px;border-style:none;border-width:0px;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-style:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px 0px 0px -1px;");
			ws.styles.s.push("ul#qm[i] ul ul|border-width:1px;");

			ws.bgcolor = "#313131";
			ws.addons.s += 'a.shadow_color = "#262626";';
		}



	}
	else if (type==14)
	{


		//***  template 15 (Half Round Subs) *****

		ws.structure = 1;
		ws.addons.use = "round_corners,ibcss";

		
		
		ws.addons.s = 'a.ibcss_apply_to = "parent";			\
		a.ibcss_main_type = "arrow";					\
		a.ibcss_main_direction = "down";				\
		a.ibcss_main_size = 5;						\
		a.ibcss_main_bg_color = "#83C7F8";				\
		a.ibcss_main_border_color = "#5E6C78";				\
		a.ibcss_main_position_x = -26;					\
		a.ibcss_main_position_y = -4;					\
		a.ibcss_main_align_x = "right";					\
		a.ibcss_main_align_y = "middle";				\
		a.ibcss_sub_type = "arrow";					\
		a.ibcss_sub_direction = "right";				\
		a.ibcss_sub_size = 5;						\
		a.ibcss_sub_bg_color = "#83C7F8";				\
		a.ibcss_sub_border_color = "#333333";				\
		a.ibcss_sub_position_x = -16;					\
		a.ibcss_sub_align_x = "right";					\
		a.ibcss_sub_align_y = "middle";					\
		a.rcorner_size = 6;						\
		a.rcorner_border_color = "#28478D";				\
		a.rcorner_bg_color = "#4b73cc";					\
		a.rcorner_apply_corners = new Array(false,false,true,true);	'


			

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:#F0EAEA;border-width:4px 0px 4px 0px;border-style:solid;border-color:#861919;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;color:#000000;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:3px 0px 0px 0px;background-color:transparent;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#F0EAEA;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#F0EAEA;color:#333333;text-decoration:none;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#410C0C;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#861919;");


			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:92% 55%;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#C42525;border-width:1px;border-style:solid;border-color:#861919;");
			ws.styles.s.push("ul#qm[i] ul ul|margin:0px;");
			ws.styles.s.push("div#qm[i] div div|margin:0px;");


			if (ws.isvert)
			{
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.styles.s.push("#qm[i]|padding:10px 0px;");
			}

			ws.addons.s += 'a.ibcss_main_bg_color = "#FD4F4F";';
			ws.addons.s += 'a.ibcss_main_border_color = "#6D1414";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#FD4F4F";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#333333";';
			ws.addons.s += 'a.rcorner_border_color = "#861919";';
			ws.addons.s += 'a.rcorner_bg_color = "#C42525";';

			
		}
		else if (v=="blues")
		{
		
			ws.styles.s.push("#qm[i]|background-color:#e4e4e4;border-width:4px 0px;border-style:solid;border-color:#28478d;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;color:#000000;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:3px 0px 0px;background-color:transparent;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#e4e4e4;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#e4e4e4;color:#333333;text-decoration:none;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#111111;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#28478d;");
			
			ws.styles.s.push("div#qm[i] div div,ul#qm[i] ul ul|margin:0px;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#4b73cc;border-color:#28478D;border-style:solid;border-width:1px;margin:0px;");		
			ws.styles.s.push("ul#qm[i] .qmparent|background-position:92% 55%;background-repeat:no-repeat;background-image:url("+qmv.base+"qmimages/arrow_6.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			

			if (ws.isvert)
			{
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_4.gif);");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.styles.s.push("#qm[i]|padding:10px 0px;");
			}


			
			
		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i]|width:auto;background-color:#E0FBDF;border-width:4px 0px 4px 0px;border-style:solid;border-color:#116E0D;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;color:#000000;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:3px 0px 0px 0px;background-color:transparent;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#FFFFFF;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#E0FBDF;color:#333333;text-decoration:none;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#0B4208;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#116E0D;");
			

			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:92% 55%;");
			if (ws.isvert)
			{
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
				ws.styles.s.push("#qm[i]|padding:10px 0px;");
			}

			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#1AA714;border-width:1px;border-style:solid;border-color:#116E0D;");
			ws.styles.s.push("ul#qm[i] ul ul|margin:0px;");
			ws.styles.s.push("div#qm[i] div div|margin:0px;");


			ws.addons.s += 'a.ibcss_main_bg_color = "#8EF18A";';
			ws.addons.s += 'a.ibcss_main_border_color = "#116e0d";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#8EF18A";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#333333";';
			ws.addons.s += 'a.rcorner_border_color = "#116E0D";';
			ws.addons.s += 'a.rcorner_bg_color = "#1AA714";';
			
		}
		else
		{


			
			ws.styles.s.push("#qm[i]|background-color:#E4E4E4;border-width:4px 0px 4px 0px;border-style:solid;border-color:#494949;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 8px;color:#000000;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:3px 0px 0px 0px;background-color:transparent;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#E4E4E4;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#E4E4E4;color:#333333;text-decoration:none;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#111111;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#A9A9A9;");


			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:92% 55%;");

			if (!ws.isvert)
				ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);");
			else
			{
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.styles.s.push("#qm[i]|padding:10px 0px;");
			}

			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");

			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#757575;border-width:1px;border-style:solid;border-color:#333333;");
			ws.styles.s.push("ul#qm[i] ul ul|margin:0px;");
			ws.styles.s.push("div#qm[i] div div|margin:0px;");

			ws.addons.s += 'a.ibcss_main_bg_color = "#F7D56A";';
			ws.addons.s += 'a.ibcss_main_border_color = "#5E6C78";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#F7D56A";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#333333";';
			ws.addons.s += 'a.rcorner_border_color = "#494949";';
			ws.addons.s += 'a.rcorner_bg_color = "#757575";';
			
		}



	}	
	else if (type==15)
	{


		//***  template 15 (Center Arrow) *****

		ws.structure = 1;
		ws.addons.use = "round_corners,ibcss";

				
		ws.addons.s = 'a.ibcss_apply_to = "parent";		\
		a.ibcss_main_type = "arrow";				\
		a.ibcss_main_direction = "down";			\
		a.ibcss_main_size = 6;					\
		a.ibcss_main_bg_color = "#6F7DA6";			\
		a.ibcss_main_bg_color_hover = "#5A5372";		\
		a.ibcss_main_border_color = "#D5D9E5";			\
		a.ibcss_main_border_color_hover = "#5A5372";		\
		a.ibcss_main_position_x = -14;				\
		a.ibcss_main_position_y = -8;				\
		a.ibcss_main_align_x = "center";			\
		a.ibcss_main_align_y = "top";				\
		a.ibcss_sub_type = "arrow-head";			\
		a.ibcss_sub_direction = "right";			\
		a.ibcss_sub_size = 6;					\
		a.ibcss_sub_bg_color = "#d5d9e5";			\
		a.ibcss_sub_bg_color_active = "#5a5372";		\
		a.ibcss_sub_border_color = "#5a5372";			\
		a.ibcss_sub_border_color_active = "#d5d9e5";		\
		a.ibcss_sub_position_x = -16;				\
		a.ibcss_sub_position_y = 1;				\
		a.ibcss_sub_align_x = "right";				\
		a.ibcss_sub_align_y = "middle";				\
		a.rcorner_size = 6;					\
		a.rcorner_border_color = "#5A5372";			\
		a.rcorner_bg_color = "#6F7DA6";				\
		a.rcorner_apply_corners = new Array(false,true,true,true);	'

	

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|background-color:#F2E6E7;background-image:url("+qmv.base+"qmimages/gradient_30.gif);border-width:2px 0px 2px 0px;border-style:solid;border-color:#6F3B40;");
			ws.styles.s.push("#qm[i] a|padding:8px 20px 5px 20px;color:#4F2A2D;font-family:Arial;font-size:12px;text-decoration:none;font-variant:normal;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:1px 0px 0px 0px;background-color:transparent;background-image:none;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#F2E6E7;font-size:11px;font-variant:normal;border-width:1px;border-style:solid;border-color:#A3575E;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#F2E6E7;color:#333333;text-decoration:none;border-color:#6F3B40;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#4F2A2D;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#6F3B40;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-color:#F2E6E7;color:#333333;text-decoration:none;border-color:#6F3B40;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#A3575E;border-width:1px;border-style:solid;border-color:#6F3B40;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 40px 2px 5px;");
			ws.styles.s.push("ul#qm[i] a|padding:5px 20px 5px 20px;");
			ws.styles.s.push("ul#qm[i] ul ul|margin:0px 0px 0px -1px;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -1px;");

			ws.addons.s += 'a.ibcss_main_bg_color = "#A3575E";';
			ws.addons.s += 'a.ibcss_main_bg_color_hover = "#6F3B40";';
			ws.addons.s += 'a.ibcss_main_border_color = "#F2E6E7";';
			ws.addons.s += 'a.ibcss_main_border_color_hover = "#6F3B40";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#F2E6E7";';
			ws.addons.s += 'a.ibcss_sub_bg_color_active = "#6F3B40";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#6F3B40";';
			ws.addons.s += 'a.ibcss_sub_border_color_active = "#F2E6E7";';
			ws.addons.s += 'a.rcorner_border_color = "#6F3B40";';
			ws.addons.s += 'a.rcorner_bg_color = "#A3575E";';

			
		}
		else if (v=="blues")
		{
		
			ws.styles.s.push("#qm[i]|background-color:#d5d9e5;background-image:url(qmimages/gradient_27.gif);border-width:2px 0px;border-style:solid;border-color:#5a5372;");
			ws.styles.s.push("#qm[i] a|font-variant:normal;padding:8px 20px 5px;color:#383447;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:1px 0px 0px;background-color:transparent;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|font-variant:normal;padding:2px 40px 2px 5px;background-color:transparent;color:#d5d9e5;border-width:1px;border-style:solid;border-color:#6f7da6;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#d5d9e5;color:#333333;text-decoration:none;border-color:#5a5372;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#5A5372;");
			
			
			ws.styles.s.push("div#qm[i] div div, ul#qm[i] ul ul|margin:0px 0px 0px -1px;");

			ws.styles.s.push("ul#qm[i] a|padding:5px 20px;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 40px 2px 5px;");
			ws.styles.s.push("ul#qm[i] ul|border-color:#5A5372;border-style:solid;border-width:1px;background-color:#6F7DA6;margin:0px;");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-color:#d5d9e5;color:#333333;text-decoration:none;border-color:#5a5372;");
			
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");



			
			
		}
		else if (v=="greens")
		{
			
			
			

			ws.styles.s.push("#qm[i]|background-color:#E6E6D7;background-image:url("+qmv.base+"qmimages/gradient_29.gif);border-width:2px 0px 2px 0px;border-style:solid;border-color:#5B5C3A;");
			ws.styles.s.push("#qm[i] a|padding:8px 20px 5px 20px;color:#383447;font-family:Arial;font-size:12px;text-decoration:none;font-variant:normal;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:1px 0px 0px 0px;background-color:transparent;background-image:none;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#E6E6D7;font-size:11px;font-variant:normal;border-width:1px;border-style:solid;border-color:#96975F;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#E6E6D7;color:#333333;text-decoration:none;border-color:#5B5C3A;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#5B5C3A;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-color:#E6E6D7;color:#333333;text-decoration:none;border-color:#5B5C3A;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#96975F;border-width:1px;border-style:solid;border-color:#5B5C3A;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 40px 2px 5px;");
			ws.styles.s.push("ul#qm[i] a|padding:5px 20px 5px 20px;");
			ws.styles.s.push("ul#qm[i] ul ul|margin:0px 0px 0px -1px;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -1px;");


			ws.addons.s += 'a.ibcss_main_bg_color = "#96975F";';
			ws.addons.s += 'a.ibcss_main_bg_color_hover = "#5B5C3A";';
			ws.addons.s += 'a.ibcss_main_border_color = "#E6E6D7";';
			ws.addons.s += 'a.ibcss_main_border_color_hover = "#5B5C3A";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#E6E6D7";';
			ws.addons.s += 'a.ibcss_sub_bg_color_active = "#5B5C3A";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#5B5C3A";';
			ws.addons.s += 'a.ibcss_sub_border_color_active = "#E6E6D7";';
			ws.addons.s += 'a.rcorner_border_color = "#5B5C3A";';
			ws.addons.s += 'a.rcorner_bg_color = "#96975F";';	
			
		}
		else
		{

			
			

			ws.styles.s.push("#qm[i]|background-color:#FFFFFF;background-image:url("+qmv.base+"qmimages/gradient_28.gif);border-width:2px 0px 2px 0px;border-style:solid;border-color:#525252;");
			ws.styles.s.push("#qm[i] a|padding:8px 20px 5px 20px;color:#262626;font-family:Arial;font-size:12px;text-decoration:none;font-variant:normal;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:1px 0px 0px 0px;background-color:transparent;border-width:0px;border-style:none;border-color:transparent;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;background-color:transparent;color:#FFFFFF;font-size:11px;font-variant:normal;border-width:1px;border-style:solid;border-color:#8D8D8D;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#FFFFFF;color:#333333;text-decoration:none;border-color:#525252;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 4px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px 4px 5px 4px;border-color:#525252;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_10.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-color:#FFFFFF;color:#333333;text-decoration:none;border-color:#525252;");
			ws.styles.s.push("ul#qm[i] ul|margin:0px;background-color:#8D8D8D;border-width:1px;border-style:solid;border-color:#525252;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 40px 2px 5px;");
			ws.styles.s.push("ul#qm[i] a|padding:5px 20px 5px 20px;");
			ws.styles.s.push("ul#qm[i] ul ul|margin:0px 0px 0px -1px;");
			ws.styles.s.push("div#qm[i] div div|margin:0px 0px 0px -1px;");


			ws.addons.s += 'a.ibcss_main_bg_color = "#8D8D8D";';
			ws.addons.s += 'a.ibcss_main_bg_color_hover = "#525252";';
			ws.addons.s += 'a.ibcss_main_border_color = "#eeeeee";';
			ws.addons.s += 'a.ibcss_main_border_color_hover = "#525252";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#FFFFFF";';
			ws.addons.s += 'a.ibcss_sub_bg_color_active = "#525252";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#525252";';
			ws.addons.s += 'a.ibcss_sub_border_color_active = "#FFFFFF";';
			ws.addons.s += 'a.rcorner_border_color = "#525252";';
			ws.addons.s += 'a.rcorner_bg_color = "#8D8D8D";';
		

		}

	}	
	else if (type==16)
	{


		//***  template 15 (Gradient Buttons) *****

		ws.structure = 1;
		ws.addons.use = "match_widths,ibcss";

				
		ws.addons.s = 'a.ibcss_apply_to = "parent";		\
		a.ibcss_main_type = "arrow";				\
		a.ibcss_main_direction = "down";			\
		a.ibcss_main_size = 5;					\
		a.ibcss_main_bg_color = "#f0e6c1";			\
		a.ibcss_main_border_color = "#555555";			\
		a.ibcss_main_position_x = -19;				\
		a.ibcss_main_position_y = -6;				\
		a.ibcss_main_align_x = "right";				\
		a.ibcss_main_align_y = "middle";			\
		a.ibcss_sub_type = "arrow-gap-v";			\
		a.ibcss_sub_direction = "right";			\
		a.ibcss_sub_size = 4;					\
		a.ibcss_sub_bg_color = "#f2be76";			\
		a.ibcss_sub_border_color = "#555555";			\
		a.ibcss_sub_position_x = -16;				\
		a.ibcss_sub_align_x = "right";				\
		a.ibcss_sub_align_y = "middle";				\
		a.mwidths_active = true;				'

	

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);

		

		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 80px 5px 8px;margin:0px 5px 0px 0px;background-color:#C69CBA;background-image:url("+qmv.base+"qmimages/gradient_35.gif);color:#484849;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#F0E5ED;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#F0E5ED;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#F0E5ED;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#F0E5ED;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px;background-color:transparent;background-image:none;font-size:11px;border-width:0px;border-style:none;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a:hover|background-image:none;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-image:none;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul|width:90%;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			

			if (ws.isvert)
			{

				ws.styles.s.push("#qm[i] a|margin:0px 0px 5px 0px;");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.addons.s += 'a.ibcss_main_position_y = -4;';
			
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:95% 55%;");

			}
			else
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");


			ws.addons.s += 'a.ibcss_main_bg_color = "#F0E5ED";';
			ws.addons.s += 'a.ibcss_main_border_color = "#484849";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#C69CBA";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#484849";';
			
		}
		else if (v=="orange")
		{
		
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 80px 5px 8px;margin:0px 5px 0px 0px;background-color:#f2be76;background-image:url("+qmv.base+"qmimages/gradient_31.gif);color:#513666;font-family:Arial;font-size:11px;text-decoration:none;border-width:1px;border-style:solid;border-color:#a6a6a6;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#f0e6c1;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#f0e6c1;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#f0e6c1;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px;background-color:#f0e6c1;border-width:1px;border-style:solid;border-color:#a6a6a6;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px;background-color:transparent;background-image:none;border-width:0px;border-style:none;border-color:#513666;");
			ws.styles.s.push("#qm[i] div a:hover|background-image:none;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-image:none;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:none;");


			if (ws.isvert)
			{

				ws.styles.s.push("#qm[i] a|margin:0px 0px 5px 0px;");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.addons.s += 'a.ibcss_main_position_y = -4;';
			
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:95% 55%;");

			}
			else
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");

			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
		

			ws.styles.s.push("ul#qm[i] ul|width:90%;");

			
			
		}
		else if (v=="blues")
		{
		
			
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 80px 5px 8px;margin:0px 5px 0px 0px;background-color:#9AADBA;background-image:url("+qmv.base+"qmimages/gradient_33.gif);color:#484849;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#DDE3E8;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#DDE3E8;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#DDE3E8;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#DDE3E8;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px;background-color:transparent;background-image:none;font-size:11px;border-width:0px;border-style:none;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a:hover|background-image:none;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-image:none;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul|width:90%;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");

			
			if (ws.isvert)
			{

				ws.styles.s.push("#qm[i] a|margin:0px 0px 5px 0px;");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.addons.s += 'a.ibcss_main_position_y = -4;';
			
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:95% 55%;");

			}
			else
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");



			ws.addons.s += 'a.ibcss_main_bg_color = "#DDE3E8";';
			ws.addons.s += 'a.ibcss_main_border_color = "#484849";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#9AADBA";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#484849";';


			
		}
		else if (v=="greens")
		{
			
			
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 80px 5px 8px;margin:0px 5px 0px 0px;background-color:#CEDF8E;background-image:url("+qmv.base+"qmimages/gradient_34.gif);color:#484849;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#F1F6DC;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#F1F6DC;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#F1F6DC;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#F1F6DC;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px;background-color:transparent;background-image:none;font-size:11px;border-width:0px;border-style:none;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a:hover|background-image:none;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-image:none;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul|width:90%;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");

			if (ws.isvert)
			{

				ws.styles.s.push("#qm[i] a|margin:0px 0px 5px 0px;");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.addons.s += 'a.ibcss_main_position_y = -4;';
			
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:95% 55%;");

			}
			else
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");


			ws.addons.s += 'a.ibcss_main_bg_color = "#F1F6DC";';
			ws.addons.s += 'a.ibcss_main_border_color = "#484849";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#BDD459";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#484849";';
			
			
		}
		else
		{

						
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 80px 5px 8px;margin:0px 5px 0px 0px;background-color:#B5B5B5;background-image:url("+qmv.base+"qmimages/gradient_32.gif);color:#484849;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] a:hover|background-color:#E4E4E4;");
			ws.styles.s.push("#qm[i] li:hover>a|background-color:#E4E4E4;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#E4E4E4;text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px;margin:-1px 0px 0px 0px;background-color:#E4E4E4;border-width:1px;border-style:solid;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px;background-color:transparent;background-image:none;font-size:11px;border-width:0px;border-style:none;border-color:#484849;");
			ws.styles.s.push("#qm[i] div a:hover|background-image:none;text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-image:none;text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-image:none;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] ul|width:90%;");


			if (ws.isvert)
			{

				ws.styles.s.push("#qm[i] a|margin:0px 0px 5px 0px;");
				ws.styles.s.push("#qm[i] div, #qm[i] ul|margin:0px 0px 0px -1px;");
				ws.addons.s += 'a.ibcss_main_position_y = -4;';
			
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);background-repeat:no-repeat;background-position:95% 55%;");

			}
			else
				ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");




			ws.addons.s += 'a.ibcss_main_bg_color = "#E4E4E4";';
			ws.addons.s += 'a.ibcss_main_border_color = "#484849";';
			ws.addons.s += 'a.ibcss_sub_bg_color = "#B5B5B5";';
			ws.addons.s += 'a.ibcss_sub_border_color = "#484849";';
			

		}
		



	}	
	else if (type==17)
	{


		//***  template 15 (Gradient Buttons) *****

		ws.structure = 7;
		ws.addons.use = "round_corners,item_bullets";

				
		ws.addons.s = 'a.rcorner_size = 3;						\
		a.rcorner_border_color = "#628dc0";						\
		a.rcorner_bg_color = "#d6e1ef";							\
		a.rcorner_angle_corners = true;							\
		a.rcorner_apply_corners = new Array(false,true,true,true);			\
		a.rcorner_top_line_auto_inset = true;						\
		a.ibullets_apply_to = "parent";							\
		a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_21.gif";			\
		a.ibullets_main_image_width = 9;						\
		a.ibullets_main_image_height = 6;						\
		a.ibullets_main_position_x = -23;						\
		a.ibullets_main_position_y = -5;						\
		a.ibullets_main_align_x = "right";						\
		a.ibullets_main_align_y = "middle";						\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_20.gif";			\
		a.ibullets_sub_image_width = 6;							\
		a.ibullets_sub_image_height = 9;						\
		a.ibullets_sub_position_x = -12;						\
		a.ibullets_sub_position_y = -2;							\
		a.ibullets_sub_align_x = "right";						\
		a.ibullets_sub_align_y = "middle";						'


	

		ws.styles.s = new Array();
		ws.create = "false,0,500,false,false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);
		

		if (v=="reds")
		{
			
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 32px 5px 12px;color:#6A1C1C;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#E7E0E3;text-decoration:underline;border-color:#9C2929;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:-2px 0px 0px 0px;background-color:transparent;border-width:1px;border-style:none;border-color:#9C2929;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px 0px 2px 0px;background-color:transparent;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#6A1C1C;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px;border-style:dashed;border-color:#6A1C1C;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:3px;height:16px;margin:5px 8px 0px 8px;border-color:#9C2929;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#E7E0E3;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#E7E0E3;border-width:1px;border-style:solid;border-color:#9C2929;");

			
			ws.addons.s += 'a.rcorner_border_color = "#9C2929";';
			ws.addons.s += 'a.rcorner_bg_color = "#E7E0E3";';
			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_7.gif";';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_5.gif";';
			
		}
		else if (v=="blues")
		{
		
			
			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 32px 5px 12px;color:#264060;font-family:Arial;font-size:11px;text-decoration:none;border-width:1px;border-style:solid;border-color:#ffffff;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#d6e1ef;text-decoration:underline;border-color:#628dc0;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:-2px 0px 0px;background-color:transparent;border-width:1px;border-style:none;border-color:#628dc0;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px 0px 2px;background-color:transparent;border-width:0px;border-style:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#264060;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px;border-style:dashed;border-color:#264060;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:3px;height:16px;margin:5px 8px 0px 8px;border-color:#628dc0;");

			ws.styles.s.push("ul#qm[i] ul|background-color:#d6e1ef;border-color:#628dc0;border-width:1px;border-style:solid;");
			ws.styles.s.push("ul#qm[i] li:hover>a|background-color:#d6e1ef;");

			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_21.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_20.gif);");

			


			
		}
		else if (v=="greens")
		{
			
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 32px 5px 12px;color:#30452C;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#D0DFCD;text-decoration:underline;border-color:#66925D;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:-2px 0px 0px 0px;background-color:transparent;border-width:1px;border-style:none;border-color:#66925D;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px 0px 2px 0px;background-color:transparent;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#30452C;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px;border-style:dashed;border-color:#30452C;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:3px;height:16px;margin:5px 8px 0px 8px;border-color:#66925D;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#D0DFCD;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#D0DFCD;border-width:1px;border-style:solid;border-color:#66925D;");

			

			ws.addons.s += 'a.rcorner_border_color = "#66925D";';
			ws.addons.s += 'a.rcorner_bg_color = "#D0DFCD";';
			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_7.gif";';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_5.gif";';
			
		}
		else
		{
			

			ws.styles.s.push("#qm[i]|background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 32px 5px 12px;color:#393A3A;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px;border-style:solid;border-color:#FFFFFF;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#DFE0E0;text-decoration:underline;border-color:#4F5050;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:8px;margin:-2px 0px 0px 0px;background-color:transparent;border-width:1px;border-style:none;border-color:#4F5050;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 40px 2px 5px;margin:0px 0px 2px 0px;background-color:transparent;font-size:11px;border-width:0px;border-style:none;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|color:#393A3A;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:5px;border-style:dashed;border-color:#393A3A;");
			ws.styles.s.push("#qm[i] .qmdividery|border-left-width:3px;height:16px;margin:5px 8px 0px 8px;border-color:#4F5050;");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_5.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_7.gif);background-repeat:no-repeat;background-position:95% 55%;");
		

			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#DFE0E0;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#DFE0E0;border-width:1px;border-style:solid;border-color:#4F5050;");

			ws.addons.s += 'a.rcorner_border_color = "#4F5050";';
			ws.addons.s += 'a.rcorner_bg_color = "#DFE0E0";';
			ws.addons.s += 'a.ibullets_main_image = "'+qmv.base+'qmimages/arrow_7.gif";';
			ws.addons.s += 'a.ibullets_sub_image = "'+qmv.base+'qmimages/arrow_5.gif";';
		}


	}	
	else if (type==18)
	{


		//***  template 15 (Gradient Tree) *****

		ws.structure = 1;
		ws.addons.use = "tree_menu,item_bullets";

				
		ws.addons.s = 'a.ibullets_apply_to = "parent";					\
		a.ibullets_main_image = "'+qmv.base+'qmimages/symbol_0.gif";			\
		a.ibullets_main_image_hover = "'+qmv.base+'qmimages/symbol_1.gif";		\
		a.ibullets_main_image_active = "'+qmv.base+'qmimages/symbol_2.gif";		\
		a.ibullets_main_image_width = 13;						\
		a.ibullets_main_image_height = 13;						\
		a.ibullets_main_position_x = -15;						\
		a.ibullets_main_position_y = -6;						\
		a.ibullets_main_align_x = "right";						\
		a.ibullets_main_align_y = "middle";						\
		a.ibullets_sub_image = "'+qmv.base+'qmimages/symbol_3.gif";			\
		a.ibullets_sub_image_hover = "'+qmv.base+'qmimages/symbol_4.gif";		\
		a.ibullets_sub_image_active = "'+qmv.base+'qmimages/symbol_5.gif";		\
		a.ibullets_sub_image_width = 5;							\
		a.ibullets_sub_image_height = 5;						\
		a.ibullets_sub_position_x = -10;						\
		a.ibullets_sub_position_y = -3;							\
		a.ibullets_sub_align_x = "left";						\
		a.ibullets_sub_align_y = "middle";						\
		a.tree_enabled = true;								\
		a.tree_sub_sub_indent = 15;							\
		a.tree_hide_focus_box = true;							\
		a.tree_auto_collapse = true;							\
		a.tree_expand_animation = 2;							\
		a.tree_expand_step_size = 15;							\
		a.tree_collapse_animation = 3;							\
		a.tree_collapse_step_size = 20;							'

	

		ws.styles.s = new Array();
		ws.create = "true,0,500,'all',false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);
		
		ws.isvert = true;


		if (v=="reds")
		{
			
			
			

			ws.styles.s.push("#qm[i]|width:200px;background-color:transparent;border-width:1px 2px 1px 2px;border-style:solid;border-color:#974D35;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;background-image:url("+qmv.base+"qmimages/gradient_39.gif);color:#000000;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px 0px 1px 0px;border-style:solid;border-color:#974D35;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 0px 10px 0px;background-color:#F6E9E5;border-width:1px;border-style:none;border-color:#CCCCCC;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-color:transparent;background-image:none;font-size:11px;border-width:1px;border-style:solid;border-color:#F6E9E5;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#D9A391;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_5.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/symbol_3.gif);");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_2.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/symbol_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;background-color:#F6E9E5;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#F6E9E5;border-width:1px;border-style:solid;border-color:#974D35;");
			ws.styles.s.push("ul#qm[i] a|background-color:#D59A87;");

			
			
		}
		else if (v=="blues")
		{
		
			

			ws.styles.s.push("#qm[i]|width:200px;background-color:transparent;border-width:1px 2px 1px 2px;border-style:solid;border-color:#4D597F;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;background-image:url("+qmv.base+"qmimages/gradient_38.gif);color:#000000;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px 0px 1px 0px;border-style:solid;border-color:#4D597F;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 0px 10px 0px;background-color:#EBEDF2;border-width:1px;border-style:none;border-color:#CCCCCC;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-color:transparent;background-image:none;font-size:11px;border-width:1px;border-style:solid;border-color:#EBEDF2;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#B0B8CF;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_5.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/symbol_3.gif);");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_2.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/symbol_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;background-color:#EBEDF2;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#EBEDF2;border-width:1px;border-style:solid;border-color:#4D597F;");
			ws.styles.s.push("ul#qm[i] a|background-color:#C5CBDC;");

			
			
		}
		else if (v=="greens")
		{
			
			
			ws.styles.s.push("#qm[i]|width:200px;background-color:transparent;border-width:1px 2px;border-style:solid;border-color:#66cc00;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;background-image:url("+qmv.base+"qmimages/gradient_36.gif);color:#000000;font-family:Arial;font-size:13px;text-decoration:none;border-width:1px 0px;border-style:solid;border-color:#66cc00;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 0px;background-color:#f8fdf5;border-width:1px;border-style:none;border-color:#cccccc;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px;background-color:transparent;background-image:none;border-width:1px;border-style:solid;border-color:#f8fdf5;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#d7f7c6;border-color:#999999;");

			ws.styles.s.push("ul#qm[i] a|background-color:#d3ffa7");
			ws.styles.s.push("ul#qm[i] ul|background-color:#f8fdf5;border-style:solid;border-width:1px;border-color:#66cc00;"); 
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;background-color:#f8fdf5;");

			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/symbol_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_2.gif);");
		

			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/symbol_3.gif);");
			ws.styles.s.push("ul#qm[i] ul li:hover>a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_5.gif);");
		
			
			
		}
		else
		{

			
			

			ws.styles.s.push("#qm[i]|width:200px;background-color:transparent;border-width:1px 2px 1px 2px;border-style:solid;border-color:#666666;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;background-image:url("+qmv.base+"qmimages/gradient_37.gif);color:#000000;font-family:Arial;font-size:12px;text-decoration:none;border-width:1px 0px 1px 0px;border-style:solid;border-color:#666666;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:10px 0px 10px 0px;background-color:#F1F1F1;border-width:1px;border-style:none;border-color:#CCCCCC;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-color:transparent;background-image:none;font-size:11px;border-width:1px;border-style:solid;border-color:#F1F1F1;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|background-color:#BFBFBF;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] ul li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_5.gif);");
			ws.styles.s.push("ul#qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/symbol_3.gif);");
			ws.styles.s.push("ul#qm[i] li:hover > a.qmparent|background-image:url("+qmv.base+"qmimages/symbol_2.gif);");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/symbol_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;background-color:#F1F1F1;");
			ws.styles.s.push("ul#qm[i] ul|background-color:#F1F1F1;border-width:1px;border-style:solid;border-color:#666666;");
			ws.styles.s.push("ul#qm[i] a|background-color:#dddddd;");

		

			
		}	


	}	
	else if (type==19)
	{


		//***  template 15 (Text Tree) *****

		ws.structure = 1;
		ws.addons.use = "tree_menu,ibcss";

				
		ws.addons.s = 'a.ibcss_apply_to = "parent";		\
		a.ibcss_main_type = "arrow-v";				\
		a.ibcss_main_direction = "right";			\
		a.ibcss_main_size = 4;					\
		a.ibcss_main_border_color = "#797979";			\
		a.ibcss_main_border_color_active = "#dd3300";		\
		a.ibcss_main_position_x = -9;				\
		a.ibcss_main_position_y = -3;				\
		a.ibcss_main_align_x = "left";				\
		a.ibcss_main_align_y = "middle";			\
		a.ibcss_sub_type = "arrow-v";				\
		a.ibcss_sub_direction = "right";			\
		a.ibcss_sub_size = 3;					\
		a.ibcss_sub_border_color = "#797979";			\
		a.ibcss_sub_border_color_active = "#dd3300";		\
		a.ibcss_sub_position_x = -8;				\
		a.ibcss_sub_position_y = -1;				\
		a.ibcss_sub_align_x = "left";				\
		a.ibcss_sub_align_y = "middle";				\
		a.tree_enabled = true;					\
		a.tree_sub_sub_indent = 15;				\
		a.tree_hide_focus_box = true;				\
		a.tree_auto_collapse = true;				\
		a.tree_expand_animation = 2;				\
		a.tree_expand_step_size = 15;				\
		a.tree_collapse_animation = 3;				\
		a.tree_collapse_step_size = 20;				'

	

		ws.styles.s = new Array();
		ws.create = "true,0,500,'all',false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);
		
		ws.isvert = true;


		if (v=="reds")
		{
			
			
			

			ws.styles.s.push("#qm[i]|width:150px;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;color:#861F00;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 0px 5px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-image:none;color:#861F00;font-size:11px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;");
			ws.styles.s.push("ul#qm[i] ul|border-width:1px;border-style:solid;border-color:#861F00;");
			ws.styles.s.push("ul#qm[i]|border-width:1px;border-style:solid;border-color:#861F00;");


			ws.bgcolor = "#fad8cd";
			
			
		}
		else if (v=="blues")
		{
		
			
			

			ws.styles.s.push("#qm[i]|width:150px;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;color:#3D4352;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 0px 5px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-image:none;color:#3D4352;font-size:11px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;");
			ws.styles.s.push("ul#qm[i] ul|border-width:1px;border-style:solid;border-color:#3D4352;");
			ws.styles.s.push("ul#qm[i]|border-width:1px;border-style:solid;border-color:#3D4352;");

			
			ws.bgcolor = "#b4b9c7";
			
		}
		else if (v=="greens")
		{
			
			
			

			ws.styles.s.push("#qm[i]|width:150px;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;color:#3D5336;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 0px 5px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-image:none;color:#3D5336;font-size:11px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;");
			ws.styles.s.push("ul#qm[i] ul|border-width:1px;border-style:solid;border-color:#3D5336;");
			ws.styles.s.push("ul#qm[i]|border-width:1px;border-style:solid;border-color:#3D5336;");

			ws.bgcolor = "#edfdca";
			
		}
		else if (v=="black")
		{
			
			
			

			

			ws.styles.s.push("#qm[i]|width:150px;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;color:#CFCFCF;font-family:Arial;font-size:12px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 0px 5px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px 0px 5px;background-image:none;color:#CFCFCF;font-size:11px;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmtitle|font-size:11px;");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_1.gif);background-repeat:no-repeat;background-position:95% 55%;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;");
			ws.styles.s.push("ul#qm[i] ul|border-width:1px;border-style:solid;border-color:#CFCFCF;");
			ws.styles.s.push("ul#qm[i]|border-width:1px;border-style:solid;border-color:#CFCFCF;");


			ws.bgcolor = "#333333";

			ws.addons.s += 'a.ibcss_main_border_color_active = "#F1D376";';
			ws.addons.s += 'a.ibcss_sub_border_color_active = "#F1D376";';
			
		}
		else
		{

			

			ws.styles.s.push("#qm[i]|width:150px;background-color:transparent;");
			ws.styles.s.push("#qm[i] a|padding:5px 5px 5px 8px;color:#3c3c3c;font-family:Arial;font-size:13px;text-decoration:none;");
			ws.styles.s.push("#qm[i] a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|text-decoration:none;font-weight:bold;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:5px 0px;");
			ws.styles.s.push("#qm[i] div a, #qm[i] ul a|padding:2px 0px 2px 15px;margin:0px 5px;background-image:none;color:#3c3c3c;");
			ws.styles.s.push("#qm[i] div a:hover|text-decoration:underline;");
			ws.styles.s.push("#qm[i] ul li:hover>a|text-decoration:underline;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|text-decoration:none;font-weight:bold;");

			
			ws.styles.s.push("ul#qm[i]|border-style:solid;border-width:1px;border-color:#3c3c3c;");
			ws.styles.s.push("ul#qm[i] ul|border-style:solid;border-width:1px;border-color:#3c3c3c;");
			ws.styles.s.push("ul#qm[i] ul a|padding:2px 20px 2px 5px;");
			ws.styles.s.push("ul#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_0.gif);background-repeat:no-repeat;background-position:95% 55%;");

			

			
		}
	}
	else if (type==20)
	{

		//zzzzzzzzzzzzz

		//***  template 19 (Content Tabs) *****

		ws.structure = 8;
		ws.addons.use = "tabscss,sopen,fade";

		ws.addons.s = 'a.tabscss_type = "angled";		\
		a.tabscss_size = 5;					\
		a.tabscss_left_offset = -1;				\
		a.tabscss_apply_far_left = true;			\
		a.tabscss_apply_far_right = true;			\
		a.tabscss_apply_middles = true;				\
		a.tabscss_bg_color = "#ffffff";				\
		a.tabscss_border_color = "#676767";			\
		a.showload_active = true;				\
		a.showload_auto_close = true;				'

	

		ws.styles.s = new Array();
		ws.create = "false,0,0,'all-always-open',false,false,true,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);
		

		if (v=="reds")
		{
						

			

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#B42831;");
			ws.styles.s.push("#qm[i] a|width:100px;padding:4px 40px 4px 10px;background-color:#E6E6E6;color:#222222;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#B42831;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#DED0CE;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#B42831;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#DED0CE;color:#222222;border-color:#B42831;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#DED0CE;color:#222222;border-color:#B42831;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#B42831;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|width:573px;height:260px;color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#B42831;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#B42831;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#DED0CE;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");

			ws.addons.s+='a.tabscss_border_color = "#B42831";';
			
		}
		else if (v=="blues")
		{
		
			
			

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] a|width:100px;padding:4px 40px 4px 10px;background-color:#E0E6EF;color:#222222;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#A2B4D0;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#A2B4D0;color:#222222;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#A2B4D0;color:#222222;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|width:573px;height:260px;color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#0033CC;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#0033CC;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#A2B4D0;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");

			
			ws.addons.s+='a.tabscss_border_color = "#2A3B54";';


			
		}
		else if (v=="greens")
		{
			
			

			

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#345D37;");
			ws.styles.s.push("#qm[i] a|width:100px;padding:4px 40px 4px 10px;background-color:#E6E6E6;color:#222222;font-family:Arial;font-size:11px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#345D37;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#E2FEAE;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#345D37;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#E2FEAE;color:#222222;border-color:#345D37;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#E2FEAE;color:#222222;border-color:#345D37;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#345D37;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|width:573px;height:260px;color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#568937;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#568937;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#E2FEAE;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");

			ws.addons.s+='a.tabscss_border_color = "#345D37";';
			
		}
		else
		{
			

			

			ws.styles.s.push("#qm[i]|margin:0px;background-color:#FFFFFF;border-width:0px 0px 0px 1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] a|width:100px;padding:4px 40px 4px 10px;background-color:#E6E6E6;color:#222222;font-family:Arial;font-size:12px;text-decoration:none;text-align:left;border-width:1px 1px 1px 0px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:88% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#B4B4B4;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#B4B4B4;color:#222222;border-color:#676767;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#B4B4B4;color:#222222;border-color:#676767;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#676767;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|width:573px;height:260px;color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#0033CC;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#0033CC;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div, ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#B4B4B4;");
			ws.styles.s.push("div#qm[i] a:focus|outline:none;");

		}


	}	
	else if (type==21)
	{


		//***  template 15 (Text Tree) *****

		ws.structure = 8;
		ws.addons.use = "tree_menu,sopen";

				
		ws.addons.s = 'a.tree_enabled = true;			\
		a.tree_sub_sub_indent = 15;				\
		a.tree_hide_focus_box = true;				\
		a.tree_auto_collapse = true;				\
		a.tree_expand_animation = 2;				\
		a.tree_expand_step_size = 25;				\
		a.tree_collapse_animation = 0;				\
		a.tree_collapse_step_size = 20;				\
		a.showload_active = true;				\
		a.showload_auto_close = true;				'
	

		ws.styles.s = new Array();
		ws.create = "true,0,500,'all',false,false,false,false";
		ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);
		
		ws.isvert = true;


		if (v=="reds")
		{
						

			

			ws.styles.s.push("#qm[i]|width:540px;margin:0px;background-color:#FFFFFF;border-width:1px;border-style:solid;border-color:#B42831;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 10px;background-color:#E6E6E6;color:#222222;font-family:Arial;font-size:13px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#B42831;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:97% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#DED0CE;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#B42831;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#DED0CE;color:#222222;border-color:#B42831;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#DED0CE;color:#222222;border-color:#B42831;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#B42831;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#B42831;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#B42831;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#DED0CE;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");

			ws.addons.s+='a.tabscss_border_color = "#B42831";';
			
		}
		else if (v=="blues")
		{
		
			
			

			ws.styles.s.push("#qm[i]|width:540px;margin:0px;background-color:#FFFFFF;border-width:1px;border-style:solid;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 10px;background-color:#E0E6EF;color:#222222;font-family:Arial;font-size:13px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;text-decoration:underline;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;text-decoration:underline;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:97% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#A2B4D0;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#A2B4D0;color:#222222;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#A2B4D0;color:#222222;border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#2A3B54;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#0033CC;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#0033CC;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#A2B4D0;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");

			
			ws.addons.s+='a.tabscss_border_color = "#2A3B54";';


			
		}
		else if (v=="greens")
		{
			
			

			

			ws.styles.s.push("#qm[i]|width:540px;margin:0px;background-color:#FFFFFF;border-width:1px;border-style:solid;border-color:#345D37;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 10px;background-color:#E6E6E6;color:#222222;font-family:Arial;font-size:13px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#345D37;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:97% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#E2FEAE;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px 15px;margin:-1px 0px 0px -1px;background-color:#F8F8F8;border-width:1px;border-style:solid;border-color:#345D37;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#E2FEAE;color:#222222;border-color:#345D37;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#E2FEAE;color:#222222;border-color:#345D37;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#345D37;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px 4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#568937;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#568937;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#E2FEAE;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");

			ws.addons.s+='a.tabscss_border_color = "#345D37";';
			
		}
		else
		{

			

			

			ws.styles.s.push("#qm[i]|width:540px;margin:0px;background-color:#ccf1f8;border-width:1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] a|padding:5px 40px 5px 10px;background-color:#e6e6e6;color:#222222;font-family:Arial;font-size:13px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] a:hover|color:#222222;");
			ws.styles.s.push("#qm[i] li:hover>a|color:#222222;");
			ws.styles.s.push("#qm[i] .qmparent|background-image:url("+qmv.base+"qmimages/arrow_19.gif);background-repeat:no-repeat;background-position:97% 55%;");
			ws.styles.s.push("body #qm[i] .qmactive, body #qm[i] .qmactive:hover|background-color:#b4b4b4;");
			ws.styles.s.push("#qm[i] div, #qm[i] ul|padding:20px 15px 15px;margin:-1px 0px 0px -1px;background-color:#f8f8f8;border-width:1px;border-style:solid;border-color:#676767;");
			ws.styles.s.push("#qm[i] div a:hover|background-color:#b4b4b4;color:#222222;border-color:#676767;");
			ws.styles.s.push("#qm[i] ul li:hover>a|background-color:#b4b4b4;color:#222222;border-color:#676767;");
			ws.styles.s.push("#qm[i] div .qmparent, #qm[i] ul .qmparent|background-image:url("+qmv.base+"qmimages/arrow_18.gif);background-position:95% 50%;");
			ws.styles.s.push("body #qm[i] div .qmactive, body #qm[i] div .qmactive:hover|border-color:#676767;");
			ws.styles.s.push("#qm[i] .qmtitle|margin:2px 5px 5px;color:#222222;font-family:Arial;font-size:11px;font-weight:bold;");
			ws.styles.s.push("#qm[i] .qmdividerx|border-top-width:1px;margin:4px 5px;border-color:#999999;");
			ws.styles.s.push("#qm[i] .qmcbox|color:#464646;font-family:arial;font-size:12px;");
			ws.styles.s.push("#qm[i] .qmcbox a|padding:0px;margin:0px;background-color:transparent;color:#0033cc;font-size:12px;border-style:none;");
			ws.styles.s.push("#qm[i] .qmcbox a:hover|background-color:transparent;color:#0033cc;text-decoration:underline;border-style:none;");
			ws.styles.s.push("div#qm[i] a:focus|outline:invert none medium;");
			ws.styles.s.push("ul#qm[i] li:hover > a|background-color:#b4b4b4;");
			ws.styles.s.push("ul#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");
			ws.styles.s.push("div#qm[i] .qmcbox div|padding:0px;margin:0px;border-style:none;");


			

			
		}
	}

	ws.create = qmvi_template_modify_create(ws.create,ws,mod_names,mod_vals);
	

	var ma = qmvi_template_modify_addons(ws,mod_names,mod_vals);
	if (ma)
	{
		if (type==0 || type==12)
			ws.addons.use = ma.addons+","+ws.addons.use;
		else
			ws.addons.use += ma.addons;

		ws.addons.s += ma.vals;
		
		
	}
	

	ws.styles.s = qmvi_template_modify_css(ws.styles.s,mod_names,mod_vals);
	ws.structure = qmvi_template_modify_structure(ws.structure,mod_names);
	
	
	
	return ws;

}

function qmvi_template_modify_content(orig,names)
{
	rval = orig;

	if (names)
	{

		for (var i=0;i<names.length;i++)
		{	

			var ns = names[i].split("|");
			if (ns.length>1 && ns[0]=="content")
			{

				rval = ns[1];

			}


		}

	}

	return rval;

}


function qmvi_template_modify_codetype(orig,names)
{
	rval = orig;

	if (names)
	{

		for (var i=0;i<names.length;i++)
		{	

			var ns = names[i].split("|");
			if (ns.length>1 && ns[0]=="codetype")
			{

				rval = ns[1];

			}


		}

	}

	return rval;

}

function qmvi_template_modify_addon_setting(names)
{
	rval = '';

	if (names)
	{

		

		for (var i=0;i<names.length;i++)
		{	

			var ns = names[i].split("|");
			if (ns.length>1 && ns[0]=="addon_settings")
			{

				rval += ns[1];

			}


		}

	}

	return rval;

}


function qmvi_template_modify_structure(orig,names)
{
	rval = orig;

	if (names)
	{

		

		for (var i=0;i<names.length;i++)
		{	

			var ns = names[i].split("|");
			if (ns.length>1 && ns[0]=="structure")
			{

				rval = ns[1];

			}


		}

	}

	return rval;

}

function qmvi_template_modify_create(ws,wroot,names,vals)
{
	


	if (names)
	{

		var cs = ws.split(",");

		for (var i=0;i<names.length;i++)
		{	

			var ns = names[i].split("|");
			if (ns.length>2 && ns[0]=="create")
			{

				if (ns[1]=="isvertical")
				{

					cs[0] = ns[2];

					if (ns[2]=="true")
					{
						var sw = "200px";
						if (ns[3])
							sw = ns[3];

						wroot.styles.s = qmvi_template_modify_css_change_item(wroot.styles.s,"#qm[i]","width:"+sw+";");
						wroot.addons.s += 'a.ibcss_main_direction = "right";'
						wroot.isvert = true;
					}
					else
					{
						wroot.styles.s = qmvi_template_modify_css_change_item(wroot.styles.s,"#qm[i]","width:auto;");
						wroot.addons.s += 'a.ibcss_main_direction = "down";'
						wroot.isvert = false;
					}	

				}
				else if (ns[1]=="showdelay")
				{
					cs[1] = ns[2];
				}

			}

		}

		ws='';
		for (var i=0;i<cs.length;i++)
		{

			ws += cs[i];
			if (i<cs.length-1)
				ws+=",";			

		}

	}
	

	return ws;



}

function qmvi_template_modify_css(ws,names,vals)
{
	
	if (names)
	{

		for (var i=0;i<names.length;i++)
		{	

			var ns = names[i].split("|");
			if (ns.length>1 && ns[0]=="css")
			{
				var rs = ns[1].split(",");
				if (rs.length>1)
				{
					for (var j=0;j<rs.length;j=j+2)
					{

						ws = qmvi_template_modify_css_change_item(ws,rs[j],rs[j+1]);
						
					
					}

				}


			}
		}
	}


	return ws;


}

function qmvi_template_modify_css_change_item(ws,rule,style)
{

	var edited = false;

	for (var k=0;k<ws.length;k++)
	{
		var tss = ws[k].split("|");
		if (tss.length>1)
		{
			if (tss[0]==rule)
			{
				ws[k]+=style;
				edited = true;
			}
						

		}
	}

	if (!edited)
		ws.push(rule+"|"+style);

	
	return ws;

}



function qmvi_template_modify_addons(ws,names,vals)
{
	if (names)
	{
		var robj;
		


		for (var i=0;i<names.length;i++)
		{
	
			var ns = names[i].split("|");
			if (ns.length>2 && ns[0]=="addon")
			{
				if (!robj)
				{
					robj = new Object();
					robj.addons = '';
					robj.vals = '';
				}				

				robj.addons += ","+ns[1];
				robj.vals +=  qmvi_template_modify_addon_get_values(ws,ns[1],ns[2])
			
			}


		}

		
		return robj;
		
	}

	

}

function qmvi_template_modify_addon_get_values(ws,type,variation)
{

	var rv = '';

	if (type=="fade")
	{
		
		rv += 'a.fade_in_frames = 20;';
		rv += 'a.fade_out_frames = 20;';

	}
	else if (type=="box_effect")
	{

		rv += 'a.box_animation_frames = 14;';
		rv += 'a.box_accelerator = 0.6;';
		rv += 'a.box_position = "center";';

		qmvi_template_modify_css_change_item(ws.styles.s,"#qm0 .qmbox","border-width:1px;border-style:solid;border-color:#bbbbbb;");
	}
	else if (type=="slide_effect")
	{

		rv += 'a.slide_animation_frames = 15;';
		rv += 'a.slide_accelerator = 1;'

		if (variation==1)
		{
			rv += 'a.slide_sub_subs_left_right = true;'	
			rv += 'a.slide_offxy = 1;'
		}

	}
	else if (type=="merge_effect")
	{

		rv += 'a.merge_frames = 12;';

	}
	else if (type=="bump_effect")
	{

		rv += 'a.bump_animation_frames = 10;'
		rv += 'a.bump_distance = 20;'
		rv += 'a.bump_main_direction = "left";'
		rv += 'a.bump_sub_direction = "left";'
		rv += 'a.bump_auto_switch_main_left_right_directions = true;'


	}
	else if (type=="drop_shadow")
	{
		rv += 'a.shadow_offset = 3;'

	}
	else if (type=="match_widths")
	{
		
		rv += 'a.mwidths_active = true;'


	}

	return rv;

}


function qmvi_template_load_menu(type,variation,menu_id,sep_thread)
{

	if (qmad.br_ie && !sep_thread)
	{
		qmvi_show_wait_message("Initializing Visual Menu Design...");
		setTimeout("qmvi_template_load_menu('"+type+"','"+variation+"',"+menu_id+",true)",100);
		return;
	}

	var ts = qmvi_get_templates(type,variation,true);
	var twin = qmv.tplate_dialog;

	
	if (ts.content=="show")
	{
		qmv["pub_content_before"+menu_id] = ts.addcontent_before;
		qmv["pub_content_after"+menu_id] = ts.addcontent_after;
	}
	else
	{
		qmv["pub_content_before"+menu_id] = '';
		qmv["pub_content_after"+menu_id] = '';
	}


	if (ts.bgcolor)
	{
		var bgdiv = document.getElementById("qmvi_design_bg_div");
		qmvi_set_design_bg_color(ts.bgcolor,bgdiv);
	}




	var mc;
	mc = document.createElement("DIV");
	mc.menufloater=1;

	if (qmv.interface_full)
	{

		mc.style.position = "relative";
		
		var count = qmv_lib_get_menu_count();
		mc.style.top = ((count*200)+10)+"px";
		mc.style.left = "0px";
		mc.style.paddingLeft = "20px";
		mc.style.paddingRight = "20px";
		mc.style.zIndex = 100-menu_id;

		mc.onmouseup = function(event){qmv_evt_title_mouseup(event,this)}
		mc.onmousemove = function(event){qmv_evt_title_mousemove(event,this)}
		mc.onmousedown = function(event){qmv_evt_title_mousedown(event,this,this,true)}


	}
	else
	{

		mc.style.position = "absolute";
		mc.style.top = "40px";
		mc.style.left = "40px";
		mc.style.zIndex = qmv.base_zindex-1000+menu_id;


		mc.onmouseup = function(event){	qmv_evt_title_mouseup(event,this)}
		mc.onmousemove = function(event){qmv_evt_title_mousemove(event,this)}
		mc.onmousedown = function(event){qmv_evt_title_mousedown(event,this,this)}

	}


	if (qmad.br_ie)
		mc.style.zoom = 1;

	


	
	var n_rule = new Array();
	var n_val = new Array();
		
	var st = ts.styles.s;
	for (var i=0;i<st.length;i++)
	{
		var spl = st[i].split("|");
			
		if (spl.length>1)
		{
			var rsp = spl[0].split(",");
			for (var k=0;k<rsp.length;k++)
			{


				var appended = false;
				
				for (var j=0;j<n_rule.length;j++)
				{
					if (n_rule[j]==rsp[k])
					{
						n_val[j] += spl[1];
						appended=true;
					}

				}

				if (!appended)
				{
					n_rule.push(rsp[k]);
					n_val.push(spl[1]);
				}
			}

		}
	}


	for (var i=0;i<n_rule.length;i++)
	{
	
		n_rule[i] = qmvi_remove_ie6_child_selector_rules(n_rule[i]);
	
		if (n_rule[i])
		{
			n_rule[i] = n_rule[i].replace(/\[\i\]/g,menu_id);
			qmv_lib_update_add_rule_styles(qmv.styles,qmv.style_rules,n_rule[i],n_val[i],true);		
		}
	}

	
	

	if (!qmad["qm"+menu_id])
		qmad["qm"+menu_id] = new Object();

	

	var wt="";
	wt += qmvi_template_gethtml_structure(ts.structure,menu_id)
	


	if (!qmv.interface_full)
	{
		
		if (qmad.br_ie7)
		{
			var ic = document.createElement("DIV");
			ic.innerHTML = wt;
			mc.appendChild(ic);
		}
		else
			mc.innerHTML = wt;	

		document.body.appendChild(mc);
	}
	else
	{

		mc.innerHTML = wt;
		var mp = qmv.qmvi_design_panel;
		mp.appendChild(mc);		
	
	}


	var a = qmad["qm"+menu_id];
	eval(ts.addons.s);


	var as = ts.addons.use.split(',');
	for (var i=0;i<as.length;i++)
	{

		if (qmv.addons[as[i]])
		{
			
			qmv.addons[as[i]]["on"+menu_id]=true;

			if (as[i]=="image")
				qm_image_preload();
		}
	}
	
	

	eval('qm_create('+menu_id+','+ts.create+')');

	var ctype = qmv.tplate_dialog.curtype;
	if (ctype=="load")
	{
		if (!qmv.loaded)
			qmv_load(null,true,true);

		
	}


	else if (ctype=="new" || ctype=="add")
	{

		document.onmouseover = null;
		var m = document.getElementById("qm"+menu_id);
		qmv_design_menu2(m);

			
		if (ctype=="new")
		{
			qmv.id=-1;
			qmv.cur_item=null;
		}

		
		
		qm_oo(new Object(),m.getElementsByTagName("A")[0]);
		
	}



	if (qmv.addons.tree_menu["on"+menu_id])
	{
		qmv.addons.tree_menu.initialized = false;
		qmv_update_tree_menu(null,null,true);
	}
	
	qmv_update_all_addons(null,true);
	qmvi_template_close_window();

	qmvi_hide_wait_message();

}


function qmvi_template_close_window()
{

	var twin = qmv.tplate_dialog;
	twin.style.visibility = "hidden";
	twin.style.display = "none";

}


function qmvi_tplate_devpublish_css()
{
	var rv = qmv_pubgen_css(false,false,false,true);
	rv = rv.replace(/qmimages/g,'"+qmv.base+"qmimages');

	return rv;


}


function qmvi_init_white_image_obj()
{

	if (!qmv.white_images)
	{
		qmv.white_images = new Array();
		var a = qmv.white_images;
	

		a.push("arrow_1.gif");
		a.push("arrow_3.gif");
		a.push("arrow_13.gif");
		a.push("arrow_15.gif");

	}
	
}



function qmvi_save_images_init()
{

	qmvi_init_white_image_obj();

	
	var sdoc = qmv_savegen();
	var search = "qmimages/";


	var imgn = new Array();


	var p=0;
	while ((p=sdoc.indexOf(search,p))>0)
	{
	
		var a = sdoc.indexOf('"',p);
		var b = sdoc.indexOf(')',p);
		var c = sdoc.indexOf("'",p);

		var ei = Math.min(a,b,c);
		var fn = sdoc.substring(p,ei);

		var addit = true;
		for (var i=0;i<imgn.length;i++)
		{
			if (fn==imgn[i])
			{
				addit = false;
				break;
			}
		}
				
		if (addit)
			imgn.push(fn);

		p+=search.length;

	}

	if (imgn.length)
	{

		qmv.save_images = new Object();
		qmv.save_images.imgs = new Array(imgn.length);
		qmv.save_images.count = imgn.length;
		qmv.save_images.pos = 0;
		var qs = qmv.save_images;

	
		for (var i=0;i<imgn.length;i++)
		{
		
			qs.imgs[i] = document.createElement("IMG");
			qs.imgs[i].style.padding = "10px";
			qs.imgs[i].style.display = "block";

			qs.imgs[i].onload=function()
			{
				qmv.save_images.pos++
				if (qmv.save_images.pos==qmv.save_images.count)
					qmvi_save_images_init_loaded();
			}
	
			qs.imgs[i].src = qmv.base+imgn[i];	
		}
	}
	else
	{

		var ic = document.getElementById("qmvi_save_images_container");
		var nd = document.createElement("DIV");
		nd.style.fontFamily = "Arial";
		nd.style.fontSize = "13px";
		nd.style.color = "#333333";
		nd.style.padding = "20px";
		nd.style.textAlign = "center";
		nd.style.position = "relative";
		nd.style.top = "60px";

		nd.innerHTML = "The current menu is not using any template images.";

		ic.appendChild(nd);
	
	}



}

function qmvi_save_images_init_loaded()
{

	var ic = document.getElementById("qmvi_save_images_container");
	var qs = qmv.save_images;


	for (var i=0;i<qs.imgs.length;i++)
	{

		var nd = document.createElement("DIV");
		nd.style.margin = "5px";
		nd.style.borderWidth = "1px";
		nd.style.borderColor = "#bbbbbb";
		nd.style.borderStyle = "dotted";


		var wi = qmv.white_images;		
		for (var j=0;j<wi.length;j++)		
		{

			if (qs.imgs[i].src.indexOf(wi[j])+1)
				nd.style.backgroundColor = "#666666";


		}


		nd.onmouseover = function()
		{
			this.style.borderColor = "#dd3300";
		}

		nd.onmouseout = function()
		{
			this.style.borderColor = "";
		}

		nd.onclick = function(event)
		{
			if (event && event.button && event.button==2)
				return;
	
			var st = "Save Image As...";
			if (qmad.br_ie)
				st = "Save Picture As...";

			qmv_show_dialog("alert",null,"Right click the image and select '"+st+"'. Next save the images to a new 'qmimages' folder located in the same folder as the page which contains the menu.",450,null,null,null,null,true);

		}


		if (qmad.br_ie)
			nd.style.styleFloat = "left";
		else
			nd.style.cssFloat = "left";
		
		nd.appendChild(qs.imgs[i]);
		ic.appendChild(nd);

	}


}


function qmvi_show_wait_message(msg)
{
	var wm = qmv.wait_message = document.getElementById("qmvi_wait_message");
	var wms = qmv.wait_message_shadow = document.getElementById("qmvi_wait_message_shadow");
	var wd = qmv_lib_get_window_dimensions();


	wm.innerHTML = msg;

	wm.style.padding = "20px 50px 20px 50px";
	wm.style.borderWidth = "1px";
	wm.style.borderStyle = "solid";
	wm.style.borderColor = "#666666";
	wm.style.fontSize = "13px";
	wm.style.color = "#333333";

	var sl = parseInt((wd[0]-wm.offsetWidth)/2);
	var st = parseInt((wd[1]-wm.offsetHeight)/2);

	wm.style.left = sl+"px";
	wm.style.top = st+"px";
	

	wms.style.left = (sl+3)+"px";
	wms.style.top = (st+3)+"px";

	wms.style.width = wm.offsetWidth+"px";
	wms.style.height = wm.offsetHeight+"px";

	
	wm.style.visibility = "visible";
	if (qmad.br_ie7)
		wms.style.visibility = "hidden";
	else
		wms.style.visibility = "visible";

}

function qmvi_hide_wait_message(msg)
{

	if (qmv.wait_message)
		qmv.wait_message.style.visibility = "hidden";

	if (qmv.wait_message_shadow)
		qmv.wait_message_shadow.style.visibility = "hidden";
	

}

function qmvi_show_logon_window(float_it)
{

	var wd = qmv_lib_get_window_dimensions();
	var ql = document.getElementById("qmvi_logon");
	var qls = document.getElementById("qmvi_logon_shadow");


	var qbuttons = document.getElementById("qmvi_logon_buttons");
	var qcontent = document.getElementById("qmvi_logon_content");


	var wt = '';
	

		wt += '<div class="qmvi-common qmvi-dialog-input-title">User Name</div>';
		wt += '<div class="qmvtree-input-container" style="height:16px;">';
		wt += '<input id="qmvi_login_user_name" type="text" class="qmvtree-input qmvtree-input-dialog" style="">';
		wt += '</div>';

		wt += '<div style="font-size:1px;height:15px"></div>';


		wt += '<div class="qmvi-common qmvi-dialog-input-title">Password</div>';
		wt += '<div class="qmvtree-input-container" style="height:16px;">';
		wt += '<input id="qmvi_login_password" type="password" class="qmvtree-input qmvtree-input-dialog" style="">';
		wt += '</div>';

	


	qcontent.innerHTML = wt;


	wt = '';
	wt += '<input onclick="qmvi_login()" class="qmvi-common qmvi-dialog-button" type="button" value="Login">';

	qbuttons.innerHTML = wt;
					
	
	ql.style.width = "300px";
	ql.style.left = parseInt((wd[0]-ql.offsetWidth)/2)+"px";
	ql.style.top = parseInt((wd[1]-ql.offsetHeight)/2)+"px";

	
	qmvi_logon_size_window(ql,qls,float_it);

	ql.style.visibility = "visible";
	qls.style.visibility = "visible";
	

}

function qmvi_login()
{
	var un = document.getElementById("qmvi_login_user_name");
	var pass = document.getElementById("qmvi_login_password");

	qmvi_ajax_request_doc("qmvi_login_verification(i)",qmv.base_ajax+"validate_login.asp","?"+un.value+"|"+pass.value);

}


function qmvi_show_auth_window(float_it)
{
	
	var wd = qmv_lib_get_window_dimensions();
	var ql = document.getElementById("qmvi_logon");
	var qls = document.getElementById("qmvi_logon_shadow");
	

	document.getElementById("qmvi_logon_title").innerHTML = "Authenticate Menu";
	var qbuttons = document.getElementById("qmvi_logon_buttons");
	var qcontent = document.getElementById("qmvi_logon_content");


	var wt = '';
	

		wt += '<div class="qmvi-common qmvi-dialog-input-title">Get Code</div>';
		wt += '<iframe src="'+qmv.base_ajax+'loginauth.asp" style="background-color:#ffffff;position:relative;width:100%;height:135px;border-width:1px;border-style:solid;border-color:#999999;"></iframe>';
		
		

		wt += '<div style="font-size:1px;height:15px"></div>';

			
		wt += '<div class="qmvi-common qmvi-dialog-input-title">Paste Code</div>';
		wt += '<div class="qmvtree-input-container" style="height:16px;">';
		wt += '<input id="qmvi_auth_input_field" type="text" class="qmvtree-input qmvtree-input-dialog" style="">';
		wt += '</div>';
		
	


	qcontent.innerHTML = wt;


	wt = '';

	wt += '<input onclick="qmvi_login_authenticate_code()" class="qmvi-common qmvi-dialog-button" type="button" value="Authenticate">';

	if (float_it)
		wt += '<input onclick="qmv_hide_dialog(false,false,false,true)" class="qmvi-common qmvi-dialog-button" type="button" style="margin-left:5px;" value="Cancel">';
	

	qbuttons.innerHTML = wt;


	ql.style.width = "340px";
	ql.style.left = parseInt((wd[0]-ql.offsetWidth)/2)+"px";
	ql.style.top = parseInt((wd[1]-ql.offsetHeight)/2)+"px";
	
	qmvi_logon_size_window(ql,qls,float_it);

	ql.style.visibility = "visible";
	qls.style.visibility = "visible";

}

function qmvi_logon_size_window(ql,qls,float_it)
{

	if (float_it)
	{
		document.getElementById("qmvi_logon_close").style.visibility = "inherit";

		var dt = document.getElementById("qmvi_logon_title");
		dt.onmouseup = function(e)
		{
			qmv_evt_title_mouseup(e,this);
		}

		dt.onmousemove = function(e)
		{
			qmv_evt_title_mousemove(e,this)
		}


		dt.onmousedown = function(e)
		{
			qmv_evt_title_mousedown(e,this,5)
		}

		qls.style.width = ql.offsetWidth+"px";
		qls.style.height = ql.offsetHeight+"px";
		qls.style.top = (ql.offsetTop+3)+"px";
		qls.style.left = (ql.offsetLeft+3)+"px";

	}
	else
	{
		qmvi_logon_shadow_size(qls);
		qmv.logon_blockout = qls;
	}



}


function qmvi_logon_shadow_size(qls)
{

	var wd = qmv_lib_get_window_dimensions();

	qls.style.width = wd[0]+"px";
	qls.style.height = wd[1]+"px";
	qls.style.top = "0px";
	qls.style.left = "0px";


}


function qmvi_open_external_browser_window(link)
{
	
	window.open(link);

}



function qmvi_login_authenticate_code()
{

	var code = document.getElementById("qmvi_auth_input_field").value;

	if (code && code.length>1)
	{

		var close_it = false;
		var ctype = code.substring(0,1);
		code = code.substring(1);

		if (ctype=="v") //subscription account
		{

			code = parseInt(code);
			if (isNaN(code))
				qmvi_login_authenticate_code_oops();
			else if (code>1999999999999) //year 2033
				qmvi_login_authenticate_code_oops();
			else
			{
				var ctime = (new Date()).getTime();
				if (ctime>code)
					qmvi_subscription_expired_alert();
				else
				{
					qmv.unlock_type = "subscription";
					qmv.unlock_string = 'qm_sub='+code;
					close_it = true;
				}
			}


		}
		else if (ctype=="s") //single account
		{
			qmv.unlock_type = "single";
			qmv.unlock_string = "qm_single='"+code+"'";
			close_it = true;

		}
		else if (ctype=="u")  //unlimited account
		{
			code = parseInt(code);
			if (isNaN(code))
				qmvi_login_authenticate_code_oops();
			else if (code>1999999999999) //year 2033
				qmvi_login_authenticate_code_oops();
			else
			{
				var ctime = (new Date()).getTime();
				if (ctime>code)
					alert("The authentification code you entered is no loger valid, please login to retrieve your updated code.");
				else
				{
					qmv6 = true;
					qmv.unlock_type = "unlimited";
					qmv.unlock_string = "qmv6=1";
					close_it = true;
				}
			}
			
		}
		else
			qmvi_login_authenticate_code_oops();


		if (close_it)
		{
			var ql = document.getElementById("qmvi_logon");
			var qls = document.getElementById("qmvi_logon_shadow");

			ql.style.visibility = "hidden";
			qls.style.visibility = "hidden";
			qmv.logon_blockout = null;
		}


	}
	else
	{

		if (!code)
			alert("First login to retrieve your code, then paste the code to the 'Paste Code' field");
		else
			qmvi_login_authenticate_code_oops();

	}


}


function qmvi_login_authenticate_code_oops(type)
{

	alert("The code was pasted or entered incorectly, please retry.");


}






