var serverAccess = 1; // 0 = local, 1 = working server
var strOutput = "" //stuff to write on page
var headImageBase = "";
var tabImageBase  = "";
var siteImageBase = "";
var linkURLBase   = "";
var _userFName = null;
var _userLName = null;
var _user      = null;
var _number    = null;
var _Rec_id    = null;

function determinePath() {

	if (!Array.prototype.indexOf)
	{
	  Array.prototype.indexOf = function(elt /*, from*/)
	  {
	    var len = this.length;
	
	    var from = Number(arguments[1]) || 0;
	    from = (from < 0)
	         ? Math.ceil(from)
	         : Math.floor(from);
	    if (from < 0)
	      from += len;
	
	    for (; from < len; from++)
	    {
	      if (from in this &&
	          this[from] === elt)
	        return from;
	    }
	    return -1;
	  };
	}





	if ( serverAccess == 0 ) {
		linkURLBase   = "http://localhost/Goldzone_Organization/web-content/";
	}
	else {
		var string=(location.href); 
		var getit=string.split('/')
		
		//alert("");
	
		//if (getit.indexOf("violet.goldzoneeducation.com") == -1 ) {				
		//	linkURLBase   = "http://" + getit[2] + "/";
		//}		
		
		//else {
		//	linkURLBase   = "http://www.goldzoneeducation.com/";
		//}
		
		
		//alert(getit); 
		
		
				
			if (getit.indexOf("violet.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("events.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("applications.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("secure.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("group.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("services.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("203.211.150.108") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("www.goldzoneeducation.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			else if (getit.indexOf("www.goldzonecenter.com") > -1 ) {
				linkURLBase   = "http://www.goldzoneeducation.com/";
			}
			
			
			else {
				linkURLBase   = "http://" + getit[2] + "/";
			}
	
		
		
		
		
	}
	
	//siteImageBase = linkURLBase + "images/";
	//tabImageBase  = linkURLBase + "images/Siteheader/menu/";
	//headImageBase = linkURLBase + "images/Siteheader/";
	
	siteImageBase = "http://www.goldzoneeducation.com/images/";
	tabImageBase  = "http://www.goldzoneeducation.com/images/Siteheader/menu/";
	headImageBase = "http://www.goldzoneeducation.com/images/Siteheader/";
	
}


function write_footer()
{	
	determinePath();
	strOutput  = "<p><img src=\"" + siteImageBase + "Filler_Orange.gif\" width=\"749\" height=\"1\" border=\"0\"></p>";
	strOutput += "<img src=\"" + siteImageBase + "GZLS-Footer-Logo.jpg\" width=\"80\" height=\"80\" align=\"bottom\" border=\"0\"><br>";
	
	//strOutput += "<p><form method=\"post\" action=\"http://www.goldzoneeducation.com/htdig/bin\rundig">";
	strOutput += "<p><form method=\"post\" action=\"http://www.goldzoneeducation.com/cgi-bin/htsearch\">";
	strOutput += "<input type=\"hidden\" name=\"sort\" value=\"score\">";
	strOutput += "<input type=\"hidden\" name=\"format\" value=\"builtin-long\">";
	strOutput += "<input type=\"hidden\" name=\"method\" value=\"or\">";
	strOutput += "<input type=\"hidden\" name=\"config\" value=\"gol140\">";
	strOutput += "<input type=\"hidden\" name=\"restrict\" value=\"\">";
	strOutput += "<input type=\"hidden\" name=\"exclude\" value=\"\">";
	strOutput += "<input class=\"search\" type=\"text\" size=\"15\" name=\"words\" value=\"search...\" onfocus=\"javascript:if(this.value=='search') {this.value='';}\" onblur=\"javascript:if(this.value=='') {this.value='search'}\">&nbsp;";
	strOutput += "<input type=\"image\" src=\"" + tabImageBase + "search_button.gif\" border=\"0\" align=\"top\"></form></p>";
	
	strOutput += "<p class=\"MainBlock\">";
	strOutput += "<a class=\"MainBlock\" href=\"" + linkURLBase + "contact/index.html\">contact</a>";
	strOutput += " | <a class=\"MainBlock\" href=\"" + linkURLBase + "aboutus/privacyandsecurity.html\">privacy policy</a>";
	strOutput += " | <a class=\"MainBlock\" href=\"" + linkURLBase + "aboutus/terms.html\">terms of use</a></p>";		
	strOutput += "<p class=\"MainBlock\">&copy; 2003-2010 Goldzone Leadership Center. All rights reserved.</p>";
	document.write( strOutput );
	document.close();			
	
	
}


function write_footer_min()
{	
	determinePath();
	strOutput  = "<p><img src=\"" + siteImageBase + "Filler_Orange.gif\" width=\"749\" height=\"1\" border=\"0\"></p>";
	strOutput += "<img src=\"" + siteImageBase + "Logo_Footer.jpg\" width=\"35\" height=\"34\" align=\"bottom\" border=\"0\"><br>";	
	strOutput += "<p class=\"MainBlock\">&copy; 2003-2010 Goldzone Leadership Center. All rights reserved.</p>";
	document.write( strOutput );
	document.close();			
	
	
}

function write_path()
{	
	var strOutput = "";
	var myURL = ( document.URL );
	determinePath();
	
	
	
	strOutput += "<table class=\"pathBlock\" width=\"750\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
	strOutput += "<tr><td><br>";
	
	
	if ( (myURL.indexOf( "home.html" ) <= 0)  ) {
	
		strOutput += "<a class=\"MainBlock\" href=\"" + linkURLBase + "home.html\">Home</a>";
	
	
		//First Level
		if ( (myURL.indexOf( "/aboutus/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "aboutus/index.html\">About Us</a>"
			
			if ( (myURL.indexOf( "/mediacenter.html" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "aboutus/mediacenter.html\">Media Center</a>"
			}
		}
	
		else if ( (myURL.indexOf( "/contact/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "contact/index.html\">Contact Us</a>"
		}
		
		else if ( (myURL.indexOf( "/presentation/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "presentation/index.html\">Presentation</a>"
		}
	
		else if ( (myURL.indexOf( "/programsandservices/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/index.html\">Programs & Services</a>"
			
			if ( (myURL.indexOf( "/leadership/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/leadership/index.html\">Leadership Curriculum</a>";
			      
			      if ( (myURL.indexOf( "/seminar/" ) > 0) ) {
			      	strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/leadership/seminar/index.html\">Seminar</a>";
				  }
				  
				  if ( (myURL.indexOf( "/accelerator/" ) > 0) ) {
			      	strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/leadership/accelerator/index.html\">Accelerator</a>";
				  }
			      
			}
			
			if ( (myURL.indexOf( "/graduate/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/graduate/index.html\">Advanced Graduate Curriculum</a>";
			}
			
			if ( (myURL.indexOf( "/corporate/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/corporate/index.html\">Corporate Transformation</a>";
			}
			
			
		}
		
		else if ( (myURL.indexOf( "/opportunities/" ) > 0)  || ( myURL.indexOf( "/hr/" ) > 0) ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "opportunities/index.html\">Opportunities</a>"
		}
		
		else if ( (myURL.indexOf( "/hotnews/" ) > 0)  || ( myURL.indexOf( "/hr/" ) > 0) ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "hotnews/index.html\">Hot News</a>"
		}
			    
	    else if ( (myURL.indexOf( "/curriculum/" ) > 0)    || (myURL.indexOf( "/leadership/" ) > 0) ) { 
		
			if ( (myURL.indexOf( "/leadership/" ) > 0) ) {
				strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "programsandservices/index.html\">Programs & Services</a>"
				
			   if ( (myURL.indexOf( "/seminar/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "leadership/seminar/index.html\">Leadership Seminar</a>"
			   }
			   
			   if ( (myURL.indexOf( "/experience/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "leadership/experience/index.html\">Leadership Experience</a>"
			   }
			   
			   if ( (myURL.indexOf( "/week/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "leadership/week/index.html\">Leadership Week</a>"
			   }
			   
			   if ( (myURL.indexOf( "/academy/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "leadership/academy/index.html\">Leaders' Academy</a>"
			   }
			}
	
			else if ( ( myURL.indexOf( "/optimaprogram/" ) > 0) ) {
			   strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "optimaprogram/index.html\">Optima Program</a>"
			}
	
			else if ((myURL.indexOf( "/business/" ) > 0) ) {
				strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "business/index.html\">Business</a>"
			}
		
		}
	    
	    else if ( (myURL.indexOf( "/graduate/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "curriculum/index.html\">Curriculum</a>";
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "graduate/index.html\">Graduate</a>";
			
			   if ( (myURL.indexOf( "/business/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "graduate/business/index.html\">Business</a>";
			   }
			   
			   if ( (myURL.indexOf( "/wealth/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "graduate/wealth/index.html\">Wealth</a>";
			   }
			   
			   if ( (myURL.indexOf( "/health/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "graduate/health/index.html\">Health</a>";
			   }
			   
			   if ( (myURL.indexOf( "/relationship/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "graduate/relationship/index.html\">Relationship</a>";
			   }
			   
			   if ( (myURL.indexOf( "/optimaprogram/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "graduate/optimaprogram/index.html\">Optima Program</a>";
			   }
		}
	    
		else if ( (myURL.indexOf( "/services/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "services/index.html\">Services</a>"
			
			if ( (myURL.indexOf( "/modular/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "services/modular/index.html\">Modular Curriculum</a>";
			}
			
			if ( (myURL.indexOf( "/coaching/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "services/coaching/index.html\">Coaching</a>";
			}
			
			if ( (myURL.indexOf( "/consulting/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "services/consulting/index.html\">Consulting</a>";
			}
			
			if ( (myURL.indexOf( "/corporatereinvention/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "services/corporatereinvention/index.html\">Corporate Reinvention</a>";
			}
		}
	
		else if ( (myURL.indexOf( "/events/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "events/index.html\">Events</a>";
		}
		
		else if ( (myURL.indexOf( "/investor/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "investor/index.html\">Investor</a>";
			
			if ( (myURL.indexOf( "/singapore/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "investor/singapore/index.html\">Singapore</a>";
			}
		}
	
		else if ( (myURL.indexOf( "/knowledgebank/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/index.html\">Knowledge Bank</a>"
					
			if ( (myURL.indexOf( "/questionandanswer/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/questionandanswer/index.html\">Question and Answer</a>"
			}
			
			if ( (myURL.indexOf( "/articlesandbulletins/" ) > 0) ) {
			      strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/articlesandbulletins/index.html\">Articles and Bulletins</a>"
			}
		
			if ( (myURL.indexOf( "/recommendedreading/" ) > 0) ) {
				strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/recommendedreading/index.html\">Recommended Reading</a>"
			}
			
			if ( (myURL.indexOf( "/glossary/" ) > 0) ) {
				strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/glossary/index.html\">Glossary</a>"
			}
		}
	
		else if ( (myURL.indexOf( "/store/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "store/index.html\">Store</a>"
		}
		
		else if ( (myURL.indexOf( "/members/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "members/index.html\">Members</a>"
		}
		
		else if ( (myURL.indexOf( "/pr/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "aboutus/mediacenter.html\">Press Release</a>";
		}
		
		else if ( (myURL.indexOf( "/QandA/" ) > 0)  ) { 
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/index.html\">Knowledge Bank</a>";
			strOutput += " > <a class=\"MainBlock\" href=\"" + linkURLBase + "knowledgebank/questionandanswer/index.html\">Question and Answer</a>";
			
		}
		
		//if ( (myURL.indexOf( "index.html" ) <= 0)  ) { 
		//	strOutput += " > <a href=\"" + document.URL + "\">" + document.title + "</a>";
		//}
	}
	
	strOutput += "</td></tr></table><p></p>";
	
	
	if ( (myURL.indexOf( "home.html" ) <= 0)  ) {
		document.title = ("Goldzone Leadership Center | " + document.title);
	}
	
	if ( (myURL.indexOf( "/knowledgebank/" ) > 0)  ) { 
		document.title = ("Goldzone Leadership Center | Knowledge Bank");
	}
	
	
	
	
	document.write( strOutput );
	document.close();
	
}
function write_header()
{
	var myURL = ( document.URL );
	
	siteCookieR();
	
	determinePath();
	
	//header Stuff
	strOutput = "<a id=\"top\" name=\"top\"></a>";
	
	strOutput += "<table width=\"750\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	
	strOutput += "<tr><td colspan=\"2\"><img src='http://www.goldzoneeducation.com/images/Filler_Trans.gif' border='0' height=\"5\" width=\"3\"/></td></tr>";
	
	strOutput += "<tr><td rowspan=\"1\" valign=\"center\"><a href=\"" + linkURLBase + "\"><img src=\"" + headImageBase + "Header5.gif\" border=\"0\"></td>";
	
	strOutput += "<td class=\"MainBlock\" align=\"right\" valign=\"center\">";
	
	strOutput += "<a href=\"javascript:void(0)\" onClick=\"javascript:window.open('http://callme.sales2europe.com/callme-pop.php?cid=00002611&language=EN&us=0&referrer='+escape(document.URL),'callme','height=490,width=425,location=0,menubar=0,resizable=0,scrollbars=0,status=1,titlebar=0,toolbar=0,screenX=100,screeny=100,left=100,top=100')\"><img src='http://www.goldzoneeducation.com/images/conciergeConnect.gif' alt='Click here to call us toll free' border='0'/></a>";
	
	//strOutput += "<p>&nbsp;</p>";
	strOutput += "</td>";
	strOutput += "</tr>";
	
	strOutput += "<tr><td colspan=\"2\"><img src='http://www.goldzoneeducation.com/images/Filler_Trans.gif' border='0' height=\"3\" width=\"3\"/></td></tr>";
	
	strOutput += "</table>";
	
	//Menu Tabs
	strOutput += "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
	strOutput += "<tr><td width=\"49%\" background=\"" + tabImageBase + "menu_bg1.gif\">" +
				 "</td><td>";
	
	strOutput += "<table width=\"751\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" +
				 "<tr height=\"30\"><td colspan=\"2\">";
	
	if ( (myURL.indexOf( "home.html" ) > 0)  ) { 
		strOutput += "<a href=\"" + linkURLBase + "home.html\"><img src=\"" + tabImageBase + "Home_60x30s.gif\" " +
				 "height=\"30\" width=\"60\" border=\"0\"></a>"
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "home.html\"><img src=\"" + tabImageBase + "Home_60x30.gif\" " +
				 "height=\"30\" width=\"60\" border=\"0\"></a>";
	}
	
	if ( (myURL.indexOf( "/aboutus/" ) > 0)  ) { 
		strOutput += "<a href=\"" + linkURLBase + "aboutus/index.html\"><img src=\"" + tabImageBase + "AboutUs_58x30s.gif\" " +
				 "height=\"30\" width=\"58\" border=\"0\"></a>"
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "aboutus/index.html\"><img src=\"" + tabImageBase + "AboutUs_58x30.gif\" " +
				 "height=\"30\" width=\"58\" border=\"0\"></a>";
	}
	
			 		
	if ( myURL.indexOf( "/contact/" ) > 0) { 			 
		strOutput += "<a href=\"" + linkURLBase + "contact/index.html\"><img src=\"" + tabImageBase + "Contact_58x30s.gif\" height=\"30\" width=\"58\" " +
					 "border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "contact/index.html\">" +
					 "<img src=\"" + tabImageBase + "Contact_58x30.gif\" height=\"30\" "+
					 "width=\"58\" border=\"0\"></a>";
	}
	
	if (( myURL.indexOf( "/programsandservices/" ) > 0) ||  
       ( myURL.indexOf( "/leadership/" ) > 0) || (myURL.indexOf( "/graduate/" ) > 0) ){ 			 
		strOutput += "<a href=\"" + linkURLBase + "programsandservices/index.html\"><img src=\"" + tabImageBase + "ProgramServices_122x30s.gif\" height=\"30\" width=\"122\" " +
					 "border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "programsandservices/index.html\">" +
					 "<img src=\"" + tabImageBase + "ProgramServices_122x30.gif\" height=\"30\" "+
					 "width=\"122\" border=\"0\"></a>";
	}
	
	if ( ( myURL.indexOf( "/opportunities/" ) > 0) || ( myURL.indexOf( "/hr/" ) > 0) ) { 			 
		strOutput += "<a href=\"" + linkURLBase + "opportunities/index.html\"><img src=\"" + tabImageBase + "Opportunities_93x30s.gif\" height=\"30\" width=\"93\" " +
					 "border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "opportunities/index.html\">" +
					 "<img src=\"" + tabImageBase + "Opportunities_93x30.gif\" height=\"30\" "+
					 "width=\"93\" border=\"0\"></a>";
	}
	
	if ( myURL.indexOf( "/hotnews/" ) > 0) { 			 
		strOutput += "<a href=\"" + linkURLBase + "hotnews/index.html\"><img src=\"" + tabImageBase + "HotNews_70x30s.gif\" height=\"30\" width=\"70\" "+
					 "border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "hotnews/index.html\">" +
				 "<img src=\"" + tabImageBase + "HotNews_70x30.gif\" height=\"30\" width=\"70\" "+
				 "border=\"0\"></a>";
	} 
	
	if ( myURL.indexOf( "/events/" ) > 0) { 			 
		strOutput += "<a href=\"" + linkURLBase + "events/index.html\"><img src=\"" + tabImageBase + "Events_58x30s.gif\" height=\"30\" width=\"58\" "+
					 "border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "events/index.html\">" +
				 "<img src=\"" + tabImageBase + "Events_58x30.gif\" height=\"30\" width=\"58\" "+
				 "border=\"0\"></a>";
	} 
				 
	if ( myURL.indexOf( "/knowledgebank/" ) > 0) { 			 
		strOutput += "<a href=\"" + linkURLBase + "knowledgebank/index.html\"><img src=\"" + tabImageBase + "KnowledgeBank_116x30s.gif\" height=\"30\" width=\"116\" "+
					 "border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "knowledgebank/index.html\">"+
					 "<img src=\"" + tabImageBase + "KnowledgeBank_116x30.gif\" height=\"30\" width=\"116\" "+
					 "border=\"0\"></a>";
	}				 
				 
	if ( myURL.indexOf( "/store/" ) > 0) { 			 
		strOutput += "<a href=\"" + linkURLBase + "store/index.html\"><img src=\"" + tabImageBase + "Store_58x30s.gif\" height=\"30\" "+
					 "width=\"58\" border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "store/index.html\"><img src=\"" + tabImageBase + "Store_58x30.gif\" height=\"30\" "+
					 "width=\"58\" border=\"0\"></a>";
	}
	
	
	//if ( myURL.indexOf( "/forum/" ) > 0) { 			 
	//	strOutput += "<a href=\"" + linkURLBase + "forum/index.php\"><img src=\"" + tabImageBase + "Forum_58x30s.gif\" height=\"30\" "+
	//				 "width=\"58\" border=\"0\"></a>";
	//}
	//else {
	//	strOutput += "<a href=\"" + linkURLBase + "forum/index.php\"><img src=\"" + tabImageBase + "Forum_58x30.gif\" height=\"30\" "+
	//				 "width=\"58\" border=\"0\"></a>";
	//}
	
	if ( myURL.indexOf( "/investor/" ) > 0) { 			 
		strOutput += "<a href=\"" + linkURLBase + "investor/singapore/index.php\"><img src=\"" + tabImageBase + "Investor_58x30s.gif\" height=\"30\" "+
					 "width=\"58\" border=\"0\"></a>";
	}
	else {
		strOutput += "<a href=\"" + linkURLBase + "investor/singapore/index.php\"><img src=\"" + tabImageBase + "Investor_58x30.gif\" height=\"30\" "+
					 "width=\"58\" border=\"0\"></a>";
	}
	
	strOutput += "</td>";
				 
	strOutput += "</tr>";

	strOutput += "<tr background=\""+ tabImageBase + "SubmenuFiller.gif\">";
	
	strOutput += "<td align=\"left\" height=\"18\" background=\"" + tabImageBase + "SubmenuFiller.gif\">";
	strOutput += "<!--<span class=\"menuTab\"><a class=\"menuTab\" href=\"http://www.goldzoneeducation.com/forum/index.php\">Goldzone Client Discussion Forum</a></span>-->";
	strOutput += "</td>";
	
	//Level 2 Menu links

	if (( _userFName == null ) && ( _userLName == null )) {
		strOutput += "<td align=\"right\" height=\"18\" background=\"" + tabImageBase + "SubmenuFiller.gif\">";
		
		strOutput += "<span class=\"menuTab\">Members: <a class=\"menuTab\" href=\"http://www.goldzoneeducation.com/myaccount/register.html\">register</a> | ";
		strOutput += "<a class=\"menuTab\" href=\"http://www.goldzoneeducation.com/myaccount/login.html\">log in</a></td>";
	}
	else {
		strOutput += "<td align=\"right\" height=\"18\" background=\"" + tabImageBase + "SubmenuFiller.gif\">";
		strOutput += "<span class=\"menuTab\">welcome " + _userFName + " " + _userLName + " | ";
		strOutput += "<a class=\"menuTab\" href=\"https://violet.goldzoneeducation.com/fmi/xsl/site/trax/update.xsl?Client_First=" + _userFName + "&Client_Last=" + _userLName + "&Client_Number=" + _number +  "\">my account</a> | ";
		strOutput += "<a class=\"menuTab\" href=\"http://www.goldzoneeducation.com/home.html\" onclick=\"siteCookieD();\">logout</a></span></td>";
	}

	strOutput += "</tr></table></td><td width=\"49%\" background=\"" + tabImageBase + "FillerEnd1.gif\"></td>" +
	 			 "</tr></table>";
	
	
	
	document.write( strOutput );
	document.close();
	
	write_path();
	
	
}	

function getCalendarDate()
{
   var months = new Array(13);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateString = monthname + 
                    ' ' + 
                    monthday + 
                    ', ' + 
                    year;
   return dateString;
}

function getEventCalDate()
{
   var months = new Array(13);
   months[0]  = "Jan";
   months[1]  = "Feb";
   months[2]  = "Mar";
   months[3]  = "Apr";
   months[4]  = "May";
   months[5]  = "Jun";
   months[6]  = "Jul";
   months[7]  = "Aug";
   months[8]  = "Sep";
   months[9]  = "Oct";
   months[10] = "Nov";
   months[11] = "Dec";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   
   if(year < 2000) { year = year + 1900; }
   var yearplusone = year + 1;
   
   var dateString = monthname + 
                    ' ' + 
                    monthday + 
                    ', ' + 
                    year +
                    ' - ' +
                    monthname + 
                    ' ' + 
                    monthday + 
                    ', ' + 
                    yearplusone;

   return dateString;
}




function write_header_min()
{
	var myURL = ( document.URL );

	determinePath();	
	
	//header Stuff
	strOutput = "<a id=\"top\" name=\"top\"></a>";
	
	strOutput += "<img src=\"" + headImageBase + "Header.gif\" height=\"46\" width=\"750\" border=\"0\">";
	
	//Menu Tabs
	strOutput += "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
	strOutput += "<tr><td width=\"49%\" background=\"" + tabImageBase + "menu_bg1.gif\">" +
				 "</td><td>";
	
	
	strOutput += "<table width=\"750\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" +
				 "<tr><td>";

	strOutput += "</td>";

		
				 
	strOutput += "</tr>";

	strOutput += "<tr background=\""+ tabImageBase + "SubmenuFiller.gif\">";
				 
	
	
	strOutput += "</tr></table></td><td width=\"49%\" background=\"" + tabImageBase + "FillerEnd1.gif\"></td>" +
	 			 "</tr></table>";
	
	strOutput  += "<p><img src=\"" + siteImageBase + "Filler_Orange.gif\" width=\"749\" height=\"1\" border=\"0\"></p>";
	strOutput += "<br>";
	
	
	document.write( strOutput );
	document.close();	
}	

function openWindow(theURL,winName,features) 
{ 
  var _W=window.open(theURL,winName,features);
          _W.focus();
      _W.moveTo(50,50); 
} 


/*
---------------------------------------------------------------------||
 FUNCTION:    sSetCookie                                              ||
 PARAMETERS:  name, value, expiration date, path, domain, security   ||
 RETURNS:     Null                                                   ||
 PURPOSE:     Stores a cookie in the users browser                   ||
---------------------------------------------------------------------||
*/
function sSetCookie (name,value,expires,path,domain,secure) {
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );

	/*
	if the expires variable is set, make the correct 
	expires time, the current script below will set 
	it for x number of days, to make it for hours, 
	delete * 24, for minutes, delete * 60 * 24
	*/
	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	
	var expires_date = new Date( today.getTime() + (expires) );




   document.cookie = name + "=" + escape (value) +
                     ((expires) ? "; expires=" + expires_date.toGMTString() : "") +
                     ((path) ? "; path=" + path : "") +
                     ((domain) ? "; domain=" + domain : "") +
                     ((secure) ? "; secure" : "");
                     
}

/*
---------------------------------------------------------------------||
 FUNCTION:    sDeleteCookie                                           ||
 PARAMETERS:  Cookie name, path, domain                              ||
 RETURNS:     null                                                   ||
 PURPOSE:     Removes a cookie from users browser.                   ||
---------------------------------------------------------------------||
*/
function sDeleteCookie (name,path,domain) {
	//alert("delete cookie");
	if ( sGetCookie(name) ) {
      document.cookie = name + "=" +
                        ((path) ? "; path=" + path : "") +
                        ((domain) ? "; domain=" + domain : "") +
                        "; expires=Thu, 01-Jan-70 00:00:01 GMT";
   }
}

/*
---------------------------------------------------------------------||
 FUNCTION:    sgetCookieVal                                           ||
 PARAMETERS:  offset                                                 ||
 RETURNS:     URL unescaped Cookie Value                             ||
 PURPOSE:     Get a specific value from a cookie                     ||
---------------------------------------------------------------------||
*/
function sgetCookieVal (offset) {
   var endstr = document.cookie.indexOf (";", offset);

   if ( endstr == -1 )
      endstr = document.cookie.length;
   return(unescape(document.cookie.substring(offset, endstr)));
}

/*
---------------------------------------------------------------------||
 FUNCTION:    sGetCookie                                              ||
 PARAMETERS:  Name                                                   ||
 RETURNS:     Value in Cookie                                        ||
 PURPOSE:     Retrieves cookie from users browser                    ||
---------------------------------------------------------------------||
*/
function sGetCookie (name) {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
		
   while ( i < clen ) {
      var j = i + alen;
      if ( document.cookie.substring(i, j) == arg ) {
      	return(sgetCookieVal (j));
      }
      
      i = document.cookie.indexOf(" ", i) + 1;
      if ( i == 0 ) break;
      
   }

   return(null);
}

function siteCookieD() {
	//alert("logout");
	sDeleteCookie( "GZAccount", "/", "goldzoneeducation.com");
	//document.URL = "http://www.goldzonecenter.com/home.html"
}

function siteCookieW(firstname, lastname, user, number) {
	//alert("In Write Cookie!");
	
	logininfo =		firstname	+ "|" +
					lastname	+ "|" +
					user		+ "|" +
					number;
				
	//sSetCookie("GZAccount", logininfo, null, "/", "goldzonecenter.com", 0);
	sSetCookie("GZAccount", logininfo, 1, "/", "goldzoneeducation.com", 0);
}

function siteCookie2007W(Rec_id, Link_id,  FMrec_id) {
	
	logininfo =		Rec_id	+ "|" +
					Link_id	+ "|" +
					FMrec_id;
				
	sSetCookie("GZLogin2007", logininfo, 1, "/", "goldzoneeducation.com", 0);
}


function siteCookieR() {
	//alert("In Read Cookie!");
	database = "";
	database = sGetCookie("GZAccount");
		
	if ( database == null ) {
		_userFName = null;
		_userLName = null;
		_user      = null;
		_number    = null;
	}
	else {
		  
		Token0 = database.indexOf("|", 0);   
		Token1 = database.indexOf("|", Token0+1);
        Token2 = database.indexOf("|", Token1+1);
        Token3 = database.indexOf("|", Token2+1);
		
		_userFName = database.substring( 0, 	   Token0 );
		_userLName = database.substring( Token0+1, Token1 ); 
		_user	   = database.substring( Token1+1, Token2 );
		_number	   = database.substring( Token2+1, database.length ); 
	
		
	}
}

function siteCookie2007R() {
	database = "";
	database = sGetCookie("GZLogin2007");
		
	if ( database == null ) {
		_Rec_id = null;
		_Link_id = null;
		_FMrec_id      = null;
	}
	else {
		  
		Token0 = database.indexOf("|", 0);   
		Token1 = database.indexOf("|", Token0+1);
        Token2 = database.indexOf("|", Token1+1);
		
		_Rec_id = database.substring( 0, 	   Token0 );
		_Link_id = database.substring( Token0+1, Token1 ); 
		_FMrec_id	   = database.substring( Token1+1, Token2 );
		
	}
}

function genuserid() {
       	var today = new Date() 
		var year  = today.getFullYear()
		var month = today.getMonth() + 1
		var day   = today.getDate()
		var hour  = today.getHours()
		var minu  = today.getMinutes()
		var sec   = today.getSeconds()
		var msec  = today.getMilliseconds()
		var oid
		
		if ( month < 10 )
			month = "0" + month;
		if ( day < 10 )
			day = "0" + day;
		if ( hour < 10 )
			hour = "0" + hour;
		if ( minu < 10 )
			minu = "0" + minu;
		if ( sec < 10 )
			sec = "0" + sec;
		if ( msec < 100 )
			msec = "0" + msec;
		
		oid = ""+year+month+day+hour+minu+sec+msec;
		
		strOutput = "<input name=\"UserID\" type=\"hidden\" readonly=\"\" value=\"" + oid + "\"/>"
		document.write(strOutput);
	   	document.close();
		
  	 return(oid);
}