//
// Author: Roger D. Hosto Jr.
// Copyright 2004: WEB-GEEK.COM
// website: http://www.web-geek.com
//

// Easy Edit Settings

var image_url = "http://www.web-geek.com/art/web-geek_logo.jpg"; //Your web-site logo
var site_url = "http://www.web-geek.com"; //Your web-site url

// Google Settings use For Search The Web And Search this Site
var google_sitesearch = "www.web-geek.com"; //this the url that google will search 
var google_client = "pub-8941625526820831"; //if you have google adsense search account change this to your pub id
var google_channel = "6632455109"; // this for google adsense channel

// Ebay Settings use for Search Ebay 
// if you are a memeber of cj and are an affiliate of ebay change the follow for you account
var ebayCJ_PID = "1572564"; 
var ebayCJ_AID = "7088803";
var ebayCJ_SID = "WBSEARCH";

//Amazon Settings use for Search Amazon 
var AmazonSiteId = "webgeekcom"; // This is for amazon affiliates

var ie5=document.all && document.getElementById;
var ns6=document.getElementById && !document.all;
var nn4=document.layer;
var pagetitle = "WEB-GEEK.COM - Geek's Portal";

function errorsuppressor()
{
        return true;
}

window.onerror=errorsuppressor;

function RollOn(menuItem,color)
{
	if(ie5)
	{
		document.all[menuItem].style.backgroundColor = color;
	}
	else if(ns6)
	{
		document.getElementById(menuItem).style.backgroundColor = color;
	}
}
function RollOff(menuItem,color)
{
	if(ie5)
	{
		document.all[menuItem].style.backgroundColor = color;
	}
	else if(ns6)
	{
		document.getElementById(menuItem).style.backgroundColor = color;
	}
}
function my_win(url,name,width,height)
{
	var placeTop = (screen.height/2)-(height/2);;
        var placeLeft = (screen.width/2)-(width/2);

	window.open(url,name,'width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,top='+placeTop+',left='+placeLeft);
}
function DoNavBar()
{
	width = screen.width;
	height = screen.height;

	if(document.form1.nav.selectedIndex != 0)
	{

		var url = document.form1.nav[document.form1.nav.selectedIndex].value;

		window.open(url,'X10Browser','width='+width+',height='+height+',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,top=0,left=0');
		
	}
}
function addNetscapePanel()
{
      if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
      {
         window.sidebar.addPanel ("WEB-GEEK.COM - Internet Tool Bar","http://www.web-geek.com/ns_sidebar.html","");
      }
      else
      {
         var rv = window.confirm ("This page is enhanced for use with Netscape 6.  " + "Would you like to upgrade now?");
         if (rv)
            document.location.href = "http://home.netscape.com/download/index.html";
      }
}
function sbmesg(text) {
 
        window.status=text;
 
}
function ptmesg() {
 
        window.status=pagetitle;
 
}
function setmesg(text) {
 
        pagetitle=text;
 
        window.status=text;
 
}
function addBookmark()
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
	{

        	window.external.AddFavorite (location.href,document.title);

	}
	else
	{
        	var msg = "To bookmark us use";
       	if(navigator.appName == "Netscape") 
			msg += "  (CTRL-D)";
        	alert(msg);
	}

}
function switcher() {

        var item = document.search.type.options[document.search.type.selectedIndex].value;
	var q = document.search.q.value;
	var link = "";


	//Search this site
	if(item == 1) {

		q = escape(q);

		/*link = "/cgi-bin/htsearch?config=webgeek&method=or&format=long&sort=score&words="+q;*/
		link = "http://www.google.com/custom?q="+q;
		link += "&sa=Search";
		link += "&sitesearch="+google_sitesearch;
		link += "&client="+google_client;
		link += "&forid=1";
		link += "&channel="+google_channel;
		link += "&ie=ISO-8859-1";
		link += "&oe=ISO-8859-1";
		link += "&cof="+escape("GALT:#008000;GL:1;DIV:#DDDDDD;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:464;L:"+image_url+";S:"+site_url+";FORID:1;");
		link += "&hl=en";

	//Search the web
	} else if(item == 2) {

		q = escape(q);

		link = "http://www.google.com/custom?q="+q;
		link += "&sa=Search";
		link += "&client="+google_client;
		link += "&forid=1";
		link += "&channel="+google_channel;
		link += "&ie=ISO-8859-1";
		link += "&oe=ISO-8859-1";
		link += "&cof="+escape("GALT:#008000;GL:1;DIV:#DDDDDD;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:464;L:"+image_url+";S:"+site_url+";FORID:1;");
		link += "&hl=en";

	//nslookup
	} else if(item == 3) {

		q = escape(q);

		link = "http://www.web-geek.com/cgi-bin/nslookup.cgi?url="+q+"&link="+site_url+"&image="+image_url;

	//ping
	} else if(item == 4) {

		link = "http://www.web-geek.com/cgi-bin/ping.cgi?url="+q+"&link="+site_url+"&image="+image_url;

	//whois
	} else if(item == 5) {

		var str = q.split(".");

		link = "http://www.web-geek.com/cgi-bin/who.cgi?name="+str[0]+"&com="+str[1]+"&link="+site_url+"&image="+image_url;

	//traceroute
	} else if(item == 6) {

		link = "http://www.web-geek.com/cgi-bin/traceroute.cgi?url="+q+"&link="+site_url+"&image="+image_url;

	//Ebay search 
	} else if(item == 7) {

		var eBayMP_partner = "711-1751-2978-321";

		var eBayRedirectURL = "http://www.qksrv.net/click-";
		eBayRedirectURL += ebayCJ_PID;
		eBayRedirectURL += "-";
		eBayRedirectURL += ebayCJ_AID;
		eBayRedirectURL += "?SID=";
		eBayRedirectURL += ebayCJ_SID;
		eBayRedirectURL += "&mpt=12345&mig=http://adfarm.mediaplex.com/ad/ck/";
		eBayRedirectURL += eBayMP_partner;
		eBayRedirectURL += "?mpt=12345&loc=";

		var eBayURL = "http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=";

		link = eBayRedirectURL + escape(eBayURL+q);

	} else if(item == 8) {

		var link = "http://www.amazon.com/exec/obidos/external-search?keyword="+escape(q)+"&mode=blended&tag="+AmazonSiteId;

	}

	location.href = link;

}

