﻿<?xml version="1.0" encoding="UTF-8"?>
<Module>
	<ModulePrefs author="LabPixies"
	author_email="info@labpixies.com"
	description="__MSG_description__"
	screenshot="http://www.labpixies.com/campaigns/sweetim/images/screenshot.png"
	title="__MSG_title__"
	title_url="http://www.labpixies.com"
	thumbnail="http://www.labpixies.com/campaigns/sweetim/images/thumbnail.jpg" height="280" render_inline="never">
		
	<Locale messages="http://www.labpixies.com/campaigns/sweetim/i19/all_all.xml"/>	
	<Locale lang="de" messages="http://www.labpixies.com/campaigns/sweetim/i19/de_all.xml"/>
	<Locale lang="es" messages="http://www.labpixies.com/campaigns/sweetim/i19/es_all.xml"/>
	<Locale lang="fr" messages="http://www.labpixies.com/campaigns/sweetim/i19/fr_all.xml"/>
	<Locale lang="it" messages="http://www.labpixies.com/campaigns/sweetim/i19/it_all.xml"/>		
	<Locale lang="ja" messages="http://www.labpixies.com/campaigns/sweetim/i19/ja_all.xml"/>
	<Locale lang="nl" messages="http://www.labpixies.com/campaigns/sweetim/i19/nl_all.xml"/>
	<Locale lang="pl" messages="http://www.labpixies.com/campaigns/sweetim/i19/pl_all.xml"/>
	<Locale lang="pt-PT" messages="http://www.labpixies.com/campaigns/sweetim/i19/pt_all.xml"/>
	<Locale lang="pt-BR" messages="http://www.labpixies.com/campaigns/sweetim/i19/pt_all.xml"/>				
	<Locale lang="zh-CN" messages="http://www.labpixies.com/campaigns/sweetim/i19/zh_cn_all.xml"/>		

	<Require feature="analytics"/>
	</ModulePrefs>
	
	<Content type="html">
		<![CDATA[
	<title>SweetIM</title>

<meta name="keywords" content="LabPixies, SweetIM, fun, emoticons, winks, gadget, widget, module" />
<meta name="description" content="The SweetIM gadget will show you our most popular emoticon and wink animations of the day. The full application enhances your emails, blogs, and Messenger by adding cool content such as emoticons, winks, audibles, sound FX, Display Pictures, Nudges, and more!" />

<!-- SweetIM Module
	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.
-->

<style type="text/css">

.style1 {font-size: 1px;}

.style2 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #1588f1;
	font-weight: bold;
}

.style7 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #05385E;
	font-weight: bold;
}

.style3 {
	
	border: 2px solid #1e8fff;
	
	scrollbar-base-color: orange;
	scrollbar-arrow-color: #1588fe;
	scrollbar-DarkShadow-Color: #1588fe; 
	
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #1588fe;
	
	overflow-x: hidden; 
	overflow-y: scroll;
}

.style4 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #000000;
}

</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", "daily_sweetim_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 type="text/javascript">
	var mMENU = _IG_GetCachedUrl("http://cdn.labpixies.com/infra/js/menu.js");
	document.write('<scr'+'ipt type="text/javascript" src="'+mMENU+'"></scr'+'ipt>');
</script>
<script type="text/JavaScript">
var _gadgetID=52;
var IMAGE_BASE = "http://cdn.labpixies.com/campaigns/sweetim/images/";
var CONTENT_BASE = "http://content.sweetim.com/";
var $lp=jQuery.noConflict();
	
	
//globals:
var size = 61;

//emoticons
var em_url = new Array();
var em_str = new Array();

//winks
var wi_url = new Array();
var wi_str = new Array();
var wi_len = new Array();

//globals:
var start_with		= 0;
var flag_emoticon	= 0;
var flag_wink		= 0;
var flag_getit		= 0;


//---------------------------------------------------------------------------------------------------------------------
//	emoticons
//---------------------------------------------------------------------------------------------------------------------

em_url[1]  = "000200C6.swf";		em_str[1]  = "Tongue Out";
em_url[2]  = "00020114.swf";		em_str[2]  = "Smile"; 
em_url[3]  = "0002006E.swf";		em_str[3]  = "LOL"; 
em_url[4]  = "0002010E.swf";		em_str[4]  = "Uncle Smiley"; 
em_url[5]  = "0002006C.swf";		em_str[5]  = "In Love"; 
em_url[6]  = "00020069.swf";		em_str[6]  = "Winking Smile"; 
em_url[7]  = "0002006A.swf";		em_str[7]  = "Crying"; 
em_url[8]  = "0002006D.swf";		em_str[8]  = "Kissed"; 
em_url[9]  = "00020148.swf";		em_str[9]  = "On The Floor"; 
em_url[10] = "00020079.swf";		em_str[10] = "Shaking Smiley";
em_url[11] = "0002005C.swf";		em_str[11] = "Clown"; 
em_url[12] = "000200B8.swf";		em_str[12] = "Blush"; 
em_url[13] = "00020072.swf";		em_str[13] = "Disappointed"; 
em_url[14] = "0002008A.swf";		em_str[14] = "Cool Watermelon";
em_url[15] = "0002007D.swf";		em_str[15] = "Scream"; 
em_url[16] = "00020073.swf";		em_str[16] = "Suspicious"; 
em_url[17] = "000200C0.swf";		em_str[17] = "Kiss"; 
em_url[18] = "0002006B.swf";		em_str[18] = "Hello Baby..."; 
em_url[19] = "00020066.swf";		em_str[19] = "Rolling"; 
em_url[20] = "00020074.swf";		em_str[20] = "Tired"; 
em_url[21] = "00020096.swf";		em_str[21] = "Pig"; 
em_url[22] = "00020118.swf";		em_str[22] = "In Love"; 
em_url[23] = "00020144.swf";		em_str[23] = "Heart"; 
em_url[24] = "0002013F.swf";		em_str[24] = "Dancing Banana";
em_url[25] = "00020071.swf";		em_str[25] = "Big Smile"; 
em_url[26] = "0002008B.swf";		em_str[26] = "Carrot"; 
em_url[27] = "0002011D.swf";		em_str[27] = "I Love U"; 
em_url[28] = "00020080.swf";		em_str[28] = "Wounded"; 
em_url[29] = "00020111.swf";		em_str[29] = "Couple"; 
em_url[30] = "0002009C.swf";		em_str[30] = "Doggy Smile"; 
em_url[31] = "0002007A.swf";		em_str[31] = "DJ"; 
em_url[32] = "000200D7.swf";		em_str[32] = "Good Night"; 
em_url[33] = "0002009D.swf";		em_str[33] = "Fish"; 
em_url[34] = "00020059.swf";		em_str[34] = "Boxer"; 
em_url[35] = "00020116.swf";		em_str[35] = "Flowers"; 
em_url[36] = "0002009A.swf";		em_str[36] = "Cat"; 
em_url[37] = "00020110.swf";		em_str[37] = "Cool"; 
em_url[38] = "000200D9.swf";		em_str[38] = "Love"; 
em_url[39] = "00020075.swf";		em_str[39] = "Tongue Out"; 
em_url[40] = "0002011C.swf";		em_str[40] = "Eyesroll"; 
em_url[41] = "000200D8.swf";		em_str[41] = "Bubble Hearts"; 
em_url[42] = "00020141.swf";		em_str[42] = "Driver"; 
em_url[43] = "00020113.swf";		em_str[43] = "Morf Love"; 
em_url[44] = "00020140.swf";		em_str[44] = "Captain"; 
em_url[45] = "0002007B.swf";		em_str[45] = "Nerd"; 
em_url[46] = "00020063.swf";		em_str[46] = "Hot"; 
em_url[47] = "0002005D.swf";		em_str[47] = "Elvis"; 
em_url[48] = "000200D6.swf";		em_str[48] = "Good Morning"; 
em_url[49] = "000200C3.swf";		em_str[49] = "I Love U"; 
em_url[50] = "000200A6.swf";		em_str[50] = "Ghost"; 
em_url[51] = "00020117.swf";		em_str[51] = "Go"; 
em_url[52] = "00020058.swf";		em_str[52] = "Begger"; 
em_url[53] = "0002005A.swf";		em_str[53] = "Burp"; 
em_url[54] = "000200D5.swf";		em_str[54] = "Cheers"; 
em_url[55] = "000200A9.swf";		em_str[55] = "Chicken Run"; 
em_url[56] = "0002005E.swf";		em_str[56] = "Cowboy"; 
em_url[57] = "00020134.swf";		em_str[57] = "Frozen"; 
em_url[58] = "0002012F.swf";		em_str[58] = "Indian Girl"; 
em_url[59] = "00020124.swf";		em_str[59] = "Mummy"; 
em_url[60] = "00020062.swf";		em_str[60] = "Glasses"; 
em_url[61] = "00020078.swf";		em_str[61] = "Chinese"; 

//---------------------------------------------------------------------------------------------------------------------
//	Winks
//---------------------------------------------------------------------------------------------------------------------

wi_url[1]  = "gadgets/labpix/makemyday.swf";	  	wi_str[1]  = "Make My Day";						wi_len[1]  = 	8;	                
wi_url[2]  = "sim/cp/icons/00010895.swf";    		wi_str[2]  = "C U L8R";							wi_len[2]  =    9;
wi_url[3]  = "gadgets/labpix/whatsup.swf";   		wi_str[3]  = "What's Up ?";						wi_len[3]  =    7;
wi_url[4]  = "gadgets/labpix/finallyhere.swf";		wi_str[4]  = "You're Finally Here";				wi_len[4]  =    6;
wi_url[5]  = "gadgets/labpix/piraternd.swf"; 		wi_str[5]  = "I can See You";					wi_len[5]  =    8;
wi_url[6]  = "sim/cp/icons/00010893.swf";    		wi_str[6]  = "Sexy Kisser";						wi_len[6]  =    13;
wi_url[7]  = "gadgets/labpix/getout.swf";    		wi_str[7]  = "Get Out !";						wi_len[7]  =    7;
wi_url[8]  = "sim/cp/icons/00010897.swf";    		wi_str[8]  = "Where Am I ?";					wi_len[8]  =    9;
wi_url[9]  = "gadgets/labpix/paris.swf";			wi_str[9]  = "Paris Hilton Hot Tape";			wi_len[9]  =    15;
wi_url[10] = "gadgets/labpix/loser.swf";     		wi_str[10] = "Loser";							wi_len[10] =    8;
wi_url[11] = "gadgets/labpix/visitinghours.swf";	wi_str[11] = "Visiting Hours Are Over";			wi_len[11] =    7;
wi_url[12] = "gadgets/labpix/soperfect.swf"; 		wi_str[12] = "You're So Perfect";				wi_len[12] =    5;
wi_url[13] = "gadgets/labpix/tired.swf";     		wi_str[13] = "I'm Tired...";						wi_len[13] =    8;
wi_url[14] = "gadgets/labpix/sweetimrules.swf";		wi_str[14] = "SweetIM Rulez !";					wi_len[14] =    9;
wi_url[15] = "gadgets/labpix/biteme.swf";    		wi_str[15] = "Bite Me Baby !";					wi_len[15] =    9;
wi_url[16] = "sim/cp/icons/000100D3.swf";    		wi_str[16] = "Waiting For You...";				wi_len[16] =    6;
wi_url[17] = "sim/cp/icons/000100D2.swf";    		wi_str[17] = "Waiting For You...";				wi_len[17] =    7;
wi_url[18] = "sim/cp/icons/000100FA.swf";    		wi_str[18] = "I Love U";						wi_len[18] =    9;
wi_url[19] = "sim/cp/icons/000100CC.swf";    		wi_str[19] = "Mad About You";					wi_len[19] =    15;
wi_url[20] = "sim/cp/icons/0001011D.swf";    		wi_str[20] = "Cupid Hearts";					wi_len[20] =    9;
wi_url[21] = "sim/cp/icons/000100AC.swf";    		wi_str[21] = "Dolphin";							wi_len[21] =    3;
wi_url[22] = "sim/cp/icons/000100FF.swf";    		wi_str[22] = "Voyeur";							wi_len[22] =    9;
wi_url[23] = "sim/cp/icons/00010104.swf";    		wi_str[23] = "Fart";							wi_len[23] =    5;
wi_url[24] = "sim/cp/icons/000100BB.swf";    		wi_str[24] = "Fish Kiss";						wi_len[24] =    8;
wi_url[25] = "sim/cp/icons/000100AE.swf";    		wi_str[25] = "Goat";							wi_len[25] =    7;
wi_url[26] = "sim/cp/icons/0001084D.swf";    		wi_str[26] = "Good Morning";					wi_len[26] =    8;
wi_url[27] = "sim/cp/icons/0001084E.swf";    		wi_str[27] = "Good Night";						wi_len[27] =    9;
wi_url[28] = "gadgets/labpix/gottapee.swf";  		wi_str[28] = "Gotta Pee";						wi_len[28] =    11;
wi_url[29] = "sim/cp/icons/00010819.swf";    		wi_str[29] = "Heart";							wi_len[29] =    8;
wi_url[30] = "sim/cp/icons/0001011E.swf";    		wi_str[30] = "I Love U";						wi_len[30] =    9;
wi_url[31] = "sim/cp/icons/00010871.swf";    		wi_str[31] = "Laughing Man";					wi_len[31] =    8;
wi_url[32] = "sim/cp/icons/00010119.swf";    		wi_str[32] = "Mushon";							wi_len[32] =    10;
wi_url[33] = "sim/cp/icons/00010106.swf";    		wi_str[33] = "Samurai";							wi_len[33] =    6;
wi_url[34] = "sim/cp/icons/00010842.swf";    		wi_str[34] = "Strip Soccer";					wi_len[34] =    11;
wi_url[35] = "sim/cp/icons/00010861.swf";    		wi_str[35] = "Speedboat";						wi_len[35] =    8;
wi_url[36] = "gadgets/labpix/pirate.swf";    		wi_str[36] = "I Can See Ya";					wi_len[36] =    8;
wi_url[37] = "gadgets/labpix/liketheway.swf";		wi_str[37] = "Like The Way Your S Looks";		wi_len[37] =    7;
wi_url[38] = "sim/cp/icons/00010869.swf";    		wi_str[38] = "Slasher";							wi_len[38] =    9;
wi_url[39] = "sim/cp/icons/0001088C.swf";    		wi_str[39] = "Take A Dump";						wi_len[39] =    13;
wi_url[40] = "sim/cp/icons/000100D1.swf";    		wi_str[40] = "Happy Birthday";					wi_len[40] =    14;
wi_url[41] = "gadgets/labpix/ustupid.swf";   		wi_str[41] = "U Stupid";						wi_len[41] =    10;
wi_url[42] = "sim/cp/icons/00010890.swf";    		wi_str[42] = "Wassup Dog";						wi_len[42] =    13;
wi_url[43] = "gadgets/labpix/wink.swf";      		wi_str[43] = "Wink";							wi_len[43] =    5;
wi_url[44] = "sim/cp/icons/000100C6.swf";    		wi_str[44] = "Wishes";							wi_len[44] =    14;
wi_url[45] = "sim/cp/icons/0001086C.swf";    		wi_str[45] = "Zombie";							wi_len[45] =    12;
wi_url[46] = "sim/cp/icons/000100B3.swf";    		wi_str[46] = "Depressed Turkey";				wi_len[46] =    9;
wi_url[47] = "sim/cp/icons/000100BE.swf";    		wi_str[47] = "Best Friends";					wi_len[47] =    6;
wi_url[48] = "sim/cp/icons/000100C0.swf";    		wi_str[48] = "Dancing Chicken";					wi_len[48] =    16;
wi_url[49] = "gadgets/labpix/makeawish.swf"; 		wi_str[49] = "Make A Wish";						wi_len[49] =    7;
wi_url[50] = "sim/cp/icons/0001081C.swf";    		wi_str[50] = "Brainless";						wi_len[50] =    9;
wi_url[51] = "sim/cp/icons/00010896.swf";    		wi_str[51] = "How U Doing ?";					wi_len[51] =    9;
wi_url[52] = "sim/cp/icons/00010816.swf";    		wi_str[52] = "Finger";							wi_len[52] =    7;
wi_url[53] = "sim/cp/icons/000100CD.swf";    		wi_str[53] = "Kiss";							wi_len[53] =    7;
wi_url[54] = "sim/cp/icons/0001086E.swf";    		wi_str[54] = "Girls Rule !";					wi_len[54] =    9;
wi_url[55] = "gadgets/labpix/window.swf";    		wi_str[55] = "Like Your New Window";			wi_len[55] =    6;
wi_url[56] = "gadgets/labpix/yousuck.swf";			wi_str[56] = "You Suck !";						wi_len[56] =    9;	
wi_url[57] = "sim/cp/icons/0001084D.swf";  			wi_str[57] = "Good Morning";					wi_len[57] =    8;	//repeat 26
wi_url[58] = "sim/cp/icons/0001084E.swf";  			wi_str[58] = "Good Night";						wi_len[58] =    9;	//repeat 27
wi_url[59] = "gadgets/labpix/gottapee.swf";			wi_str[59] = "Gotta Pee";						wi_len[59] =    11;	//repeat 28
wi_url[60] = "sim/cp/icons/00010819.swf";  			wi_str[60] = "Heart";							wi_len[60] =    8;	//repeat 29
wi_url[61] = "sim/cp/icons/0001011E.swf";  			wi_str[61] = "I Love U";						wi_len[61] =    9;	//repeat 30

//images preload:
var img_0 = new Image();  img_0.src= _IG_GetCachedUrl(IMAGE_BASE+"select_code_button.png");
var img_1 = new Image();  img_1.src= _IG_GetCachedUrl(IMAGE_BASE+"select_code_on.png");
var img_2 = new Image();  img_2.src= _IG_GetCachedUrl(IMAGE_BASE+"wink_button_on.png");
var img_3 = new Image();  img_3.src= _IG_GetCachedUrl(IMAGE_BASE+"back_button.png");
var img_4 = new Image();  img_4.src= _IG_GetCachedUrl(IMAGE_BASE+"back_button_on.png");
var img_5 = new Image();  img_5.src= _IG_GetCachedUrl(IMAGE_BASE+"getit_button.png");
var img_6 = new Image();  img_6.src= _IG_GetCachedUrl(IMAGE_BASE+"getit_button_on.png");

//functions:
function emoticon_button(num){
	
	if(flag_getit) return;
	
	reportInteraction("emoticon_button");
	
	if(num==0){
		if(flag_emoticon != 1)
			document.getElementById("emoticon_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
	}
	
	if(num==1){
		if(flag_emoticon != 1)
			document.getElementById("emoticon_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"emoticon_button_on.png");
	}

	if(num==2){
		if(flag_emoticon != 1){
			
			//turn wink button off:
			document.getElementById("wink_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
			flag_wink = 0;
			
			//turn amoticon button on:
			document.getElementById("emoticon_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"emoticon_button_on.png");
			flag_emoticon = 1;
			
			//show emoticon
			setEmoticon(start_with);
			
			//set play button image
			document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"stop_button.png");
		}
	}
}

function wink_button(num){
	
	if(flag_getit) return;
	
	reportInteraction("wink_button");
	
	if(num==0){
		if(flag_wink != 1)
			document.getElementById("wink_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
	}
	
	if(num==1){
		if(flag_wink != 1)
			document.getElementById("wink_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"wink_button_on.png");
	}
	
	if(num==2){
		if(flag_wink != 1){
			
			//turn amoticon button off:
			document.getElementById("emoticon_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
			flag_emoticon = 0;
			
			//turn wink button on:
			document.getElementById("wink_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"wink_button_on.png");
			flag_wink = 1;
			
			//show wink
			setWink(start_with);
			
			//set play button image
			document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"stop_button.png");
		}
	}
}

function getit_button(num){

	reportInteraction("getit_button");
	if(num==0){
		if(flag_getit != 1){
			document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"getit_button.png");
		}
		if(flag_getit == 1)
			document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"back_button.png");
	}
	
	if(num==1){
		if(flag_getit != 1){
			document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"getit_button_on.png");
		}
		if(flag_getit == 1)
			document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"back_button_on.png");
	}
	
	if(num==2){
		if(flag_getit != 1){
			
			//clear wink timeout
			if(timeout_count){
				clearTimeout(h_timeOut);
				timeout_count=0;
			}
			
			//show back button
			document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"back_button.png");
			
			//hide play button + name text
			document.getElementById("play_button").innerHTML="&nbsp;";
			document.getElementById("name_txt").innerHTML = "&nbsp;";
			
			//show getit text
			setEmbeddedCode();
			
			flag_getit = 1;
			
			is_playing=0;
		}
		else{
			
			//show getit button
			document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"getit_button.png");
			
			//show play button + name text + animation
			document.getElementById("play_button").innerHTML = "<img style='cursor:pointer' id='play_button_img' onclick='playButtonClick();reportInteraction(\"play\")' src='"+_IG_GetCachedUrl(IMAGE_BASE+"stop_button.png")+"' width='23' height='24' />";
			if(flag_emoticon==1){
				document.getElementById("name_txt").innerHTML = "<div style='height:16px; width:142px; overflow:hidden;'><span class='style2' id='object_name_txt'>" + em_str[start_with] +"</span></div>";
				setEmoticon(start_with);
				
			}
			if(flag_wink==1){
				document.getElementById("name_txt").innerHTML = "<div style='height:16px; width:142px; overflow:hidden;'><span class='style2' id='object_name_txt'>" + wi_str[start_with] + "</span></div>";
				setWink(start_with);
			}
			
			document.getElementById("prev_next_tr").style.display = "block";
			
			flag_getit = 0;
		}
	}
}

function select_code_button(num){

	if(num==0){
		document.getElementById("select_code_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"select_code_button.png");
	}
	
	if(num==1){
		document.getElementById("select_code_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"select_code_on.png");
	}
	
	if(num==2){
		//select code
		document.getElementById("code_emdbd").select();
	}
}	

var is_playing = 1;
function playButtonClick(){
	
	if(is_playing==0){
		
		//set flag
		is_playing=1;
		
		//set play button image
		if(flag_emoticon==1){
			setEmoticon(start_with);
		}
		if(flag_wink==1){
			setWink(start_with);
		}
		
		//set play button image
		document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"stop_button.png");
		
	}
	else{
		
		//clear wink timeout
		if(timeout_count){
			clearTimeout(h_timeOut);
			timeout_count = 0;
		}
	
		//set flag
		is_playing=0;
		
		//set play button image
		document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"play_button.png");
		
		//set thumbnail
		if(flag_emoticon==1){
			document.getElementById("main_animation").innerHTML = "<div><object><embed loop=false src='"+_IG_GetCachedUrl(CONTENT_BASE+"gadgets/labpix/emoticonofday.swf")+"' height='134' width='188' type='application/x-shockwave-flash'></embed></object></div>";
		}
		if(flag_wink==1){
			document.getElementById("main_animation").innerHTML = "<div><object><embed loop=false src='"+_IG_GetCachedUrl(CONTENT_BASE+"gadgets/labpix/winkofday.swf")+"' height='134' width='188' type='application/x-shockwave-flash'></embed></object></div>";
		}
	}
}
		
function setEmoticon(num){
	if(timeout_count){
		clearTimeout(h_timeOut);
		timeout_count = 0;
	}
	
	is_playing = 1;
	document.getElementById("name_txt").innerHTML = "<div style='height:16px; width:142px; overflow:hidden;'><span class='style2' id='object_name_txt'>" + em_str[num] +"</span></div>";
	document.getElementById("main_animation").innerHTML = "<div><object><embed src='" +_IG_GetCachedUrl(CONTENT_BASE+"sim/cp/icons/" + em_url[num]) + "' height='134' width='188' type='application/x-shockwave-flash'></embed></object></div>";
	
	if(timeout_count){
		clearTimeout(h_timeOut);
	}
	h_timeOut = setTimeout(clearWink,10000);
	timeout_count=1;
}

function setWink(num){
	
	if(timeout_count){
		clearTimeout(h_timeOut);
		timeout_count = 0;
	}
	
	is_playing = 1;
	document.getElementById("name_txt").innerHTML = "<div style='height:16px; width:142px; overflow:hidden;'><span class='style2' id='object_name_txt'>" + wi_str[num] + "</span></div>";
	document.getElementById("main_animation").innerHTML = "<div><object><embed src='" +_IG_GetCachedUrl(CONTENT_BASE+wi_url[num]) + "' height='134' width='188' type='application/x-shockwave-flash'></embed></object></div>";
	
	if(timeout_count){
		clearTimeout(h_timeOut);
	}
	h_timeOut = setTimeout(clearWink,(1000+(1000*wi_len[num])));
	timeout_count=1;
	
}

var h_timeOut = 0;
var timeout_count = 0;
function clearWink(){
		
		timeout_count=0;
	
		//set flag
		is_playing=0;
		
		//set play button image
		document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"play_button.png");
		
		//set thumbnail
		if(flag_emoticon==1){
			document.getElementById("main_animation").innerHTML = "<div><object><embed loop=false src='"+_IG_GetCachedUrl(CONTENT_BASE+"gadgets/labpix/emoticonofday.swf")+"' height='134' width='188' type='application/x-shockwave-flash'></embed></object></div>";
		}
		if(flag_wink==1){
			document.getElementById("main_animation").innerHTML = "<div><object><embed loop=false src='"+_IG_GetCachedUrl(CONTENT_BASE+"gadgets/labpix/winkofday.swf")+"' height='134' width='188' type='application/x-shockwave-flash'></embed></object></div>";
		}
}

function setEmbeddedCode(){
	
	document.getElementById("prev_next_tr").style.display = "none";
		
	document.getElementById("main_animation").innerHTML = "";
	
	//clear current animation + show help
	var str = "<div valign='top' align=left width='200' class='style4'>&nbsp;&nbsp;&nbsp;<b>Now it's easy to add SweetIM's<br>&nbsp;&nbsp;&nbsp;Emoticons and Winks to your blog!</b>";
	str = str + "<br><br>";
	str = str + "&nbsp;&nbsp;&nbsp;1) Select the code<br>";
	str = str + "&nbsp;&nbsp;&nbsp;2) Copy & Paste it into your blog's post</div>";
	str = str + "<div height=4 class=style1>&nbsp;</div>";
	str = str + "<textarea class='style3' rows='3' cols='32' readonly id='code_emdbd'></textarea><br>";
	str = str + "<div align=center><img style='cursor:pointer' onMouseOut='select_code_button(0)' onMouseOver='select_code_button(1)' onClick='select_code_button(2)' src='"+_IG_GetCachedUrl(IMAGE_BASE+"select_code_button.png")+"' width='83' height='24' border='0' id='select_code_button_img'/></div>";
	
	document.getElementById("main_animation").innerHTML = str;
	
	//show code	
	if(flag_emoticon){
		document.getElementById("code_emdbd").value = "<embed src='" + "http://content.sweetim.com/sim/cp/icons/" + em_url[start_with] + "' height='134' width='188' type='application/x-shockwave-flash'></embed><br /><a style='text-decoration: none; font-family: Verdana, Arial; font-size: 10px; color: #FF0000; letter-spacing: -1px; padding-left: 45px;' href='http://www.sweetim.com/s.asp?pid=236&cmpid=119900&plcmtid=74940011&cveid=22920000&cont=(000108BE)' target='_blank'>powered by <strong>SweetIM</strong></a>";
	}
	
	if(flag_wink){
		document.getElementById("code_emdbd").value = "<embed src='" + "http://content.sweetim.com/" + wi_url[start_with] + "' height='134' width='188' type='application/x-shockwave-flash'></embed><br /><a style='text-decoration: none; font-family: Verdana, Arial; font-size: 10px; color: #FF0000; letter-spacing: -1px; padding-left: 45px;' href='http://www.sweetim.com/s.asp?pid=236&cmpid=119900&plcmtid=74940011&cveid=22920000&cont=(000108BE)' target='_blank'>powered by <strong>SweetIM</strong></a>";
	}
}
					
function initModule(){

	//turn amoticon button on:
	document.getElementById("emoticon_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"emoticon_button_on.png");
	flag_emoticon = 1;
	
	//find the current animation according date
	var start_date = new Date();
	var today_date = new Date();
	var days_since = 1;
	start_date.setFullYear(2007,3,7);
	days_since = ( today_date.getTime() - start_date.getTime() ) / (1000*60*60*24);
	start_with = days_since%size;
	start_with = start_with + 1 ;
	//debug
	//start_with = Math.floor(Math.random()*size);
	//start_with = 22;
	
	//show emoticon
	//alert(start_with);
	start_with = Math.floor(start_with);
	setEmoticon(start_with);	
}

function move_anim(num){

	reportInteraction("move_anim");
	start_with=start_with+num;
	if(start_with>size){
		start_with=1;
	}else if(start_with<1){
		start_with=size;
	}
	
	//set flag
	is_playing=1;
	
	//set play button image
	if(flag_emoticon==1){
		setEmoticon(start_with);
	}
	if(flag_wink==1){
		setWink(start_with);
	}
	
	//set play button image
	document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"stop_button.png");
	
}

</script>
</head>
<body>

<center>
<table id="main_table" width="250" height="240" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px;">
	<tr>
		<td height="6"><span class="style1">&nbsp;</span></td>
	</tr>
	<tr>
		<td height="23">
			<table width="250" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="8" class="style1">&nbsp;</td>
					<td width="71"  style="cursor:pointer" onMouseOut="emoticon_button(0)" onMouseOver="emoticon_button(1)" onClick="emoticon_button(2)"><img id="emoticon_button_img" width="71" height="23" /></td>
					<td width="73"  style="cursor:pointer" onMouseOut="wink_button(0)" onMouseOver="wink_button(1)" onClick="wink_button(2)"><img id="wink_button_img" width="73" height="23" /></td>
					<td width="9" class="style1">&nbsp;</td>
					<td width="82" class="style1" ><a href="http://www.sweetim.com/s.asp?pid=236&cmpid=119900&plcmtid=74940011&cveid=22920000&cont=(000108BE)" target="_blank"><img id="just_placer" width="82" height="23" border="0"></a></td>
					<td width="7" class="style1">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="10"><span class="style1">&nbsp;</span></td>
	</tr>
	<tr>
		<td width="250" height="166">
			<table width="250" height="166" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="146" class="style1" width="11">&nbsp;</td>
					<td height="146" width="228" xbgcolor="yellow" align="center" id="main_animation" style="overflow:hidden;">&nbsp;</td>
					<td height="146" class="style1" width="11">&nbsp;</td>
				</tr>
				<tr>
					<td align="center" xbgcolor=pink colspan="3" class="style7"><div id="prev_next_tr"><span onclick="move_anim((-1));" style="cursor:pointer;" onmouseout="this.style.color='05385E';" onmouseover="this.style.color='0064AE';">&laquo;&nbsp;prev</span>&nbsp;&nbsp;|&nbsp;&nbsp;<span onclick="move_anim(1);" style="cursor:pointer;" onmouseout="this.style.color='05385E';" onmouseover="this.style.color='0064AE';">next&nbsp;&raquo;</span></div></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="24">
			<table width="250" height="24" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="12" class="style1">&nbsp;</td>
					<td width="23"  id="play_button"><img style="cursor:pointer" onclick="playButtonClick(); reportInteraction('play')" id="play_button_img" width="23" height="24" /></td>
					<td width="152" id="name_txt"><div style="height:16px; width:142px; overflow:hidden;"><span class="style2" id="object_name_txt">Loading...</span></div></td>
					<td width="50" style="cursor:pointer" onMouseOut="getit_button(0)" onMouseOver="getit_button(1)" onClick="getit_button(2)"><img width="50" height="24" border="0" id="getit_button_img" /></td>
					<td width="13" class="style1">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="11"><span class="style1">&nbsp;</span></td>
	</tr>
</table>

<div style="margin-top:5px;">
	<!-- PUT THIS TAG IN DESIRED LOCATION OF SLOT daily_sweetim_txt -->
	<script type="text/javascript">
	  GA_googleFillSlot("daily_sweetim_txt");
	</script>
	<!-- END OF TAG FOR SLOT daily_sweetim_txt -->
</div>

</center>
	
	
<!-- init module operations -->
<script type="text/javascript" >

	var $lp=jQuery.noConflict();
	var pageTracker = _gat._getTracker("UA-345375-1");
	pageTracker._initData();		
	var sweetTracker = pageTracker._createEventTracker('sweetim');
		
	function reportInteraction(tp) {		
		sweetTracker._trackEvent("Click",tp);
	}
	
	_IG_RegisterOnloadHandler(function() {
	
		document.getElementById('main_table').style.background = "transparent url("+_IG_GetCachedUrl(IMAGE_BASE+"background.png")+") 0px 0px no-repeat";
		document.getElementById("emoticon_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
		document.getElementById("wink_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
		document.getElementById("just_placer").src=_IG_GetCachedUrl(IMAGE_BASE+"transparent.gif");
		document.getElementById("play_button_img").src = _IG_GetCachedUrl(IMAGE_BASE+"stop_button.png");
		document.getElementById("getit_button_img").src=_IG_GetCachedUrl(IMAGE_BASE+"getit_button.png");
		
		initModule();
	});
	
	_IG_Analytics("UA-345375-1", "/sweetim");

</script>
		
		]]> 
	</Content>
</Module>

	
	
	
	
