var protocol = "http";

if ("https:" == document.location.protocol)
    protocol = "https";
    
function CMM_getBanner( strMenuCode )
{
	if ( strMenuCode == "" || strMenuCode == null )
		return;
		
	switch ( strMenuCode )
	{
		case "www" :
			CMM_getWWWSide();
			break;
		case "chat" :
			//CMM_getWWWSide();
			CMM_getCHATSide();
			break;	
		case "gold" :
			CMM_getGoldSide();
			break;	
		case "game" :
			CMM_getGameSide();
			break;	
	}
}

function CMM_getCHATSide()
{
	var strUrl = "" + document.location + "";
	
	strUrl = strUrl.toLowerCase()
	if ( strUrl == "http://www.seenjoy.com/chat_main.asp" )
	{
	
		document.writeln("<div id='sideBanner4' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170);top:75;width:173;height:426'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><IFRAME frameborder=0 marginheight=0 marginwidth=0 scrolling=no width='173' height='426' src='http://mmchat.seenjoy.com/webchat/winampbest.aspx'></IFRAME></td></tr>" +
						"<tr><td height='3'></td></tr></table></div> " );				
	
	}
	
	document.writeln("<div id='sideBanner5' style='position:absolute;left:expression((document.body.clientWidth)/2+400);top:82;width:150;height:65'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><iframe src=\"http://msg.seenjoy.com/banner/20050921/avatar.asp\" width=\"0\" height=\"0\" frameborder=\"0\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\"></iframe></td></tr> " +
					"<tr><td height='3'></td></tr></table> " +
					"</div> " );
	
}

function OpenWinamp2006()
{
	window.open("http://winamp.seenjoy.com/", "winamp","width=800,height=600,scrollbars=no, status=yes,top=100,left=100");	
}

function OpenAttendance()
{
	window.open("http://www.seenjoy.com/Popup/Event/20061101/calendar.asp", "Attendance","width=623,height=600,scrollbars=yes, status=yes,top=50,left=50");	
}

function CMM_getWWWSide()
{
	if (  Math.round( Math.random() )   )
	{
	/*
		document.writeln("<div id='sideBanner2' style='position:absolute;left:expression((document.body.clientWidth)/2+400);top:75;width:117;height:306'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><a href='http://www.ilikeclick.com/track/click.php?dts_code=100378070020002383000011922200000000000&DTS_UID=' target='_blank'><img src='http://ad.ilikeclick.com:6200/dtssuperbanner?dts_code=100378070020002383000011922200000000000&DTS_UID=' border='0' width='120' height='600'></a></td></tr> " +
					"<tr><td height='3'></td></tr></table> " +
					"</div> " );
	*/	
	}else
	{
	}

	document.writeln("<div id='sideBanner3' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170);top:75;width:172;height:90'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><a href='javascript:OpenWinamp2006()' ><img src='" + protocol + "://www.seenjoy.com/images/banner/20060925/winampBanner.gif' border=0></a></td></tr> " +
					"<tr><td height='3'></td></tr></table></div> " );
	
//	document.writeln("<div id='sideBanner5' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170+0);top:155;width:172;height:50'> " +
//					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
	//					"<tr><td height='70'><a href='http://211.39.144.67:9999/listen.pls' ><img src='" + protocol + "://www.hanacast.com/Files/BannerImg/noimg/ban01.gif' width='172' border=0></a></td></tr> " +
//					"<tr><td height='3'></td></tr></table></div> " );
//	
//	document.writeln("<div id='sideBanner5' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170+0);top:220;width:172;height:50'> " +
//					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
	//					"<tr><td height='70'><a href='http://211.39.144.67:1818/listen.pls' ><img src='" + protocol + "://www.hanacast.com/Files/BannerImg/aidlbr87/---.gif' width='172' border=0></a></td></tr> " +
//					"<tr><td height='3'></td></tr></table></div> " );					
	
	document.writeln("<div id='sideBanner4' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170);top:285;width:173;height:426'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><IFRAME frameborder=0 marginheight=0 marginwidth=0 scrolling=no width='173' height='426' src='http://mmchat.seenjoy.com/webchat/winampbest.aspx'></IFRAME></td></tr>" +
					"<tr><td height='3'></td></tr></table></div> " );
	
	
	
	
/*	
	if ( g_struserid != "" )
	{
		document.writeln("<div id='sideBanner3' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170);top:165;width:172;height:306'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><a href='javascript:OpenAttendance()' ><img src='" + protocol + "://www.seenjoy.com/popup/event/20061101/images/Banner20061031.jpg' border=0></a></td></tr> " +
					"<tr><td height='3'></td></tr></table></div> " );
	}else
	{
		document.writeln("<div id='sideBanner3' style='position:absolute;left:expression((document.body.clientWidth)/2-400-170);top:165;width:172;height:306'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><a href='Login_Confirm.asp' ><img src='" + protocol + "://www.seenjoy.com/popup/event/20061101/images/Banner20061031.jpg' border=0></a></td></tr> " +
					"<tr><td height='3'></td></tr></table></div> " );
	}
*/


}

function CMM_getGoldSide()
{

}

function CMM_getGameSide()
{

	document.writeln("<div id='sideBanner1' style='position:absolute;left:expression((document.body.clientWidth)/2+445);top:82;width:150;height:65'> " +
					"<TABLE WIDTH=100 BORDER=0 CELLPADDING=0 CELLSPACING=0 > " +
					"<tr><td height='70'><iframe src=\"http://msg.seenjoy.com/banner/20050921/avatar.asp\" width=\"160\" height=\"600\" frameborder=\"0\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\"></iframe></td></tr> " +
					"<tr><td height='3'></td></tr></table> " +
					"</div> " );

}