 function getAjax(){
  var ajax=false; 
  try { 
   ajax = new ActiveXObject("Msxml2.XMLHTTP"); 
  } catch (e) { 
   try { 
    ajax = new ActiveXObject("Microsoft.XMLHTTP"); 
   } catch (E) { 
    ajax = false; 
   } 
  }
  if (!ajax && typeof XMLHttpRequest!='undefined') { 
   ajax = new XMLHttpRequest(); 
      if (ajax.overrideMimeType) 
			 {
       ajax.overrideMimeType('text/xml');
	   }
  } 
  return ajax;
 }
 
 function show(serverPage,objID){
  var serverPage;	 
  var objdiary = document.getElementById(objID);
  serverPage +="?"+Math.random();
  var ajaxFri = getAjax();   
  ajaxFri.open("GET", serverPage, true); 
  ajaxFri.onreadystatechange = function() { 
   if (ajaxFri.readyState == 4 && ajaxFri.status == 200) { 
    var text = ajaxFri.responseText; 
    if(text!=0){
     objdiary.innerHTML=text;
    }
   } 
  } 
    ajaxFri.send(null); 
 }

 
 
 
 	var title = window.document.title;
	var description = "";

function bookmarksite(title,url){
		if (window.sidebar) {
			window.sidebar.addPanel(title, url, "");

		} else if(window.opera && window.print) {
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();

		} else if(document.all) {
			window.external.AddFavorite(url, title);
		}
	}

	function loadPage(site, pageTitle, pageDescription) {
		var rawURL = window.location.href;
		rawURL = rawURL.replace("#", "");

		if (rawURL.indexOf("SRCCODE=") > 0) {
			rawURL = rawURL.replace("SRCCODE=", "SRCCODE=WEBDIGG&OLDSRC=");
		} else if (rawURL.indexOf("?") > 0) {
			rawURL = rawURL + "&SRCCODE=WEBDIGG";
		} else {
			rawURL = rawURL + "?SRCCODE=WEBDIGG";
		}

		var currentURL = encodeURIComponent(rawURL);
		var title = encodeURIComponent(pageTitle);

		var bodytext = encodeURIComponent(pageDescription);

		var newURL;
		var go = true;

		switch (site) {
			case "del.icio.us":
				newURL = "http://del.icio.us/post?v=4"
				+ ";url=" + currentURL
				+ ";title=" + title;
			break;
			case "digg":
				newURL = "http://digg.com/submit?phase=2&"

				+ "url=" + currentURL

				+ "&title=" + title

				+ "&bodytext=" + bodytext

				+ "&topic=tech_deals";

			break;
			case "reddit":
				newURL = "http://reddit.com/submit?"
				+ "url=" + currentURL
				+ "&title=" + title;
			break;
			case "furl":
				newURL = "http://www.furl.net/savedialog.jsp?"
				+ "t=" + title
				+ "&u=" + currentURL;
			break;
			case "rawsugar":
				newURL = "http://www.rawsugar.com/home/extensiontagit/?turl=" + currentURL
				+ "&tttl=" + title;
			break;
			case "stumbleupon":
				newURL= "http://www.stumbleupon.com/submit?url=" + currentURL
				+ "&title=" + title;
			break;
			case "blogmarks":
				
			break;
			case "facebook":
				newURL = "http://www.facebook.com/share.php?src=bm&v=4" 
				+ "&u=" + currentURL
				+ "&t=" + title;
			break;
			case "technorati":
				newURL = "http://technorati.com/faves?sub=favthis&add=" + currentURL;
			break;
			case "spurl":
				newURL = "http://www.spurl.net/spurl.php?v=3"
				+ "&title=" + title
				+ "&url=" + currentURL;
			break;
			case "simpy":
				newURL= "http://www.simpy.com/simpy/LinkAdd.do?title=" + title
				+"&href=" + currentURL;
			break;
			case "ask":
				
			break;
			case "google":
				newURL = "http://www.google.com/bookmarks/mark?op=edit&output=popup"
				+ "&bkmk=" + currentURL
				+ "&title=" + title;
			break;
			case "netscape":
				newURL = "http://www.netscape.com/submit/?U=" + currentURL
				+ "&T=" + title + "&C=" + bodytext;
			break;
			case "fark":
				
			break;
			case "slashdot":
				newURL = "http://slashdot.org/bookmark.pl?url=" + rawURL + "&title=" + title;
			break;
			case "backflip":
				newURL= "http://www.backflip.com/add_page_pop.ihtml?" 
				+ "title=" + title
				+ "&url=" + currentURL;
			break;
			case "wink":
				
			break;
			case "bluedot":
				newURL = "http://bluedot.us/Authoring.aspx?"
				+ "u=" + currentURL
				+ "&t=" + title;
			break;
			case "browser":
				bookmarksite(pageTitle, rawURL);
				go = false;
			break;
		}

		if (go == true) {
			window.open(newURL, "bookmarkWindow");
		}
	}

/*-- slip door --*/
function g(o){return document.getElementById(o);} 
function HoverLi(n){ 
 for(var i=1;i<=2;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab'; 
} 

