// JavaScript Document
	var currentlocation = document.location.href;
	var currentpage = 'PLATINUM';
	var dc = document.cookie;
	var nv = dc.split('; ');
	var cookie = new Object();	
	var menu_items= new Array(6);
	var menu_items_bgs= new Array(6);
	var sub_menu_items= new Array(6);
	var sub_menu_links= new Array(6);

	if(currentlocation.indexOf("http:",0) > -1) {
		var prefix = 'http://www.weddingsolutions.com/';
	} 
	
	if(currentlocation.indexOf("https:",0) > -1) {
		var prefix = 'https://www.weddingsolutions.com/';
	}

	menu_items[0]="PLATINUM";
	menu_items_bgs[0] = prefix + 'images/navigation/home_sub_bg.gif';	
	sub_menu_items[0] = new Array(1);
	sub_menu_links[0] = new Array(1);
	sub_menu_items[0][0] = '';
	sub_menu_links[0][0] = 'javascript:;';

	menu_items[1]="DIAMOND";
	menu_items_bgs[1] = prefix + 'images/navigation/fashion_beauty_sub_bg.gif';
	sub_menu_items[1] = new Array(1);
	sub_menu_links[1] = new Array(1);
	sub_menu_items[1][0] = '';
	sub_menu_links[1][0] = 'javascript:;';

	menu_items[2]="GOLD";
	menu_items_bgs[2]=prefix + 'images/navigation/my_wedding_sub_bg.gif';
	sub_menu_items[2] = new Array(1);
	sub_menu_links[2] = new Array(1);
	sub_menu_items[2][0] = '';
	sub_menu_links[2][0] = 'javascript:;';

	menu_items[3]="BANNERS";
	menu_items_bgs[3]=prefix + 'images/navigation/reception_sub_bg.gif';
	sub_menu_items[3] = new Array(1);
	sub_menu_links[3] = new Array(1);
	sub_menu_items[3][0] = '';
	sub_menu_links[3][0] = 'javascript:;';
	
	menu_items[4]="EMAIL";
	menu_items_bgs[4]=prefix + 'images/navigation/registry_sub_bg.gif';
	sub_menu_items[4] = new Array(1);
	sub_menu_links[4] = new Array(1);
	sub_menu_items[4][0] = '';
	sub_menu_links[4][0] = 'javascript:;';
	
	menu_items[5]="LEADS";
	menu_items_bgs[5]=prefix + 'images/navigation/honeymoon_sub_bg.gif';
	sub_menu_items[5] = new Array(1);
	sub_menu_links[5] = new Array(1);
	sub_menu_items[5][0] = '';
	sub_menu_links[5][0] = 'javascript:;';

	function change_sub_name(button) {		
		for (i=0; i < menu_items.length; ++i) {
			if(button == menu_items[i]) {
				text = '';
				for (j=0; j<sub_menu_items[i].length; ++j) {
					text = text + '<a href="' + sub_menu_links[i][j] + '" class="navstyle" alt="' + sub_menu_items[i][j] + '" target="_parent">' + sub_menu_items[i][j] + '</a>&nbsp;&nbsp;&nbsp;';
					if(j == (sub_menu_items[i].length - 1)) {
						text = text;
					} else {
						if(sub_menu_items[i][j].indexOf("<br>",1)==-1) {
							text = text + "|&nbsp;&nbsp;&nbsp;";
						} else {
							text = text;
						}
					}
				}
	
				document.getElementById("submenu_bg").style.background="url('"+menu_items_bgs[i]+"')";
				document.getElementById('submenu_bg').innerHTML = text;
			}
		} // for
	
	}

	function swap_back() {
		var pagelocation = window.location.href;

		if( pagelocation.indexOf('platinum_package.php',0) > -1 ) {
			currentpage = 'PLATINUM';
			document.getElementById("platinum_bg").className="boldnavstyle";
		}
		
		if( pagelocation.indexOf('platinum_',0) > -1 ) {
			currentpage = 'PLATINUM';
			document.getElementById("platinum_bg").className="boldnavstyle";
		}
		
		if( pagelocation.indexOf('diamond_package.php',0) > -1 ) {
			currentpage = 'DIAMOND';
			document.getElementById("diamond_bg").className="boldnavstyle";
		}
		
		if( pagelocation.indexOf('diamond_',0) > -1 ) {
			currentpage = 'DIAMOND';
			document.getElementById("diamond_bg").className="boldnavstyle";
		}
		
		if( pagelocation.indexOf('gold_package.php',0) > -1 ) {
			currentpage = 'GOLD';
			document.getElementById("gold_bg").className="boldnavstyle";
		}
	
		if( pagelocation.indexOf('banners.php',0) > -1 ) {
			currentpage = 'BANNERS';
			document.getElementById("banners_bg").className="boldnavstyle";
		}
		
		if( pagelocation.indexOf('banners_',0) > -1 ) {
			currentpage = 'BANNERS';
			document.getElementById("banners_bg").className="boldnavstyle";
		}
	
		if( pagelocation.indexOf('email_blast.php',0) > -1 ) {
			currentpage = 'EMAIL';
			document.getElementById("email_bg").className="boldnavstyle";
		}
		
		if( pagelocation.indexOf('brides_leads.php',0) > -1 ) {
			currentpage = 'LEADS';
			document.getElementById("leads_bg").className="boldnavstyle";
		}
		
		if(currentpage == '')
		{
			currentpage = 'PLATINUM';
			document.getElementById("platinum_bg").className="boldnavstyle";
		}

		change_sub_name(currentpage);
	}

	function parseQueryString(str) {
	  str = str ? str : location.search;
	  var query = str.charAt(0) == '?' ? str.substring(1) : str;
	  var args = new Object();
	  if (query) {
		var fields = query.split('&');
		for (var f = 0; f < fields.length; f++) {
		  if(fields[f] != ''){
			  var field = fields[f].split('=');
			  args[unescape(field[0].replace(/\+/g, ' '))] = unescape(field[1].replace(/\+/g, ' '));
		  }
		}
	  }
	  return args;
	}
		
	for(i = 0; i < nv.length; i++)
	{
	  eq = nv[i].indexOf('=');
	  cookie[nv[i].substring(0, eq)] = unescape(nv[i].substring(eq + 1));
	}
