﻿/**
 * <pre>
 * Copyright (c) 2004-2006 by Soyui, Inc.
 * All rights reserved.
 * </pre>
 */
 /**
  * 扩展String,全部替换
  */
 String.prototype.replaceAll = function(AFindText,ARepText){
	raRegExp = new RegExp(AFindText,"g");
	return this.replace(raRegExp,ARepText)
};

if (typeof Soyui == 'undefined') {
  /**
   * Namespace definition.
   * @constructor
   */
  Soyui = function() {};
}
Soyui.isDebug = false;
Soyui.txtDebug = "txtDebug";
/**
 * Returns path from the last loaded script element. Splits src attribute value
 * and returns path without js file name.
 *
 * <p><strong>
 * Note: This function should not be called from another function. It must be
 * invoked during page load to determine path to js file from which it is called
 * correctly.
 * </strong></p>
 *
 * @private
 * @return Path to the script, e.g. '../src/' or '' if path is not found
 * @type string
 */
Soyui.getPath = function() {
  // Get last script element
  var objContainer = document.body;
  if (!objContainer) {
    objContainer = document.getElementsByTagName('head')[0];
    if (!objContainer) {
      objContainer = document;
    }
  }
  var objScript = objContainer.lastChild;
  // Get path
  var strSrc = objScript.getAttribute('src');
  if (!strSrc) {
    return '';
  }
  var arrTokens = strSrc.split('/');
  // Remove last token
  arrTokens = arrTokens.slice(0, -1);
  if (!arrTokens.length) {
    return '';
  }
  return arrTokens.join('/') + '/';
};

/**
 * Simply writes script tag to the document.
 *
 * @private
 * @param {string} strSrc Src attribute value of the script element
 */
Soyui.include = function(strSrc) {
  document.write('<s' + 'cript type="text/javascript" src="' + strSrc +
   '"></s' + 'cript>');
};

/**
 * Path to main Soyui script.
 * @private
 */
Soyui.Path = Soyui.getPath();

// Include required scripts
Soyui.include(Soyui.Path + 'utils.js');
Soyui.include(Soyui.Path + 'message.js');
Soyui.include(Soyui.Path + 'menu/add.js');
var dmWorkPath=Soyui.Path + 'menu/';
Soyui.include(Soyui.Path + 'menu/dmenu.js');
Soyui.include(Soyui.Path + 'check.js');
Soyui.include(Soyui.Path + 'ajax.js');
Soyui.include(Soyui.Path + 'common.js');
Soyui.include(Soyui.Path + 'tag.js');
Soyui.include(Soyui.Path + 'popup.js');
Soyui.include(Soyui.Path + 'swfobject.js');
// Replace Soyui.include with more complex function from transport library
if (Soyui.Transport && Soyui.Transport.include) {
  Soyui.include = Soyui.Transport.include;
}
function keyPreview(e)
{
	// disable vk_return, util.js::disableEnterKey()
	if(Soyui.is_ie)
	{
		alert(event.keyCode);
	}
/*	if (evt.keyCode == 13) {
		alert(evt.keyCode);
		if (document.activeElement.type == "text" || document.activeElement.type == "password" || document.activeElement.type == "file") return false;
	}
	if (evt.keyCode == 113) {
		alert(evt.keyCode);
	}*/
	return false;
};

//document.onkeydown = keyPreview;//new Function("return keyPreview(event)");
//window.document.oncontextmenu=function(){return false};
var _uid="";
var _did="";
Soyui.getUnread = function()
{
	var wstrMsg = "";
	if(!Soyui.Check.isEmpty(_uid))
	{
		var ajax = new Soyui.Ajax(soyui_root + "/user/news.do", 0, "act=unread", Soyui.showUnread, null);
		ajax.get();
	}
	setTimeout("Soyui.getUnread()",30*1000);
}

Soyui.showUnread = function(request)
{
	var text = request.responseText;
	var wstrMsg = "";
	var wintCount = 0;
	if(Soyui.Check.isEmpty(text))
	{
		text = "0";
	}
	wstrMsg = "您有<a href=\"" + soyui_root + "/user/news.do?act=view\" target=\"_blank\">" + text + "</a>条未读消息";
	var obj = document.getElementById("_unreadNews");
	if(obj)
	{
		obj.innerHTML = wstrMsg;
	}
}
//var soyui_root = "/soyui";
var g_src_welcome = soyui_root + "/welcome.do";
var g_src_reg = soyui_root + "/register.do";
var g_src_user = soyui_root + "/user/view.do";
var g_src_goods = soyui_root + "/mall/view.do";
var g_src_party = soyui_root + "/party/party.do";
var g_src_debate = soyui_root + "/party/debate.do";
var g_src_pour = soyui_root + "/party/pour.do";
var g_src_logon = soyui_root + "/logon.do";
var g_src_twitter = soyui_root + "/user/twitter.do";
var g_src_album = soyui_root + "/user/album.do";
var g_src_message = soyui_root + "/user/message.do";
var g_src_newfeed = soyui_root + "/user/newfeed.do";
var g_src_media = soyui_root + "/avalbum.do";
var g_src_question = soyui_root + "/question.do";
var g_src_trade = soyui_root + "/user/trade.do";
var g_src_friend = soyui_root + "/user/friend.do";
var g_src_visit = soyui_root + "/user/visit.do";
var g_src_search_goods = soyui_root + "/mall/search.do";
var g_src_cart = soyui_root + "/mall/cart.do";
var g_src_cart = soyui_root + "/mall/cart.do";
var g_src_app = soyui_root + "/app.do";
var g_src_snews = soyui_root + "/snews.do";
var g_src_invite = soyui_root + "/invite.do";
var g_hid_visitor_sid = "hidVisitorSid";

/*转到注册页面*/
Soyui.goReg=function()
{
	window.location.href = g_src_reg;
}
/*转到邀请页面*/
Soyui.goInvite=function(){
	top.location.href = g_src_invite;
}
/*转到登录页面*/
Soyui.goLogon=function(url)
{
	//alert(window.location.href);
///	Soyui.Utils.setCookie("LAST_URL",window.location.href);
	if(Soyui.Check.isNothing(url)){
		window.location.href = g_src_welcome;
	}else{
		window.location.href = g_src_welcome + "?url=" + encodeURIComponent(url);
	}
}
Soyui.isLogon = function(){
	var sid = $V(g_hid_visitor_sid);
	if(Soyui.Check.isEmpty(sid)){
		return false;
	}
	return true;
}
/*用户页面*/
Soyui.viewUser=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_user + "?act=view&uid=" + id;
	window.location.href = url;
}
Soyui.jump2User=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_user + "?act=view&uid=" + id;
	window.top.open(url);
}
/*产品页面*/
Soyui.viewGoods=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_goods + "?act=view&gid=" + id;
	window.location.href = url;
}
/*派对详细*/
Soyui.viewParty=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_party + "?pid=" + id;
	top.location.href = url;
}
/*辩论详细*/
Soyui.viewDebate=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_debate + "?deid=" + id;
	top.location.href = url;
}
/*互助详细*/
Soyui.viewPour=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_pour + "?upid=" + id;
	top.location.href = url;
}
/**安全退出*/
Soyui.logout=function(){
	var wstrVisitor= $V("hidVisitor");
	if(!Soyui.Check.isEmpty(wstrVisitor)){
		var post = "act=logout&uid=" + wstrVisitor;
		var ajaxObj = new Soyui.Ajax(g_src_logon, 0, post, Soyui.logout.complete, null);
		ajaxObj.post();
	}else{
		window.location.href = g_src_welcome;
	}
}
Soyui.logout.complete=function(request){
	var xmlDoc = request.responseXML;
	var results = xmlDoc.getElementsByTagName("Result");
	var result;
	
	var hasError = "";
	var wstrMsg = "";
	for (var i=0;i<results.length;i++)
	{
		result = results[i];
		hasError = Soyui.Ajax.getNodeValue(result.getElementsByTagName("HasError")[0]);
		wstrMsg = Soyui.Ajax.getNodeValue(result.getElementsByTagName("MSG")[0]);
	}
	if(hasError=="1"){
		alert(wstrMsg);
	}else{
		Soyui.goLogon();
	}
}
Soyui.show = function(id)
{
//	alert("showDIV");
	var obj = $(id);
	obj.style.display = "";
}
Soyui.hide = function(id)
{
	var obj = $(id);
	obj.style.display = "none";
}
Soyui.switchShow = function(id){
	var obj = $(id);
	if(obj.style.display == "none")
	{
		obj.style.display = "";
	}else{
		obj.style.display = "none";
	}
}
/*id1:base div*/
Soyui.switchShow2 = function(id1, id2)
{
//	alert("switchDIV");
	var obj1 = $(id1);
	var obj2 = $(id2);
	if(obj1.style.display == "none")
	{
		obj1.style.display = "";
		obj2.style.display = "none";
	}else{
		obj1.style.display = "none";
		obj2.style.display = "";
	}
}
/**取消事件*/
Soyui.cancel = function(evt){
	evt = (evt) ? evt : window.event;
    evt.cancelBubble = true;
    evt.returnValue = false;
}
/*Twitter*/
Soyui.viewUserTwitter=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_twitter + "?act=view&page=1&uid=" + id;
	window.location.href = url;
}
/*相册*/
Soyui.viewUserAlbum=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_album + "?act=view&page=1&uid=" + id;
	window.location.href = url;
}
/*留言*/
Soyui.viewUserMessage=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_message + "?act=view&page=1&uid=" + id;
	window.location.href = url;
}
/*新情况*/
Soyui.viewUserNewfeed=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_newfeed + "?act=view&page=1&uid=" + id;
	window.location.href = url;
}
/*视频*/
Soyui.viewUserVideo=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_media + "?act=view&av_type=2&page=1&uid=" + id;
	window.location.href = url;
}
/*音乐*/
Soyui.viewUserAudio=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_media + "?act=view&av_type=1&page=1&uid=" + id;
	window.location.href = url;
}
/*测试*/
Soyui.viewUserQuestion=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_question + "?act=friendqs&ufid=" + id;
	window.location.href = url;
}
Soyui.go2QuestionHome=function(){
	var url = g_src_question;
	window.location.href = url;
}
//看好友的测试(只能看).
Soyui.go2ViewFriendQsDtl = function(ustrUF_ID, ustrTQ_ID){
	if(Soyui.Check.isEmpty(ustrUF_ID)||Soyui.Check.isEmpty(ustrTQ_ID))
		return;
	var url = g_src_question + "?act=friendQsDtl&ufid=" + ustrUF_ID + "&tqid=" + ustrTQ_ID + "&tqno=1";
	window.location.href = url;
}
/*购买记录*/
Soyui.viewUserBuy=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_trade + "?act=view&page=1&uid=" + id;
	window.location.href = url;
}
/*好友*/
Soyui.viewUserFriend=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_friend + "?act=view&page=1&uid=" + id;
	window.location.href = url;
}
/*被访问记录*/
Soyui.viewUserVisited=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_visit + "?act=view&type=visited&uid=" + id;
	window.location.href = url;
}
/*访问记录*/
Soyui.viewUserVisit=function(id){
	if(Soyui.Check.isEmpty(id))
		return;
	var url = g_src_visit + "?act=view&type=visit&uid=" + id;
	window.location.href = url;
}
/*播放音乐*/
Soyui.playAudio=function(url){
	if(Soyui.Check.isEmpty(url))
		return;
	window.open(encodeURI(url));
}
/*播放视频*/
Soyui.playVideo = function(url){
	if(Soyui.Check.isEmpty(url))
		return;
	window.open(encodeURI(url));
}
//用户图片 
var g_div_user_image = "__divUserImage";
Soyui.showUserImage=function(lineno){
	if(Soyui.Check.isEmpty(lineno))
		return;
	var	cont="<div css='result' id='" + g_div_user_image + "'></div>";
	showPopWin(500, null, '图片详细',cont, null);
	
	//var wstrView = $V(_ua_hid_view);
	var post = "act=detail&lineno=" + Soyui.Utils.TrimString(lineno);
	var ajaxObj = new Soyui.Ajax(g_src_album, 0, post, Soyui.showUserImage.complete, g_div_user_image);
	ajaxObj.get();
}
Soyui.showUserImage.complete=function(request){
	var xmlDoc = request.responseXML;
	var results = xmlDoc.getElementsByTagName("result");
	var result;
	var objTarget = $(g_div_user_image);
	var objUL = document.createElement("ul");
	objTarget.appendChild(objUL);
	
	for (var i=0;i<results.length;i++)
	{
		var result = results[i];
		var LINE_NO = Soyui.Ajax.getNodeValue(result.getElementsByTagName("LINE_NO")[0]);
		var U_ID = Soyui.Ajax.getNodeValue(result.getElementsByTagName("U_ID")[0]);
		var URL = Soyui.Ajax.getNodeValue(result.getElementsByTagName("URL")[0]);
		var NAME = Soyui.Ajax.getNodeValue(result.getElementsByTagName("NAME")[0]);
		var objName = document.createElement("LI");
		var objLI = document.createElement("LI");
		var objIMG = new Image();//objTarget.document.createElement("IMG");
		objName.innerHTML = NAME;
		objUL.appendChild(objName);
		objIMG.src = URL;
		//objIMG.className="";
		objIMG.onload=function(){
			Soyui.Common.thumbImg(objIMG, 600, 480);
			objIMG.onload = function(){};
			//alert(objIMG.width);
			resizePopWin(objIMG.width+22, objIMG.height+22);
		}
		objIMG.src = URL;
		objLI.appendChild(objIMG);
		objUL.appendChild(objLI);
	}
}
/* flash menu click */
Soyui.fromFlash = function(type, arg2){
	var wstrType = type.toLowerCase();
//	alert(wstrType);
	switch(wstrType){
	case "homepage":
		Soyui.goLogon();
		//Soyui.logout();
		break;
	case "welcome":
		top.location.href = g_src_welcome;
		break;
	case "mall":
		top.location.href = soyui_root + "/mall/search.do?act=search&type=advs&gc_type=6&bc=72&sc=%E5%8A%9F%E8%83%BD%E5%AE%B6%E5%85%B7&page=1";
		break;
	case "whatissoyui":
		top.location.href = g_src_app + "?id=whatis";
		break;
	case "download":
		top.location.href = g_src_app + "?id=download";
		break;
	case "news":
		top.location.href = g_src_snews + "?page=1";
		break;
	case "howtoplay":
		top.location.href = g_src_app + "?id=help";
		break;
	case "suggest":
		top.location.href = g_src_app + "?id=suggest";
		break;
	case "contact":
		top.location.href = g_src_app + "?id=contact";
		break;
	case "guide":
		top.location.href = g_src_app + "?id=guide&step=" + arg2;
		break;
	case "party":
		top.location.href = g_src_app + "?id=party";
		break;
	case "ktv":
		top.location.href = g_src_app + "?id=ktv";
		break;
	case "debate":
		top.location.href = g_src_app + "?id=debate";
		break;
	case "pour":
		top.location.href = g_src_app + "?id=pour";
		break;
	case "maze":
		top.location.href = g_src_app + "?id=maze";
		break;
	case "gffs":
		top.location.href = g_src_app + "?id=gffs";
		break;
	case "garden":
		top.location.href = g_src_app + "?id=garden";
		break;
	case "house":
		top.location.href = g_src_app + "?id=house";
		break;
	case "gadv":
		top.location.href = g_src_app + "?id=gadv";
		break;
	case "buddypoke":
		top.location.href = g_src_app + "?id=buddypoke";
		break;
	case "invite":
		Soyui.goInvite();
		break;
	default:
		break;
	}
}
Soyui.addFriend = function(ufid){
}
//试穿/试用
Soyui.tryGoods = function(g_id, g_sex, g_class, g_sub_class)
{
	var sid = $V(g_hid_visitor_sid);
	var sex = $V("hidVisitorSex");
	if(g_sex!="0"){
		if(sex!=g_sex){
			if(g_sex=="1"){
				alert("男性商品.");
			}else{
				alert("女性商品.");
			}
			return;
		}	
	}
	if(Soyui.Check.isEmpty(sid)){
		alert("没有登录.");
		return;
	}
	if(Soyui.Check.isEmpty(g_id)){
		alert("没有选择商品.");
		return;
	}
	if(Soyui.Check.isEmpty(g_class)){
		return;
	}
	if(Soyui.Check.isEmpty(g_sub_class))return;
	if(parseInt(g_class) < 60)
	{
		var url = "soyui:///__fittingRoom?act=try&sid=" + sid + "&gid=" + g_id;
		url += "&gclass=" + g_class;
		url += "&gsubclass=" + g_sub_class;
		window.open(url, "__hid_frame", "height=100,width=100,status=no,toolbar=no,menubar=no,location=no");
		//if (g_win_try_goods != null) {
			//setTimeout(Soyui.closeTryGoods, 200);
		//}
	}
}
/*Soyui.closeTryGoods = function(){
	if(g_win_try_goods != null){
		if(typeof g_win_try_goods.close == 'undefined')
			return;
		g_win_try_goods.opener=null;
		g_win_try_goods.close();
		g_win_try_goods = null;
	}
}*/
//添加到购物车
Soyui.addToCart = function(gid){
	var wstrG_ID = gid;
	if(Soyui.Check.isEmpty(wstrG_ID))
	{
		return;
	}
	var src = g_src_cart;
	var post = "act=add&gid="+wstrG_ID;
	var ajaxObj = new Soyui.Ajax(src, 0, post, Soyui.show_ajax_msg, null);
	ajaxObj.post();

}
Soyui.show_ajax_msg = function(request){
	var xmlDoc = request.responseXML;
	if(!xmlDoc){
		return;
	}
	var results = xmlDoc.getElementsByTagName("Result");
	var result;
	var hasError, wstrMsg;
	for (var i=0;i<results.length;i++){
		result = results[i];
		hasError = Soyui.Ajax.getNodeValue(result.getElementsByTagName("HasError")[0]);
		wstrMsg = Soyui.Ajax.getNodeValue(result.getElementsByTagName("MSG")[0]);
	}
	if(hasError == "0"){
		alert(wstrMsg);
	}else{
		if(!Soyui.Check.isEmpty(wstrMsg))
			alert(wstrMsg);
	}
}
//显示购物车
Soyui.showCart = function(){
	var subwin = window.open(g_src_cart,"","top=" +(window.screen.availHeight-400)/2+",left=" + (window.screen.availWidth-700)/2 +",width=700,height=400,resizable=no,scrollbars=yes");
	//window.open(soyui_root + "/cart","","top=" +(window.screen.availHeight-400)/2+",left=" + (window.screen.availWidth-700)/2 +",width=700,height=400,resizable=no,scrollbars=yes");
	if(!subwin)subwin.focus();
}

Soyui.viewNewGoods = function(){
	var url = g_src_search_goods + "?act=viewnew";
	window.location.href = url;
}
Soyui.viewHotGoods = function(){
	var url = g_src_search_goods + "?act=viewhot";
	window.location.href = url;
}
Soyui.go2URI = function(uri){
	if(Soyui.Check.isEmpty(uri))
		return;
	if(Soyui.Check.isURL(uri))
	{
		window.top.location.href = uri;
		//window.location.href = uri;
	}else{
		window.top.location.href = soyui_root + uri;
		//window.location.href = soyui_root + uri;
	}
}
Soyui.jump2URI = function(uri){
	if(Soyui.Check.isEmpty(uri))
		return;
	if(Soyui.Check.isURL(uri))
	{
		window.open(uri);
		//window.location.href = uri;
	}else{
		window.open(soyui_root + uri);
		//window.location.href = soyui_root + uri;
	}
}
/*
 * 启动客户端.
 */
Soyui.startClient = function()
{
	var sid = $V(g_hid_visitor_sid);
	var url = "soyui:///?sid=" + sid;
	window.open(url, "__hid_frame", "height=0,width=0,status=no,toolbar=no,menubar=no,location=no");
}
/*
 * 去用户房间
 */
Soyui.go2UserRoom = function(uid, plid){
	//room?u_id=lyb&pl_id=105#u_105
	var sid = $V(g_hid_visitor_sid);
	if(Soyui.Check.isEmpty(sid)){
		alert("没有登录");
		return;
	}
	if(Soyui.Check.isEmpty(uid)||Soyui.Check.isEmpty(plid)){
		return;
	}
	var url = "soyui:///room?u_id=" + uid + "&pl_id=" + plid;
	url += "&sid=" + sid;
	url += "#u_" + plid;
	window.open(url, "__hid_frame", "height=100,width=100,status=no,toolbar=no,menubar=no,location=no");
}
/*
 * 加入Party.
 */
Soyui.joinParty = function(ownerid, pid, plid)
{
	var sid = $V(g_hid_visitor_sid);
	if(Soyui.Check.isEmpty(ownerid)||Soyui.Check.isEmpty(pid)||Soyui.Check.isEmpty(plid))
		return;
	var url = "soyui:///party?p_id=" + pid + "&pl_id=" + plid;
	url += "&u_id=" + ownerid;
	url += "&sid=" + sid;
	url += "#p_" + pid;
	window.open(url, "__hid_frame", "height=100,width=100,status=no,toolbar=no,menubar=no,location=no");
}
/*
 * 加入KTV.
 */
Soyui.joinKTV = function(ownerid, plid)
{
	var sid = $V(g_hid_visitor_sid);
	if(Soyui.Check.isEmpty(ownerid)||Soyui.Check.isEmpty(plid))
		return;
	var url = "soyui:///ktv?pl_id=" + plid;
	url += "&u_id=" + ownerid;
	url += "&sid=" + sid;
	url += "#u_" + plid;
	window.open(url, "__hid_frame", "height=100,width=100,status=no,toolbar=no,menubar=no,location=no");
}
Soyui.showUserLevel = function(objid, level){
	var ti = parseInt(level);
	if(isNaN(ti)){
		ti=0;
	}
	var wnMod = ti%8;
	var wnDiv = parseInt(ti/8);
	var obj = $(objid);
	obj.innerHTML = "";//"MOD:" + wnMod + "DIV:" + wnDiv;
	if(wnMod==0 && wnDiv==0)
		return;
	var div;
	for(var i=0;i<wnDiv;i++){
		div = document.createElement("DIV");
		div.className= "level8";
		obj.appendChild(div);
	}
	div = document.createElement("DIV");
	div.className= "level" + wnMod;
	obj.appendChild(div);
}
var g_tips_id = "__div_tips";
Soyui.showTips = function(uobj,evt){
	if(Soyui.Check.isNothing(uobj))
		return;
	var pos = KPos.get(uobj);
	var objTips = $(g_tips_id);
	if(Soyui.Check.isNothing(objTips)){
		objTips = document.createElement("DIV");
		objTips.id = g_tips_id;
		objTips.className = "tips";
		objTips.style.display = "none";
		document.body.appendChild(objTips);
	}
	if(uobj.title){uobj.soyui_title = uobj.title; uobj.title="";}
	if(uobj.soyui_title)
		objTips.innerHTML = uobj.soyui_title;
	objTips.style.position = "absolute";
	evt = (evt)?evt:window.event;
	var x,y;
	x = evt.clientX;
	y = evt.clientY+15;
	KPos.set(objTips,x,y);
	objTips.style.display = "block";
}
Soyui.hideTips = function(uobj){
	if(Soyui.Check.isNothing(uobj))
		return;
	var objTips = $(g_tips_id);
	if(!Soyui.Check.isNothing(objTips)){
		objTips.style.display = "none";
	//	objTips.style.visibility = "hidden";//"visiable";
	}
}
var g_div_show_image = "__divShowImage";
Soyui.showPopImage = function(simg){
	if(Soyui.Check.isNothing(simg)) return;
	var	cont="<div css='result' id='" + g_div_show_image + "'></div>";
	showPopWin(800, null, '',cont, null);
	
	var objTarget = $(g_div_show_image);
	var objUL = document.createElement("ul");
	objTarget.appendChild(objUL);
	var objName = document.createElement("LI");
	var objLI = document.createElement("LI");
	var objIMG = new Image();//objTarget.document.createElement("IMG");
	objName.innerHTML = (simg.title)?simg.title:"";
	objName.className = "font-notice";
	objUL.appendChild(objName);
	objIMG.src = simg.src;
	//objIMG.className="";
	objIMG.onload=function(){
		Soyui.Common.thumbImg(objIMG, 800, 600);
		objIMG.onload = function(){};
		//alert(objIMG.width);
		resizePopWin(objIMG.width+22, objIMG.height+22);
	}
	objIMG.src = simg.src;
	objLI.appendChild(objIMG);
	objUL.appendChild(objLI);
}