// JavaScript Document

	// function to retrieve value in cookie
	function getCookie(NameOfCookie) {
	 if (document.cookie.length > 0) {
		begin = document.cookie.indexOf(NameOfCookie+"="); 
		if (begin != -1) {
			begin += NameOfCookie.length+1; 
			end = document.cookie.indexOf(";", begin);
			if (end == -1) end = document.cookie.length;
		return unescape(document.cookie.substring(begin, end)); 
		} 
	  }
		return null; 
	}
	
	// first variable to be read from cookie rather than set 
	var myuid = getCookie('userc');
	
	// check variable that has already been read from another include file against the local one
	if (sName == myuid) {
		
		// set up variables ready for allwebmenus which must be itself be conditionally called from html page this file is included within	
		var thispath = window.location.pathname ;
		var launchediturl = "http://www.easywebwriter.com/ewwedit/ewwedit.php?ewwe=" + thispath ;
 		var launchstyleurl = "http://www.easywebwriter.com/ewwedit/ewwstyle.php?ewwe=" + thispath ;
 		var launchpgbkgurl = "http://www.easywebwriter.com/ewwedit/ewwbackground.php?ewwe=" + thispath ;		
 		var launchlistpgurl = "http://www.easywebwriter.com/ewwedit/ewwfilelist.php?ewwe=" + thispath ;
 		var launchdeletepgurl = "http://www.easywebwriter.com/ewwedit/ewwdeletepg.php?ewwe=" + thispath ;
 		var launchaddpgurl = "http://www.easywebwriter.com/ewwedit/ewwaddpg.php?ewwe=" + thispath ;
 		var launchaddtpgurl = "http://www.easywebwriter.com/ewwedit/ewwlayout.php?ewwe=" + thispath ;		
		var launchclonepgurl = "http://www.easywebwriter.com/ewwedit/ewwclonepg.php?ewwe=" + thispath ;				
		var launchdelbackgroundurl = "http://www.easywebwriter.com/ewwedit/ewwdelbackground.php?ewwe=" + thispath ;				
		var launchmakepublicurl = "http://www.easywebwriter.com/ewwedit/ewwmakepublic.php?ewwe=" + thispath;
		var launchpublishxs = "http://www.easywebwriter.com/ewwedit/ewwxspub.php?ewwe=" + thispath;
		var launchpginfourl = "http://www.easywebwriter.com/ewwedit/ewwpghead.php?ewwe=" + thispath;
		var launchpgrestore = "http://www.easywebwriter.com/ewwedit/ewwrevertpg.php?ewwe=" + thispath;
								
		var MenuLinkedBy='AllWebMenus [4]', awmBN='616'; awmAltUrl='';
		
	}
	
	if (!suid) var suid = 1; //declare in case not read from include
	var sucuid = getCookie('suid');	// read from cookie 
	if (suid == sucuid) { //admin access set
		var selectmenu = "a";
	} 
