// JavaScript Document
//Only modify this script to update new service -justin
function genTag(headText,tags,url,notes){

	var iconAry=
		new Array(
			"blinkit.bmp",
			"delicious.bmp",
			"furl.bmp",
			"gnolia.bmp",
			"simpy.bmp",
			"spurl.bmp",
			"yahoo.bmp",
			"reddit.bmp",
			"netyouz.bmp",
			"live.gif",
			"facebook.gif",
			"google.png",
			"ask.png",
			"digg.png",
			"su.png"
			
			);
	var serviceName=
		new Array(
				  "BlinkIt",
				  "de.li.cio.us",
				  "Furl",
				  "Gnolia",
				  "Simpy",
				  "SPURL",
				  "Yahoo",
				  "Reddit",
				  "NetYouz",
				  "Live",
				  "FaceBook",
				  "Google",
				  "Ask",
				  "Digg",
				  "StumbleUpon"
				  
				  );
	var serviceAry=
		new Array(
			"http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=[HURL]&Title=[HTITLE]&Tag=[HTAG]&Description=[HNOTE]",
			"http://del.icio.us/post?url=[HURL]&title=[HTITLE]&tags=[HTAG]&notes=[HNOTE]",
			"http://www.furl.net/storeIt.jsp?u=[HURL]&t=[HTITLE]",
			"http://ma.gnolia.com/bookmarklet/add?url=[HURL]&title=[HTITLE]&tags=[HTAG]&description=[HNOTE]",
			"http://simpy.com/simpy/LinkAdd.do?href=[HURL]&note=[HTITLE]&tags=[HTAG]",
			"http://www.spurl.net/spurl.php?url=[HURL]&title=[HTITLE]&tags=[HTAG]",
			"http://myweb2.search.yahoo.com/myresults/bookmarklet?u=[HURL]&t=[HTITLE]&tag=[HTAG]&d=[HNOTE]",
			"http://reddit.com/submit?url=[HURL]&title=[HTITLE]",
			"http://www.netvouz.com/action/submitBookmark?url=[HURL]&title=[HTITLE]&popup=no&tags=[HTAG]&description=[HNOTE]",
			"https://favorites.live.com/quickadd.aspx?marklet=0&mkt=en-us&url=[HURL]&title=[HTITLE]&top=0",
			"http://www.facebook.com/sharer.php?u=[HURL]",
			"http://www.google.com/bookmarks/mark?op=add&bkmk=[HURL]&title=[HTITLE]&zx=wgdq5kXy04c",
			"http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url=[HURL]&title=[HTITLE]&abstext=[HNOTE]",
			"http://digg.com/submit/?phase=2&url=[HURL]&title=[HTITLE]",
			"http://www.stumbleupon.com/submit?url=[HURL]&title=[HTITLE]"
		);
		
	var shtml="";
	
	/*var breakpoint = Math.ceil(iconAry.length/3);
	
	for (var j=0; j< iconAry.length; j=j+breakpoint) {
		shtml+="<div style='width:90px; float:left; text-align:left;'>"
		for(var i=j;i<j+breakpoint;i++){
			var tURL=  serviceAry[i];
				tURL=tURL.replace("[HTAG]",tags);
				tURL=tURL.replace("[HTITLE]",headText);
				tURL=tURL.replace("[HURL]",url);
				tURL=tURL.replace("[HNOTE]",notes);
				shtml+="<a href='"+tURL+"' target='_new'><img src=../images/icons/"+iconAry[i]+" border=0 title='Bookmark to "+serviceName[i]+"' onmouseover='this.style.border'> " +serviceName[i] +"</a><BR>";
		}
		shtml += "</div>"
	}
	*/
	
		for(var i=0;i<iconAry.length;i++){
			shtml+="<div style='width:30px; float:left; text-align:left;'>"
			var tURL=  serviceAry[i];
				tURL=tURL.replace("[HTAG]",tags);
				tURL=tURL.replace("[HTITLE]",headText);
				tURL=tURL.replace("[HURL]",url);
				tURL=tURL.replace("[HNOTE]",notes);
				shtml+="<a href='"+tURL+"' target='_new'><img src=../images/icons/"+iconAry[i]+" border=0 title='Bookmark to "+serviceName[i]+"' onmouseover='this.style.border'></a><BR>";
			shtml += "</div>"
		}
		
	document.write(shtml);
	//alert(shtml);
}

function showHindLink(divid, show) {
	obj = document.getElementById(divid);
	if (obj) {
		if (show) {
			obj.style.display = 'block';
		}
		else {
			obj.style.display = 'none';
		}
	}
}
