<?xml version="1.0" encoding="UTF-8" ?>
<Module>

	<!-- 
	Del.icio.us Gadget
	Design & Code: LabPixies
	All subsequent code and resources used are proprietary of LabPixies unless directly stated otherwise.
	Copyright (C) 2008 LabPixies.    
	www.labpixies.com

	This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.
	To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/2.5/ or
	send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
	-->
	
	<ModulePrefs 
		height="422"
		author="LabPixies"
		author_email="info@labpixies.com"
		description="__MSG_desc__"
		thumbnail="http://cdn.labpixies.com/campaigns/delicious/images/thumbnail.jpg"
		screenshot="http://cdn.labpixies.com/campaigns/delicious/images/screenshot.png"
		title="__MSG_title__"
		render_inline="never"
		category="tools"   
		title_url="http://www.labpixies.com" >
		
		<Locale	messages="http://www.labpixies.com/campaigns/delicious/i19/all_all.xml"/>	
    <Locale lang="es" messages="http://www.labpixies.com/campaigns/delicious/i19/es_all.xml"/>
    <Locale lang="de" messages="http://www.labpixies.com/campaigns/delicious/i19/de_all.xml"/>
    <Locale lang="fr" messages="http://www.labpixies.com/campaigns/delicious/i19/fr_all.xml"/>
    <Locale lang="it" messages="http://www.labpixies.com/campaigns/delicious/i19/it_all.xml"/>
    <Locale lang="ja" messages="http://www.labpixies.com/campaigns/delicious/i19/ja_all.xml"/>
    <Locale lang="nl" messages="http://www.labpixies.com/campaigns/delicious/i19/nl_all.xml"/>
    <Locale lang="pl" messages="http://www.labpixies.com/campaigns/delicious/i19/pl_all.xml"/>
    <Locale lang="pt-PT" messages="http://www.labpixies.com/campaigns/delicious/i19/pt_all.xml"/>
    <Locale lang="pt-BR" messages="http://www.labpixies.com/campaigns/delicious/i19/pt_all.xml"/>
    <Locale lang="zh-CN" messages="http://www.labpixies.com/campaigns/delicious/i19/zh_cn_all.xml"/>

		<Require feature="setprefs" />
		<Require feature="analytics" /> 
		<Require feature="dynamic-height" />
		
	</ModulePrefs>
	
	<UserPref name="master_user"		datatype="hidden"			default_value="none" /> 
	
<Content type="html"> <![CDATA[
<title>Delicious</title>
<style type="text/css">
<!--
.style1 {font-size: 1px}
.style2 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #0000ff;
}
.style3 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #00000;
}
.style4 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #636363;
}
.style5 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
	color: #FFFFFF;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #0000ff; }
.style7 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #0000ff; font-weight: bold; }
a.style7:link{text-decoration:none;color:#0000ff;}
a.style7:hover{text-decoration:underline;color:#0000ff;}
a.style7:active{text-decoration:underline;color:#0000ff;}
a.style7:visited{text-decoration:underline;color:#0000ff;}
.style8 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #636363; }
.style9 {color: #000000}
a.style9:link{text-decoration:none;color:#000000;}
a.style9:hover{text-decoration:underline;color:#000000;}
a.style9:visited{text-decoration:none;color:#000000;}
a.style9:active{text-decoration:underline;color:#000000;}
.style10 {color: #FFFFFF}
.style11 {color: #0000FF}
.style13 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; }

.style13b{font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #0000ff; }
a.style13b:visited{text-decoration:none;}
a.style13b:link{text-decoration:none;}
a.style13b:hover{text-decoration:underline;}
a.style13b:active{text-decoration:underline;}

.style14 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; font-weight: bold;}
a.style14:link{text-decoration:none;color:#000000;}
a.style14:hover{text-decoration:underline;color:#000000;}
a.style14:visited{text-decoration:none;color:#000000;}
a.style14:active{text-decoration:underline;color:#000000;}

.style16 {
	color: #0000FF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
}
.style17 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; }
.style18 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0000FF; }
.tableborder {
	border: 1px solid #666666;
}
.style19 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #0000FF; }

-->
</style>

<!-- PUT THIS TAG IN THE head SECTION -->
<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
  GS_googleAddAdSenseService("ca-pub-8123415297019784");
  GS_googleEnableAllServices();
</script>
<script type="text/javascript">
  GA_googleAddSlot("ca-pub-8123415297019784", "my_delicious_txt");
</script>
<script type="text/javascript">
  GA_googleFetchAds();
</script>
<!-- END OF TAG FOR head SECTION -->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>

<script language="javascript">

	var _gadgetID=54;
	var $lp=jQuery.noConflict();
	var pageTracker;
	
	var IMAGES_BASE = 'http://cdn.labpixies.com/campaigns/delicious/images/';
	var trspnt = _IG_GetImageUrl(IMAGES_BASE+'transparent.gif');

	// Globals
	var prefs__MODULE_ID__;
	
	var mode = "HOTLIST";			// HOTLIST, BOOKMARKS , NETWORK
	var master_user = "none";		// none , TAG_SEARCH, USER_NAME
	var user = "none";				// none , TAG_SEARCH, USER_NAME
	
	var posted_by 		= new Array();	//array of users - link creators
	var link_tags 		= new Array();	//hold tags for each link
	var link_tags_gross = new Array();	//tags tooltip
	
	var bookmarks_title 	= new Array();
	var bookmarks_link 		= new Array();
	var bookmarks_date 		= new Array();
	var bookmarks_tags 		= new Array();
	var bookmarks_creator 	= new Array();
	var bookmarks_description = new Array();
	
	var hotlist_links = new Array();
	//----------------------------
	// Functions
	//----------------------------
	
	//init module
	function init_module__MODULE_ID__(){
		
		//set tabs bg color
		_gel("tab_hotlist").style.background			= "#0000FF";
		_gel("tab_bookmarks").style.background		= "#000000";
		_gel("tab_network").style.background		= "#000000";

		//load user
		prefs__MODULE_ID__ = new _IG_Prefs(__MODULE_ID__);
		user = prefs__MODULE_ID__.getString("master_user");
		master_user = user;		
		//check for user
		
		//set title decription
		_gel("title_description").innerHTML = "__MSG_hotlist_str__";
			
		//load del.icio.us hotlist
		tab_click("hotlist");
		
		if(user != "none"){
			_gel("edit_user_span").innerHTML = '|&nbsp;<span title="edit username" class="style2" onclick="edit_user_click();" style="cursor:pointer;">__MSG_edit__</span>&nbsp;';
		}
		_IG_AdjustIFrameHeight();   //added by Hilly when working on translations
	}
	
	// Handle tab click
	function tab_click(tab_name){
	
		//set bg color to black
		_gel("tab_hotlist").style.background		= "#000000";
		_gel("tab_bookmarks").style.background		= "#000000";
		_gel("tab_network").style.background		= "#000000";
		
		if(tab_name == "hotlist"){
			//set tab color to blue
			_gel("tab_hotlist").style.background = "#0000FF";
			
			//set mode
			mode = "HOTLIST";
		}
		
		//handle current tab choice
		if(tab_name == "bookmarks"){
			//set tab color to blue
			_gel("tab_bookmarks").style.background	= "#0000FF";
			
			//set mode
			mode = "BOOKMARKS";
		}
		
		if(tab_name == "network"){
			
			//set tab color to blue
			_gel("tab_network").style.background = "#0000FF";
			
			//set mode
			mode = "NETWORK";
			
			//reset state of this current tab view
			edit_state = 0;
		}
		
		//set title url
		setCurrentTitleURL();
		
		//set required html code
		setCurrentHTMLCode();
		
		//page
		page = 1;
		page_inc = 0;
		
		//data
		gotoDeliciousAndBringMeSomeData();
	}
	
	function gotoDelicious(){
		window.open("http://del.icio.us/");
	}
	function gotoDeliciousUser(user){
		window.open("http://del.icio.us/" + user);
	}
	
	// Handle Title URL 
	function setCurrentTitleURL(){
		if(mode=="HOTLIST"){
			_gel("title_url").innerHTML = '<span class="style3" onclick="gotoDelicious();" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" style="cursor:pointer">del.icio.us</span>';
			_gel("title_description").innerHTML = "Showing what&rsquo;s hot right now on del.icio.us";
		}
		
		if(mode=="BOOKMARKS"){
			if(user == "none"){
				_gel("title_url").innerHTML = '<span class="style11" onclick="gotoDelicious();" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" style="cursor:pointer">del.icio.us</span> /';
				_gel("title_description").innerHTML = "Search for users on del.icio.us";
			}
			else{
				_gel("title_url").innerHTML = '<span class="style11" onclick="gotoDelicious();" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" style="cursor:pointer">del.icio.us</span> / ' + '<span style="cursor:pointer" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" onclick="gotoDeliciousUser(\''+ user +'\');">' +  user + '</span>';
				_gel("title_description").innerHTML = "Showing " + user + "&rsquo;s bookmarks";
			}
		}
		
		if(mode=="NETWORK"){
			if(user == "none"){
				_gel("title_url").innerHTML = '<span class="style11" onclick="gotoDelicious();" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" style="cursor:pointer">del.icio.us</span> /';
				_gel("title_description").innerHTML = "Search for users on del.icio.us";
			}
			else{
				_gel("title_url").innerHTML = '<span class="style11" onclick="gotoDelicious();" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'"  style="cursor:pointer">del.icio.us </span>/<span class="style11" style="cursor:pointer" onclick="gotoDeliciousUser(\'' + user + '\');" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'"> ' + user + '</span> / network';
				_gel("title_description").innerHTML = "Bookmarks from " + user + "&rsquo;s network";
			}
		}
	}
	

	// Handle display HTML code
	function setCurrentHTMLCode(){
		
		//hotlist
		if(mode=="HOTLIST"){
							
			_gel("main_display_area").innerHTML = 
			
			'<table width="242" border="0" cellspacing="0" cellpadding="0" valign="top">' +
				'<tr><td height="6" class="style1">&nbsp;</td></tr>';
				
				for (var i=1 ; i<=5 ; i++){
				
				_gel("main_display_area").innerHTML += 
				
				'<tr>' +
					'<td height="52" valign="top">' +
						'<table width="242" height="52" border="0" cellpadding="0" cellspacing="0">' +
							'<tr>' +
								'<td width="46" valign="top"><img id="img_'+i+'" onclick="image_click('+i+');" src="'+_IG_GetImageUrl(IMAGES_BASE+'default.jpg')+'" border="1" style="border-color:#dddddd; cursor:pointer;" width="46" height="35" /></td>' +
								'<td width="10">&nbsp;</td>' +
								'<td width="186" valign="top">' +
									'<table width="186" border="0" cellspacing="0" cellpadding="0">' +
										'<tr>' +
											'<td>' +
												'<table width="186" border="0" cellspacing="0" cellpadding="0">' +
													'<tr>' +
														'<td width="186" height="28" valign="top" class="style7" id="title_'+i+'">&nbsp;</td>' +
														//'<td width="160" height="28" valign="top" class="style7" id="title_'+i+'">&nbsp;</td>' +
														//'<td width="3"  style="fonst-size:1px;">&nbsp;</td>' +
														//'<td width="23" style="fonst-size:1px;" id="add_to_del'+i+'">&nbsp;</td>'+
													'</tr>' +
												'</table>' +
											'</td>' +
										'</tr>' +
										'<tr>' +
											'<td height="14" bgcolor="#dddddd">' +
												'<table width="186" border="0" cellspacing="0" cellpadding="0">' +
													'<tr>' + '<td width="30" class="style2" style="color:black;" valign="top">__MSG_tags__:&nbsp;</td>' +
														'<td class="style8"><div id="gray_td_1_'+i+'" style="width:156px; height:14px; overflow:hidden;"><span class="style9" id="posted_'+i+'">&nbsp;</span></div></td>' +
													'</tr>' +
												'</table>' +
											'</td>' +
										'</tr>' +
									'</table>' +
								'</td>' +
							'</tr>' +
						'</table>' +
					'</td>' +
				'</tr>';
				
				}
				
			_gel("main_display_area").innerHTML +=  '</table>';
		}
		
		//  bookmarks
		if(mode=="BOOKMARKS"){
			if(user!="none"){
				
				_gel("main_display_area").innerHTML = 
				
				'<table width="242" border="0" cellspacing="0" cellpadding="0">' +   
				    '<tr><td valign="top"><table width="242" border="0" cellpadding="0" cellspacing="0">'+
					'<tr><td width="20" height="19" align="center" id="bookmark_img_1"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_1"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_2"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_2"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_3"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_3"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_4"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_4"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_5"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_5"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_6"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_6"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_7"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_7"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_8"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_8"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_9"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_9"  width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_10" valign="middle"><img  src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_10"   width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_11" valign="middle"><img  src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_11"   width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_12" valign="middle"><img  src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_12"   width="222" height="19" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="19" align="center" id="bookmark_img_13" valign="middle"><img  src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_13"   width="222" height="19" class="style14">&nbsp;</td></tr>' +
				'</table></td></tr><tr><td>'+         
				'<table width="242" border="0" cellspacing="0" cellpadding="0">'+
				'<tr><td width="121" style="color:gray; cursor:default;" id="back_button">&nbsp;</td><td width="121" style="color:gray; cursor:default;" id="more_button">&nbsp;</td></tr>'+
				'</table>'+
				'</td></tr></table>';
				
			}
			if(user=="none"){
			
				_gel("main_display_area").innerHTML = 
				
				'<table width="242" height="262" border="0" cellpadding="0" cellspacing="0">' +
				    '<tr><td height="60" valign="top"><span class="style13"><br>__MSG_bookmarks_str__<br><br>__MSG_my__ del.icio.us:&nbsp;</span><span class="style3" id="username_value">__MSG_user_not_set__</span> <span class="style6" onclick="edit_username_click();" style="cursor:pointer;" id="edit_text_button">&nbsp;__MSG_edit__ </span></td></tr></table>';
				
				if(master_user!="none"){
					_gel("username_value").innerHTML = master_user;
					//user = master_user;
				}
				
				//start from edit state - oded
				edit_state = 0;
				edit_username_click();
			}
		}

		//network
		if(mode=="NETWORK"){
			if(user=="none"){
			
				_gel("main_display_area").innerHTML = 
				
				'<table width="242" height="262" border="0" cellpadding="0" cellspacing="0">' +
				    '<tr><td height="60" valign="top"><span class="style13"><br>__MSG_network_str__<br><br>__MSG_my__ del.icio.us:&nbsp;</span><span class="style3" id="username_value">__MSG_user_not_set__</span> <span class="style6" onclick="edit_username_click();" style="cursor:pointer;" id="edit_text_button">&nbsp;__MSG_edit__ </span></td></tr></table>';
				
				if(master_user!="none"){
					_gel("username_value").innerHTML = master_user;
					//user = master_user;
				}
				
				//start from edit state - oded
				edit_state = 0;
				edit_username_click();
			}
			else{
				//show user network's bookmarks
				_gel("main_display_area").innerHTML = 
				
				'<table width="242" border="0" cellspacing="0" cellpadding="0">' +   
				    '<tr><td valign="top"><table width="242" border="0" cellpadding="0" cellspacing="0">'+
					'<tr><td width="20" height="15" align="center" id="bookmark_img_1"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_1"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_1"  width="222" height="13">&nbsp;</td></tr>' +
					'<tr><td colspan="2" height="5" width="222" style="font-size:1px;">&nbsp;</td></tr>' +
					'<tr><td width="20" height="15" align="center" id="bookmark_img_2"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_2"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_2"  width="222" height="13">&nbsp;</td></tr>' +
					'<tr><td colspan="2" height="5" width="222" style="font-size:1px;">&nbsp;</td></tr>' +
					'<tr><td width="20" height="15" align="center" id="bookmark_img_3"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_3"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_3"  width="222" height="13">&nbsp;</td></tr>' +
					'<tr><td colspan="2" height="5" width="222" style="font-size:1px;">&nbsp;</td></tr>' +
					'<tr><td width="20" height="15" align="center" id="bookmark_img_4"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_4"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_4"  width="222" height="13">&nbsp;</td></tr>' +
					'<tr><td colspan="2" height="5" width="222" style="font-size:1px;">&nbsp;</td></tr>' +
					'<tr><td width="20" height="15" align="center" id="bookmark_img_5"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_5"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_5"  width="222" height="13">&nbsp;</td></tr>' +
					'<tr><td colspan="2" height="5" width="222" style="font-size:1px;">&nbsp;</td></tr>' +
					'<tr><td width="20" height="15" align="center" id="bookmark_img_6"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_6"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_6"  width="222" height="13">&nbsp;</td></tr>' +
					'<tr><td colspan="2" height="5" width="222" style="font-size:1px;">&nbsp;</td></tr>' +
					'<tr><td width="20" height="15" align="center" id="bookmark_img_7"  valign="middle"><img src="'+trspnt+'" width="13" height="13" /></td><td  id="user_bookmark_7"  width="222" height="15" class="style14">&nbsp;</td></tr>' +
					'<tr><td width="20" height="13" align="center"><img src="'+trspnt+'" width="13" height="13" /></td><td id="network_bookmark_7"  width="222" height="13">&nbsp;</td></tr>' +
				'</table></td></tr><td>'+                                                                                                                                                     
				'<table width="242" border="0" cellspacing="0" cellpadding="0">'+
				'<tr><td width="121" style="color:gray; cursor:default;" id="back_button">&nbsp;</td><td width="121" style="color:gray; cursor:default;" id="more_button">&nbsp;</td></tr>'+
				'</table>'+
				'</td></tr></table>';
			}
		}
		
	}
	
	var fetchBasterPlusPlus = 0;
	// Set request from Delicious
	function gotoDeliciousAndBringMeSomeData(){
		
		//hotlist
		if(mode=="HOTLIST"){
			var url= "http://feeds.delicious.com/v2/rss/?fancy";
			_IG_FetchXmlContent(url,parseRSS);
		}
		
		//bookmarks
		if(mode=="BOOKMARKS"){
			if(user!="none"){
				while (user.indexOf(" ")!=-1)
					user=user.substring(0,user.indexOf(" "))+"+"+user.substring(user.indexOf(" ")+1);
				var url  = "http://del.icio.us/rss/"+user; 
				_IG_FetchXmlContent(url, parseRSS);
			}
		}
		
		// network's bookmarks
		if(mode=="NETWORK"){
			if(user!="none"){
				while (user.indexOf(" ")!=-1)
					user=user.substring(0,user.indexOf(" "))+"+"+user.substring(user.indexOf(" ")+1);
				var url = "http://del.icio.us/rss/network/"+user;
				_IG_FetchXmlContent(url,parseRSS);
			}
		}
	}
	
	// Get Hotlist Images - Test
	/*
	function test_getImagesFromDelicious(response) {
		
		if (response == null) {
			setErrorMsg();
			return;
		}
		
		if(response.substr(0,19) == "HTTP/1.1 999 Unable"){
			return;
		}
		
		var last_index = 0;
		for (var i=1 ; i<=5 ; i++){
			var str_img = "";
			var start = response.indexOf('img src="',last_index);
			var end = 	response.indexOf('" width',start);
			str_img = response.substr(start+9,end-(start+9));
			_gel("img_"+i).src=str_img;
			last_index = end + 7;		
		}
	}
	*/
	
	function image_click(num){
		window.open(hotlist_links[num]);
	}
	
	// paging
	var page = 1;
	var page_inc = 0;
	function back_click(){
		page_inc=-1;
		
		//set required html code
		setCurrentHTMLCode();
		
		//get contents from delicious
		gotoDeliciousAndBringMeSomeData();		
	}
	
	function more_click(){
		page_inc=1;
		
		//set required html code
		setCurrentHTMLCode();
		
		//get contents from delicious
		gotoDeliciousAndBringMeSomeData();
	}
	
	// edit user name
	var edit_state = 0;
	function edit_username_click(){
		if(edit_state==0){
			//replacce button text
			_gel("edit_text_button").innerHTML = "&nbsp;save";
			
			//show input box
			_gel("username_value").innerHTML = "<input type=text maxlength=24 id='user_name_input' class=style13 size=12 value=''></input>";
			
			//set user
			if(master_user!="none")
				_gel("user_name_input").value = master_user;
			
			//set focus
			_gel("user_name_input").select();
			
			//set state flag
			edit_state=1;
		}
		else{
			//replacce button text
			_gel("edit_text_button").innerHTML = "&nbsp;edit";
			var str = _gel("user_name_input").value;
			//show username value
			if(str!="" &&  str!=" "){
				_gel("username_value").innerHTML = str;
				//save user 
				prefs__MODULE_ID__.set("master_user", str);
				//set global user  var value
				master_user = str;
				user = str;
				
				//launch
				user = master_user;
				tab_click("bookmarks");
				
				//set edit user text
				_gel("edit_user_span").innerHTML = '|&nbsp;<span title="edit username" class="style2" onclick="edit_user_click();" style="cursor:pointer;">__MSG_edit__</span>&nbsp;';
				
			}
			else{
				str = "none";
				_gel("username_value").innerHTML = "user not set";
				
				//save user 
				prefs__MODULE_ID__.set("master_user", str);
				
				//set global user  var value
				master_user = str;
				user = str;
				
				//remove edit
				_gel("edit_user_span").innerHTML ="&nbsp;";
				
			}
			//set state flag
			edit_state=0;
		}
	}
	
	// my delicious text click
	function my_del_click(){
		if(master_user!="none"){
			user = master_user;
		}
		else{
			user = "none";
		}
		tab_click("bookmarks");
	}
	
	function edit_user_click(){
		edit_state = 0;
		user = "none";
		tab_click("bookmarks");
	}
	
	var _json_with_no_cache12 =0;
	var getJsonDel = function(b){
        var c=document.getElementsByTagName("head")[0];
        var d=document.createElement("script");
        d.type="text/javascript";
        d.charset="utf-8";
        var e=b;
        e=e+"&nocache="+_json_with_no_cache12++;
        d.src=e;
        var f=function(){
            var j=d.parentNode;
            j.removeChild(d);
            delete d;
        };
        var g=function(j){
            var s=(j?j:window.event).target?(j?j:window.event).target:(j?j:window.event).srcElement;
            if(s.readyState=="loaded"||s.readyState=="complete"){
                f();
                return;
            }
        };
        if(navigator.product=="Gecko"){
            d.onload=f;
        }else{
            d.onreadystatechange=g;
        }
        
        c.appendChild(d)
    }
	
	
	
	// fetch content json
	function parseJsonUrlInfo(response){
		
		try{
			_gel("saved_by").innerHTML = "saved by: <b>" + response[0].total_posts + "</b> people";
		}
		catch (e){}
	}
	
	// fetch content xml
	function parseRSS(response) {
		if (response == null || typeof(response) != "object" || ((response.firstChild.textContent) && response.firstChild.textContent.indexOf("404 Not Found") != -1))  {
			setErrorMsg();
			return;
		}
		// fetch hotlist:
		if(mode=="HOTLIST"){
			var temp_title="";
			var temp_link ="";
			var itemList = response.getElementsByTagName("item");
						
			for (var i=0; i < 5 && itemList.item(i); i++) { 
				
				link_tags[i+1] = '<span class="style8">no tags</span>';
				var nodeList = itemList.item(i).childNodes;
				for (var j=0; j < nodeList.length; j++) { 
					var node = nodeList.item(j);
					//title
					if(node.nodeName=="title"){ 
						if(node.firstChild.nodeValue.length>56){
							temp_title = node.firstChild.nodeValue.substring(0,56) + "...";
						}
						else{
							temp_title = node.firstChild.nodeValue;
						}
					}
					
					//img 
					if(node.nodeName=="description"){
						var str_tmp = node.firstChild.nodeValue;
						var str_img = "";
						var start = str_tmp.indexOf('img src="',0);
						var end = 	str_tmp.indexOf('" width',start);
						str_img = str_tmp.substr(start+9,end-(start+9));
						_gel("img_"+(i+1)).src=str_img;
					}
					
					//link
					if(node.nodeName=="link"){
						temp_link = node.firstChild.nodeValue;
						//update image with link + title
						hotlist_links[i+1] = temp_link;
						_gel("img_"+(i+1)).title=node.firstChild.nodeValue;
					}

					
					//link_tags
					if(node.nodeName=="dc:subject"){
						if(node.firstChild){
							link_tags_gross[i+1] = node.firstChild.nodeValue;
							link_tags_gross[i+1] = link_tags_gross[i+1].replace(' ', ',&nbsp;');
							link_tags_gross[i+1] = link_tags_gross[i+1].replace(' ', ',&nbsp;');
							link_tags_gross[i+1] = link_tags_gross[i+1].replace(' ', ',&nbsp;');
							link_tags_gross[i+1] = link_tags_gross[i+1].replace(' ', ',&nbsp;');
							link_tags_gross[i+1] = link_tags_gross[i+1].replace('&nbsp;', ' ');
							link_tags_gross[i+1] = link_tags_gross[i+1].replace('&nbsp;', ' ');
							link_tags_gross[i+1] = link_tags_gross[i+1].replace('&nbsp;', ' ');

							link_tags_gross[i+1] = "tags: " + link_tags_gross[i+1];
							
							link_tags[i+1] = node.firstChild.nodeValue;
							//replace inner spaces
							link_tags[i+1] = link_tags[i+1].replace(' ', '&nbsp;');
							link_tags[i+1] = link_tags[i+1].replace(' ', '&nbsp;');
							link_tags[i+1] = link_tags[i+1].replace(' ', '&nbsp;');
							link_tags[i+1] = link_tags[i+1].replace(' ', '&nbsp;');
							
							link_tags[i+1] = link_tags[i+1].replace('&nbsp;', ' <span class="style10">|</span> ');
							link_tags[i+1] = link_tags[i+1].replace('&nbsp;', ' <span class="style10">|</span> ');
							link_tags[i+1] = link_tags[i+1].replace('&nbsp;', ' <span class="style10">|</span> ');
							link_tags[i+1] = link_tags[i+1].replace('&nbsp;', ' <span class="style10">|</span> ');
							
							//put style around the str
							link_tags[i+1] = '<span class="style8">' + link_tags[i+1] + '</span>';
						} else {
							link_tags[i+1] = '<span class="style8">no tags</span>';
						}
					}
				}
				_gel("title_"+(i+1)).innerHTML = "<div style='width:186px; height:28px; overflow:hidden;'><a class='style7' href='"+ temp_link +"' target='_blank'>" + temp_title + "</a></div>";
				
			}
			
			for (var i=1;i<=5;i++)
			{
				//set tag text
				_gel("gray_td_1_"+i).innerHTML 	= link_tags[i];
				_gel("gray_td_1_"+i).title 		= link_tags_gross[i];
				_gel("gray_td_1_"+i).style.cursor = "defualt";
			}
			
			//test - get images
			//var url_test = "http://del.icio.us/?randsx="+fetchBasterPlusPlus;
			//_IG_FetchContent(url_test,test_getImagesFromDelicious);
			//fetchBasterPlusPlus++;
		}
		
		//user bookmarks/networks' bookmarks:
		else{
			var temp_title="";
			var temp_link ="";
			var itemList = response.getElementsByTagName("item");
			var cur_size;
			if(mode=="NETWORK"){
				cur_size=7;
			}
			else{
				//bookmarks
				cur_size=13;
			}
			//page handle
			var shift=0;
			page = page + page_inc;
			shift = cur_size*(page-1);
			
			//check for back and more buttons
			if((shift-1>0) && (itemList.item(shift-1))){
				_gel("back_button").innerHTML = '<div align="left" class="style6" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" onclick="back_click();" style="cursor:pointer;" id="back_button">&nbsp;&laquo;back</div>';
			}
			if(itemList.item(shift+cur_size)){
				_gel("more_button").innerHTML = '<div align="right" class="style6" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" onclick="more_click();" style="cursor:pointer;" id="more_button">more&raquo;</div>';
			}
			//get data
			for (var i=0; i < cur_size && itemList.item(i+shift); i++) { 
				var nodeList = itemList.item(i+shift).childNodes;
				for (var j=0; j < nodeList.length; j++) {
					
					var node = nodeList.item(j);
					//title
					if(node.nodeName=="title"){
						if(node.firstChild.nodeValue.length>56){
							temp_title = node.firstChild.nodeValue.substring(0,56) + "...";
						}
						else{
							temp_title = node.firstChild.nodeValue;
						}
						if(mode=="NETWORK"){
							//remove [from USER] string
							var start = temp_title.indexOf(']');
							temp_title = temp_title.substr(start+2);
						}
						//save value to array
						bookmarks_title[i+1] = temp_title;
					}
					
					//link
					if(node.nodeName=="link"){
						temp_link = node.firstChild.nodeValue;
						//save value to array
						bookmarks_link[i+1] = temp_link;
					}
					
					//date
					if(node.nodeName=="dc:date"){
						//save value to array
						bookmarks_date[i+1] =node.firstChild.nodeValue.substring(0,10);
					}
					
					//creator
					if(node.nodeName=="dc:creator"){
						//save value to array
						bookmarks_creator[i+1] =node.firstChild.nodeValue;
					}
					
					//description
					if(node.nodeName=="description"){
						//save value to array
						if(node.firstChild)
							bookmarks_description[i+1] =node.firstChild.nodeValue;
						else
							bookmarks_description[i+1] = "";
					}
					else
						bookmarks_description[i+1] = "";
					//tags
					if(node.nodeName=="dc:subject"){
						//save value to array
						if(node.firstChild)
							bookmarks_tags[i+1] =node.firstChild.nodeValue;
						else
							bookmarks_tags[i+1] = "no tags";
					}
				}
				//update html
				if(mode!="NETWORK"){
					_gel("user_bookmark_"+(i+1)).innerHTML = "<div title='" + temp_title + "' style='cursor:pointer; width:222px; height:16px; overflow:hidden;'><a class='style14' href='" + temp_link +"' target='_blank'>" + temp_title + "</a></div>";
					_gel("bookmark_img_"+(i+1)).innerHTML = '<img src="'+_IG_GetImageUrl(IMAGES_BASE+'grey_plus.gif')+'" width="13" height="13" style="cursor:pointer;" onclick="bookmark_click('+ (i+1) +')" />';
				}
				else{
					_gel("network_bookmark_"+(i+1)).innerHTML = "<div class='style4' style='width:222px; height:14px; overflow:hidden;'>by <span onclick=network_by_user_click('"+ bookmarks_creator[i+1] +"') style='font-weight:bold; color:#0000FF; cursor:pointer;'>" + bookmarks_creator[i+1] + "</span> on " + bookmarks_date[i+1] + "</div>";
					_gel("user_bookmark_"+(i+1)).innerHTML = "<div title='" + temp_title + "' style='cursor:pointer; width:222px; height:17px; overflow:hidden;'><a class='style14' href='" + temp_link +"' target='_blank'>" + temp_title + "</a></div>";
					_gel("bookmark_img_"+(i+1)).innerHTML = '<img src="'+_IG_GetImageUrl(IMAGES_BASE+'grey_plus.gif')+'" width="13" height="13" style="cursor:pointer;" onclick="bookmark_click('+ (i+1) +')" />';
				}
			}
			//handle empty result
			if(itemList.length==0){
				if(mode=="NETWORK"){
					_gel("user_bookmark_4").innerHTML = "<div title='no results, sorry...' style='width:222px; height:17px; overflow:hidden;'>&nbsp;&nbsp;&nbsp;&nbsp;__MSG_no_network__</div>";
				}
				else{
					_gel("user_bookmark_4").innerHTML = "<div title='no results, sorry...' style='width:222px; height:17px; overflow:hidden;'>&nbsp;&nbsp;&nbsp;&nbsp;__MSG_no_results__</div>";
				}
			}
		}
	}

	function network_by_user_click(user_name){
		user = user_name;
		tab_click("bookmarks");
	}

	// click on a bookmark
	var str_code_backup = "";

	function bookmark_click(num){

		str_code_backup = _gel("main_display_area").innerHTML;

		_gel("main_display_area").innerHTML = 
		
			'<table width="232" height:262px; border="0" cellpadding="10" cellspacing="0" valign="top"><tr>' +
			'<td valign="top"><div valign="top" style="width:232px; height:262px; overflow:hidden;"><span class="style19" style="color:#000000"><b><a style="color:#0000FF" href="' + bookmarks_link[num] + '" target="_blank">'+ bookmarks_title[num] +'</a></b>' +
			'<br>' + bookmarks_description[num] + '</span>' +
			'<p class="style13"> __MSG_tags__: ' + bookmarks_tags[num] + '</p>'+
			'<p class="style4">__MSG_created_by__: <b>' + bookmarks_creator[num] + '</b> on ' + bookmarks_date[num] + 
			'<br><span class="style4" id="saved_by">&nbsp;</span></p>' + 
			'<p class="style13b"><a class="style13b" href="http://del.icio.us/post?url=' + bookmarks_link[num] + '&title=' + bookmarks_title[num] + '" target="_blank">__MSG_save_to_my__</a></p>'+
			'<p class="style13"><span class=style14 onclick="restore_bookmarks();" style="cursor:pointer;">&laquo;__MSG_back__</span></p>'+
			'</div></td></tr></table>';
			
			
		var hash = MD5(bookmarks_link[num]);
		var url_info = "http://badges.del.icio.us/feeds/json/url/data?hash=" + hash;
		
		//call jason
		//_IG_FetchContent(url_info, parseJsonUrlInfo);
		getJsonDel(url_info + "&callback=parseJsonUrlInfo");
		
	}

	function restore_bookmarks(){
		_gel("main_display_area").innerHTML = str_code_backup;
	}

	// handle errors
	function setErrorMsg(){
		_gel("main_display_area").innerHTML = "<div class='style14'>&nbsp;&nbsp;&nbsp;&nbsp;Information temporary unavailable</div>";
		//_gel("title_url").innerHTML = 'Error fetching contet.';	
		//_gel("title_description").innerHTML = "please try again later";
	}	
	
	//MD5
	var MD5 = function (string) {

          function RotateLeft(lValue, iShiftBits) {
                return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
          }

          function AddUnsigned(lX,lY) {

                var lX4,lY4,lX8,lY8,lResult;
                lX8 = (lX & 0x80000000);
                lY8 = (lY & 0x80000000);
                lX4 = (lX & 0x40000000);
                lY4 = (lY & 0x40000000);

                lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);

                if (lX4 & lY4) {
                      return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
                }

                if (lX4 | lY4) {
                      if (lResult & 0x40000000) {
                            return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
                      } else {
                            return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
                      }
                } else {
                      return (lResult ^ lX8 ^ lY8);
                }
          }

          function F(x,y,z) { return (x & y) | ((~x) & z); }
          function G(x,y,z) { return (x & z) | (y & (~z)); }
          function H(x,y,z) { return (x ^ y ^ z); }
          function I(x,y,z) { return (y ^ (x | (~z))); }

          function FF(a,b,c,d,x,s,ac) {
                a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
                return AddUnsigned(RotateLeft(a, s), b);
          };

          function GG(a,b,c,d,x,s,ac) {
                a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
                return AddUnsigned(RotateLeft(a, s), b);
          };

          function HH(a,b,c,d,x,s,ac) {
                a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
                return AddUnsigned(RotateLeft(a, s), b);
          };

          function II(a,b,c,d,x,s,ac) {
                a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
                return AddUnsigned(RotateLeft(a, s), b);
          };

          function ConvertToWordArray(string) {
                var lWordCount;
                var lMessageLength = string.length;
                var lNumberOfWords_temp1=lMessageLength + 8;
                var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;
                var lNumberOfWords = (lNumberOfWords_temp2+1)*16;
                var lWordArray=Array(lNumberOfWords-1);
                var lBytePosition = 0;
                var lByteCount = 0;
                while ( lByteCount < lMessageLength ) {
                      lWordCount = (lByteCount-(lByteCount % 4))/4;
                      lBytePosition = (lByteCount % 4)*8;
                      lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<<lBytePosition));
                      lByteCount++;
                }

                lWordCount = (lByteCount-(lByteCount % 4))/4;
                lBytePosition = (lByteCount % 4)*8;
                lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition);
                lWordArray[lNumberOfWords-2] = lMessageLength<<3;
                lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
                return lWordArray;
          };

          function WordToHex(lValue) {
                var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
                for (lCount = 0;lCount<=3;lCount++) {
                      lByte = (lValue>>>(lCount*8)) & 255;
                      WordToHexValue_temp = "0" + lByte.toString(16);
                      WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
                }

                return WordToHexValue;
          };

          function Utf8Encode(string) {
                string = string.replace(/\r\n/g,"\n");
                var utftext = "";

                for (var n = 0; n < string.length; n++) {
                      var c = string.charCodeAt(n);
                      if (c < 128) {
                            utftext += String.fromCharCode(c);
                      }
                      else if((c > 127) && (c < 2048)) {
                            utftext += String.fromCharCode((c >> 6) | 192);
                            utftext += String.fromCharCode((c & 63) | 128);
                      }
                      else {
                            utftext += String.fromCharCode((c >> 12) | 224);
                            utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                            utftext += String.fromCharCode((c & 63) | 128);
                      }
                }
                return utftext;
          };

          var x=Array();
          var k,AA,BB,CC,DD,a,b,c,d;
          var S11=7, S12=12, S13=17, S14=22;
          var S21=5, S22=9 , S23=14, S24=20;
          var S31=4, S32=11, S33=16, S34=23;
          var S41=6, S42=10, S43=15, S44=21;

          string = Utf8Encode(string);
          x = ConvertToWordArray(string);
          a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;

          for (k=0;k<x.length;k+=16) {
                AA=a; BB=b; CC=c; DD=d;
                a=FF(a,b,c,d,x[k+0], S11,0xD76AA478);
                d=FF(d,a,b,c,x[k+1], S12,0xE8C7B756);
                c=FF(c,d,a,b,x[k+2], S13,0x242070DB);
                b=FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE);
                a=FF(a,b,c,d,x[k+4], S11,0xF57C0FAF);
                d=FF(d,a,b,c,x[k+5], S12,0x4787C62A);
                c=FF(c,d,a,b,x[k+6], S13,0xA8304613);
                b=FF(b,c,d,a,x[k+7], S14,0xFD469501);
                a=FF(a,b,c,d,x[k+8], S11,0x698098D8);
                d=FF(d,a,b,c,x[k+9], S12,0x8B44F7AF);
                c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);
                b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);
                a=FF(a,b,c,d,x[k+12],S11,0x6B901122);
                d=FF(d,a,b,c,x[k+13],S12,0xFD987193);
                c=FF(c,d,a,b,x[k+14],S13,0xA679438E);
                b=FF(b,c,d,a,x[k+15],S14,0x49B40821);
                a=GG(a,b,c,d,x[k+1], S21,0xF61E2562);
                d=GG(d,a,b,c,x[k+6], S22,0xC040B340);
                c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);
                b=GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA);
                a=GG(a,b,c,d,x[k+5], S21,0xD62F105D);
                d=GG(d,a,b,c,x[k+10],S22,0x2441453);
                c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);
                b=GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8);
                a=GG(a,b,c,d,x[k+9], S21,0x21E1CDE6);
                d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);
                c=GG(c,d,a,b,x[k+3], S23,0xF4D50D87);
                b=GG(b,c,d,a,x[k+8], S24,0x455A14ED);
                a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);
                d=GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8);
                c=GG(c,d,a,b,x[k+7], S23,0x676F02D9);
                b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);
                a=HH(a,b,c,d,x[k+5], S31,0xFFFA3942);
                d=HH(d,a,b,c,x[k+8], S32,0x8771F681);
                c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);
                b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);
                a=HH(a,b,c,d,x[k+1], S31,0xA4BEEA44);
                d=HH(d,a,b,c,x[k+4], S32,0x4BDECFA9);
                c=HH(c,d,a,b,x[k+7], S33,0xF6BB4B60);
                b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);
                a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);
                d=HH(d,a,b,c,x[k+0], S32,0xEAA127FA);
                c=HH(c,d,a,b,x[k+3], S33,0xD4EF3085);
                b=HH(b,c,d,a,x[k+6], S34,0x4881D05);
                a=HH(a,b,c,d,x[k+9], S31,0xD9D4D039);
                d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);
                c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);
                b=HH(b,c,d,a,x[k+2], S34,0xC4AC5665);
                a=II(a,b,c,d,x[k+0], S41,0xF4292244);
                d=II(d,a,b,c,x[k+7], S42,0x432AFF97);
                c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);
                b=II(b,c,d,a,x[k+5], S44,0xFC93A039);
                a=II(a,b,c,d,x[k+12],S41,0x655B59C3);
                d=II(d,a,b,c,x[k+3], S42,0x8F0CCC92);
                c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);
                b=II(b,c,d,a,x[k+1], S44,0x85845DD1);
                a=II(a,b,c,d,x[k+8], S41,0x6FA87E4F);
                d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);
                c=II(c,d,a,b,x[k+6], S43,0xA3014314);
                b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);
                a=II(a,b,c,d,x[k+4], S41,0xF7537E82);
                d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);
                c=II(c,d,a,b,x[k+2], S43,0x2AD7D2BB);
                b=II(b,c,d,a,x[k+9], S44,0xEB86D391);
                a=AddUnsigned(a,AA);
                b=AddUnsigned(b,BB);
                c=AddUnsigned(c,CC);
                d=AddUnsigned(d,DD);
          }

          var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
          return temp.toLowerCase();
    }

	//end of MD5

</script>
<!-- html -->
<center>
<div style="height:10px; font-size:1px;"></div>
<table width="272" height="370" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td height="5"><img id="img_c_1" width="272" height="5" /></td>
	</tr>
	<tr>
		<td height="360" id="img_c_4">
			<table width="272" height="360" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="5">&nbsp;</td>
					<td width="262">
						<table width="262" height="360" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td height="15"><div align="right"><span title="your del.icio.us" class="style2" onclick="my_del_click();" style="cursor:pointer;">__MSG_my__ del.icio.us&nbsp;</span><span id="edit_user_span" class="style2">&nbsp;</span></div></td>
							</tr>
							<tr>
								<td height="28">
									<table width="262" height="28" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td width="10">&nbsp;</td>
											<td width="21" valign="top"><a href="http://del.icio.us/" target="_blank"><img id="img_c_2" width="21" height="21" border="0" /></a></td>
											<td width="7">&nbsp;</td>
											<td width="224">
												<table width="224" height="28" border="0" cellpadding="0" cellspacing="0">
													<tr><td width="224" height="15"><div class="style3" style="width:224px; height:15px; overflow:hidden;" id="title_url">del.icio.us</div></td></tr>
													<tr><td width="224" height="13"><div class="style4" style="width:224px; height:13px; overflow:hidden;" id="title_description">&nbsp;</span></td></tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td height="5"><span class="style1">&nbsp;</span></td>
							</tr>
							<tr>
								<td height="20">
									<table width="262" height="20" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td width="75" id="tab_hotlist" style="cursor:pointer;" onclick="tab_click('hotlist')"><span class="style5">&nbsp;</span><span class="style5">__MSG_hotlist__</span></td>
											<td width="1" class="style1">&nbsp;</td>
											<td width="103" id="tab_bookmarks" style="cursor:pointer;" onclick="tab_click('bookmarks')"><span class="style5">&nbsp;__MSG_bookmarks__</span></td>
											<td width="1"><p class="style1">&nbsp;</p></td>
											<td width="82" id="tab_network" class="style5" style="cursor:pointer;" onclick="tab_click('network')">&nbsp;__MSG_network__</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td height="292">
									<table width="262" height="292" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td width="10">&nbsp;</td>
											<td width="242" height="292" id="main_display_area">&nbsp;</td>
											<td width="10">&nbsp;</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
					<td width="5">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="5"><img id="img_c_3" width="272" height="5" /></td>
	</tr>
</table>

<div id="lp_ad_div" style="margin-top:5px;">
	<!-- PUT THIS TAG IN DESIRED LOCATION OF SLOT my_delicious_txt -->
	<script type="text/javascript">
	  GA_googleFillSlot("my_delicious_txt");
	</script>
	<!-- END OF TAG FOR SLOT my_delicious_txt  -->
</div>
	
</center>

<!-- Hidden div tag -->
<div id="hiddenDiv" style="visibility:hidden; position:absolute; top:-900px;"></div>
<!-- LP footer -->
<div>
	<script type="text/javascript">
    var mMENU = _IG_GetCachedUrl("http://cdn.labpixies.com/infra/js/lp_footer.js");
    document.write('<scr'+'ipt type="text/javascript" src="'+mMENU+'"></scr'+'ipt>');
  </script>
</div>
<iframe width="1" height="1" style="width:1px; height:1px; overflow:hidden; position:absolute; visibility:hidden;" src="http://static.labpixies.com/campaigns/delicious/analytics.html"></iframe>
<script type="text/javascript">

	function setimages() {
		_gel("img_c_1").src							= _IG_GetImageUrl(IMAGES_BASE+"top_shadow.gif");
		_gel("img_c_2").src							= _IG_GetImageUrl(IMAGES_BASE+"delicious_logo.gif");
		_gel("img_c_3").src							= _IG_GetImageUrl(IMAGES_BASE+"bottom_shadow.gif");
		
		_gel("img_c_4").style.backgroundImage 		= 'url('+_IG_GetImageUrl(IMAGES_BASE+"sides_shadows.gif")+')';
		
		
		
	} 
	
	setimages();
	
	function deploy_gadget()
	{
		pageTracker = _gat._getTracker("UA-345375-1");
		pageTracker._initData();
		
		init_module__MODULE_ID__();
	}
	
	_IG_RegisterOnloadHandler(deploy_gadget);

	_IG_Analytics("UA-345375-1", "/Delicious");
</script>
	
]]> 
</Content>
</Module>