// JavaScript Document
// This maintains header info throughout the site.
// done this way because otherwise the referrer is always different, and this loops endlessly


if (document.referrer.match("wtn.net") == "wtn.net") {
	//everything left of the query in the referrer string

	myleft = document.referrer.substr(document.referrer.first, document.referrer.indexOf('?'))
 
	// the query in the referrer string
	myright = document.referrer.substr(document.referrer.indexOf('?'), document.referrer.length)
 

	//if this document just referred itself (without the query string)
	if (document.referrer != myleft) {
   
   		if (myright.charAt(0)== '?') {
  			//append query string portion to the current location, thus negating the conditional
  			window.location = myright
  		}
	}
}
