<!--

function email(name,domain,tld)
{
 			var at = "@";
			var addy = domain;
			var dot = "."
			var com = tld
			location.href='mailto:'+name+at+addy+dot+com;
}

//get title
//get url
//generate email this page url
function emailthispage (url) {
	title = document.title;
	surl = location.href;
	url = url+'?title='+title+'&amp;surl='+surl;
	launchWindow(wnd,url,1,popupDefault);
}

function getObj(name) {
	if (document.getElementById) {
		return document.getElementById(name);
	} else if (document.all) {
		return document.all[name];
	} else {
	return document.layers[name];
	}
}

function closeAll(number) {
		var div;
 		for (var i=1; i<number; i++)
    {
				div=getObj('q' + i);
				div.style.display = "none";
    }
}

function toggle2(that, finalNum) {
//closeAll(854);
//  preCloseAll();
  var number = finalNum.width;
	closeAll(number);
	if (that.style.display == "none") {
		that.style.display = "inline";
	} else {
		that.style.display = "none";
	}
}

function switchSpots(i) {
closeAll(42);
div=getObj('q' + i);
div.style.display = "inline";
}

function popIt(index) {
  window.open(index, 'script', 'height=300,width=300,scrollbars=0,resizable=0,menubar=0,left=0,top=0');
}

function closeIt() {
	window.close();
}


function findState(){
location.hash = document.states.state.value;
}

//variables for javascript email to a friend script:
var sSubject = 'Interesting Web Page on ' + location.host;
var sBody    = 'Hello,\n\nI was just on the ' + location.host + ' site and noticed some content that may interest you.\n\nClick on this link to take a look: ' + location.href;
var sDisplay = 'E-mail This Page';

function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function

//-->