function getuser(src)
{
	var I = src.substr(src.indexOf("?tomuserid=") + 11).length;
	
	if (0 >= I) return -1;
	if (I == src.length) return -1;
	return src.substr(src.indexOf("?tomuserid=") + 11,src.indexOf("&tomusername=") - src.indexOf("?tomuserid=") - 11);
}

function getuname(src)
{
	var I = src.substr(src.indexOf("&tomusername=") + 13).length;
	var T = src.indexOf("&tomusername=");
	if (0 >= T) return "";
	if (I == src.length) return -1;
	return src.substr(src.indexOf("&tomusername=") + 13);
}

function gourl(urls, Height, Width)
{
	var I,i;

	for (i=0;i<document.scripts.length;i++)
	{
		if (null != document.scripts[i].src)	
		{
			I = getuser(document.scripts[i].src);
			if (0 < I)
			{
				break;
			}	
		}
	}
	
	if (0 >= I)
	{
		window.open(urls,'','height=' + Height + ' ,width=' + Width + ',resizable=no,location=yes');
	}
	else
	{
		urls= urls + "&user_id=" + I;
		window.open(urls,'','height=' + Height + ' ,width=' + Width + ',resizable=no,location=yes');
	}

}

function go(urls)
{
	var I,i;

	for (i=0;i<document.scripts.length;i++)
	{
		if (null != document.scripts[i].src)	
		{
			I = getuser(document.scripts[i].src);
			if (0 < I)
			{
				break;
			}	
		}
	}
	
	if (0 >= I)
	{
		window.open(urls);
	}
	else
	{
		urls= urls + "&user_id=" + I;
		window.open(urls);
	}

}

function gologin(urls, Height, Width)
{
	var I,i;

	for (i=0;i<document.scripts.length;i++)
	{
		if (null != document.scripts[i].src)	
		{
			I = getuname(document.scripts[i].src);
			if (0 < I.length)
			{
				break;
			}	
		}
	}

	urls= urls + "?up_line=" + I;
	open(urls,'','height=' + Height + ' ,width=' + Width + ',location=yes,scrollbars=yes');
}document.write("<style type=\"text/css\">");
document.write(".px14 {  font-size: 14px}");
document.write(".sms p {line-height: 150%}");
document.write(".sms  {  font-size: 12px}");
document.write(".sms a:link {color: #003333;text-decoration:underline}");
document.write(".sms a:visited { color: #000000; text-decoration:underline}");
document.write(".sms a:hover {color:#ff0000;text-decoration:underline}");
document.write(".sms a:active {color: #003333; text-decoration:underline}");
document.write("</style>");
document.write("<table class=sms  width=\"155\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" bgcolor=\"#003333\">");
document.write("  <tr> ");
document.write("    <td width=\"84\"><a href=\"#\" onClick=\"gologin(\'http://usms.tom.com/login.php\',600,780)\"><img src=\"http://usmsad.tom.com/usmsweb/images/tomsmslogo.gif\" width=\"84\" height=\"19\" border=\"0\"></a></td>");
document.write("    <td width=\"71\" align=\"right\"><a href style=\"cursor: hand ; text-decoration: none\" onClick=\"go(\'http://usms.tom.com/smslist.php?inc=2&type=3\')\"><font color=\"#FFFF00\" class=px14><b>0→8001</b></font></a>&nbsp;</td>");
document.write("  </tr>");
document.write("</table>");
document.write("<table class=sms  width=\"155\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" bgcolor=\"003333\">");
document.write("  <tr bgcolor=\"#FFFFFF\"> ");
document.write("    <td>");
document.write("      <table class=sms  width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">");
document.write("        <tr> ");
document.write("          <td width=\"76\"><a href style=\"cursor: hand\" onClick=\"go(\'http://usms.tom.com/smslist.php?inc=3&type=6\')\"><font color=red>手机铃声</font></a></td>");
document.write("          <td width=\"74\"><a href style=\"cursor: hand\" onClick=\"go(\'http://usms.tom.com/smslist.php?inc=2&type=3\')\"><font color=red>诺基亚大图</font></a></td>");
document.write("        </tr>");
document.write("        <tr> ");
document.write("          <td colspan=4> ");
document.write("            <table class=sms  width=\"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">");
document.write("              <tr> ");
document.write("              <tr> ");
document.write("                <td width=\"83\" style=\"line-height:140%;padding: 0px 0px 0px 0px\" valign=\"middle\"> ");
document.write("                  <p style=\"line-height: 150%\">");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=1114&id1=1114&id2=3551&id3=10583&type=6&code_id=7&key=74db7f8537287d89f9cc4a492d0e75c2\',180,450);\">安妮(王杰)</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=1134&id1=1134&id2=0&id3=10781&type=6&code_id=7&key=c2129b7adb1a1dbaa91ba619beee9d55\',180,450);\">一想到你呀</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=5696&id1=5696&id2=0&id3=5720&type=6&code_id=7&key=e98af170cf96ea65996fd1b64cdd2654\',180,450);\">不该见面</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=1005&id1=1005&id2=0&id3=2627&type=6&code_id=7&key=44441493fff064b2bdd8e2c191904c29\',180,450);\">爱不后悔</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=1002&id1=1002&id2=0&id3=2630&type=6&code_id=7&key=f4025172f06ceacef9209901dfae18d7\',180,450);\">感觉不到你</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=1143&id1=1143&id2=0&id3=10564&type=6&code_id=7&key=550adbb7664c2b2d2f258b5ec1cb33dc\',180,450);\">姐妹(张惠妹)</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=7615&id1=7615&id2=0&id3=9630&type=6&code_id=7&key=5cd3bfab4bba5e93a922ad78129070f8\',180,450);\">微笑</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=5460&id1=5460&id2=5481&id3=5502&type=6&code_id=7&key=2e70edbe144599af468bc2bf552f949c\',180,450);\">麦兜与猪腩肉</a><br>");
document.write("<a href style=\"cursor:hand;\" onClick=\"gourl(\'http://sms.tom.com/fast_send_meet.php?inc=3&id=164&id1=164&id2=0&id3=10716&type=6&code_id=7&key=80118f4f44b5a6910a2e6ba39fc1ed7e\',180,450);\">昨日重现</a></p>");
document.write("                </td>");
document.write("                <td width=\"72\" valign=\"middle\">");
document.write("                        <img src=\"http://usmsad.tom.com/usmsweb/images/js_pic/155_224_pic1.gif\" width=\"74\" height=\"166\" border=\"0\"  usemap=\"#155_224_Map1\" >");
document.write("                          <map name=\"155_224_Map1\">");
document.write("                            <area shape=\"rect\" coords=\"1, 1,  74, 30 \" target=\"_self\" href=\"javascript:gourl(\'http://sms.tom.com/fast_send_meet.php?inc=2&type=3&code_id=7&id=20699&key=1d923923d3024d27d214589c5d31f9a4\',180,450);\">");
document.write("                            <area shape=\"rect\" coords=\"1, 35, 74, 64 \" target=\"_self\" href=\"javascript:gourl(\'http://sms.tom.com/fast_send_meet.php?inc=2&type=3&code_id=7&id=20673&key=75e9e0983f756c705dc95851a7a816e2\',180,450);\"> ");
document.write("                            <area shape=\"rect\" coords=\"1, 69, 74, 98 \" target=\"_self\" href=\"javascript:gourl(\'http://sms.tom.com/fast_send_meet.php?inc=2&type=3&code_id=7&id=20667&key=89e35cceb8f75508ca5040e6be63415f\',180,450);\">");
document.write("                            <area shape=\"rect\" coords=\"1, 103,74, 132\" target=\"_self\" href=\"javascript:gourl(\'http://sms.tom.com/fast_send_meet.php?inc=2&type=3&code_id=7&id=20665&key=f26236190d93e6b8f88c95d7c560d28c\',180,450);\">");
document.write("                            <area shape=\"rect\" coords=\"1, 137,74, 166\" target=\"_self\" href=\"javascript:gourl(\'http://sms.tom.com/fast_send_meet.php?inc=2&type=3&code_id=7&id=20661&key=a82717c380aba55f7942faf914e9d2af\',180,450);\"> ");
document.write("                          </map>");
document.write("                </td>");
document.write("              </tr>");
document.write("            </table>");
document.write("          </td>");
document.write("        </tr>");
document.write("      </table>");
document.write("    </td>");
document.write("  </tr>");
document.write("</table>");
