﻿// JScript File

<!--- Hall of Fame Ajax --->
function replace(file,element) {
	var http = false;
	
	try{
		// Opera 8.0+, Firefox, Safari
		http = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			http = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				http = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				//alert("Your browser broke!");
				return false;
			}
		}
	}
  http.open("GET", file, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4 && http.status == 200) {
      document.getElementById(element).innerHTML = http.responseText;
    }
  }
  http.send(null);
  return "";
}


function opinions(typ)
	{
	 if (typ=="yahoo")
	    {
	    mytarget="http://myweb2.search.yahoo.com/myresults/bookmarklet?t="+encodeURIComponent(document.title)+"&u="+encodeURIComponent(document.location.href)+" ";
	    window.open(mytarget);
	    }
	 if (typ=="fark")
	    {
	    mytarget="http://cgi.fark.com/cgi/fark/edit.pl?new_url="+encodeURIComponent(document.location.href)+"&new_comment="+encodeURIComponent(document.title)+"&new_link_other=&linktype=Misc";
	    window.open(mytarget);

	    }
	 if (typ=="digg")
	    {
	    mytarget="http://digg.com/submit?phase=2&url="+encodeURIComponent(document.location.href)+" ";
	    window.open(mytarget);

	    }
	 if (typ=="reditt")
	    {
	    mytarget="http://reddit.com/submit?url="+encodeURIComponent(document.location.href)+"&title="+encodeURIComponent(document.title)+" ";
	    window.open(mytarget);
	    
	    }
	 if (typ=="del")
	    {
	    mytarget="http://del.icio.us/post?v=2&url="+encodeURIComponent(document.location.href)+"&title="+encodeURIComponent(document.title)+" ";
	    window.open(mytarget);

	    }
	 if (typ=="newsvine")
	    {
	    mytarget="http://www.newsvine.com/_tools/seed&save?u="+encodeURIComponent(document.location.href)+"&h="+encodeURIComponent(document.title)+" ";
	    window.open(mytarget);

	    }
	 }

