function popUp(URL) {
	day = new Date();
	id = day.getTime();
	var viewerWindow;
	viewerWindow = window.open(URL, '' + id + '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=400,height=500,left = 550,top = 0');

}


function conditionalTableMenu(layer) {
	var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
                parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
	var isMinIE4 = (document.all) ? 1 : 0;
	var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;

	var tableMenu;
	if(document.layers) {
		document.all = document.layers;
		tableMenu = document.layers.tableMenu;
		tableMenu.visibility = "hide";
	} else {
		tableMenu = document.all.tableMenu;
		tableMenu.style.visibility = "hidden";
	}
}

// "Quantum Singularity" search engine.
// Authored by Akshay Kalle, updated last on May 5, 2000.
// This utility is public domain and updates are encouraged.
// The only restriction is that it be Navigator 4 compliant
// and that the simple nature of the utility is left intact.


function RunQuery(form) {
  var i, newq="";
  oldq=form.query.value
  var type=form.which.selectedIndex  
  var engine=form.which.options[type].value

// URL encoder
  for (i=0; i<oldq.length; i++) {  
    var thischar = oldq.charAt(i);
    if (thischar != ' ')
    newq += thischar;
    else if (lastchar != ' ')
    newq += '+';
    lastchar = thischar;
  }
// end mark URL encoder

// start if statements here
	if (engine=='altavista') { 
		var mlocation = 'http://www.altavista.com/sites/search/web?q=' + newq + '&pg=q&kl=XX&search=Search';
	}
	else if (engine=='excite') {
		var mlocation = 'http://msxml.excite.com/info.xcite/dog/results?otmpl=dog/webresults.htm&qkw=' + newq;
	}

	else if (engine=='northernLight') {
		var mlocation = 'http://www.northernlight.com/nlquery.fcg?cb=0&qr=' + newq + '&si=&search.x=41&search.y=8';
	}
	
	else if (engine=='metacrawler') {
		var mlocation = 'http://search.metacrawler.com/crawler?general=' + newq + '&method=0&redirect=&rpp=20&hpe=10&region=0&timeout=0&sort=0&theme=classic&refer=mc-search&ext_fromform=qsearch&ext_qhqn=&ext_wqhqn=&ext_qc=&ext_qs=&cid=200463&area=mc.mainpage.yp&site=mc&shape=plug';
	}

	else if (engine=='ixquick') {
		var mlocation = 'http://ixquick.com/do/metasearch.pl?cat=web&cat=web&cmd=process_search&language=english&query=' + newq;
	}

	else if (engine == 'infomine') {
		var mlocation = 'http://infomine.ucr.edu';
	}

	else if (engine=='askJeeves') {
		var mlocation = 'http://www.ask.com/main/askjeeves.asp?ask=' + newq + '&o=0&x=19&y=18';
	}

	else if (engine=='hotbot') {
		var mlocation = 'http://hotbot.lycos.com/?MT=' + newq + '&SM=MC&DV=0&LG=any&DC=10&DE=2&AM1=MC&x=45&y=14';
	}

	else if (engine=='infoseek') {
		var mlocation = 'http://www.overture.com/d/search/p/go/?Partner=go_home&Keywords=' + newq;
	}
	else if (engine=='lycos') {
		var mlocation = 'http://www.lycos.com/cgi-bin/pursuit?query=' + newq + '&backlink=639' ;
	}
	else if (engine=='magellan') {
		var mlocation = 'http://www.mckinley.com/extsearch.cgi?query=' + newq ;
	}
	else if (engine=='opentext') {
		var mlocation = 'http://search.opentext.com/omw/simplesearch?SearchFor=' + newq + '&mode=and' ;
	}
	else if (engine=='webcrawler') {
		var mlocation = 'http://query.webcrawler.com/cgi-bin/WebQuery?searchText=' + newq + '&maxHits=25' ;
	}
	else if (engine=='yahoo') {
		var mlocation = 'http://search.yahoo.com/bin/search?p=' + newq ;
	}
	else if (engine =='google') {
		var mlocation = 'http://www.google.com/search?q=' + newq + '&btnG=Google+Search';
	}
	else if (engine =='icq') {
		var mlocation = 'mailto:5795181@icq.com' + newq;
	}

	else if (engine =='allTheWeb') {
		var mlocation = 'http://www.alltheweb.com/search?cat=web&lang=any&query=' + newq;
	}
	else if (engine =='msn') {
		var mlocation = '	http://search.msn.com/results.aspx?q=' + newq;
	}
	else if (engine =='dogpile') {
		var mlocation = 'http://www.dogpile.com/info.dogpl/search/web/' + newq;
	}
		else if (engine =='msn') {
		var mlocation = 'http://search.msn.com/results.aspx?q=' + newq;
	}
		else if (engine =='looksmart') {
		var mlocation = 'http://www.looksmart.com/r_search?key=' + newq;
	}
		else if (engine =='opendirectory') {
		var mlocation = 'http://search.dmoz.org/cgi-bin/search?search=' + newq;
	}
		else if (engine =='overture') {
		var mlocation = 'http://www.overture.com/d/search/?type=home&mkt=us&Keywords=' + newq;
	}
	else if (engine =='netscape') {
		var mlocation = 'http://search.netscape.com/nscp_results.adp?source=NSCPIndex&query=' + newq;
	}
	else if (engine =='wisenut') {
		var mlocation = 'http://www.wisenut.com/search/query.dll?q=' + newq;
	}
	else if (engine =='beaucoup') {
		var mlocation = 'http://www.findtarget.com/cb/beaucoup.php?q=' + newq;
	}

		yourWindow = window.open(""+mlocation+"", "DisplayWindow","toolbar=yes,align=left,status=1,directories=yes,menubar=yes,resizable=yes,scrolling=yes,scrollbars=yes,			width=710,height=490,location=yes,copyhistory=yes,history=yes");

	// finish if and stunt statements here 

}
