<!--
    //Global Variables    
    var infoCookieName = "feonline=";
    
    var AllCookies = unescape(document.cookie);
    var vstart = AllCookies.indexOf(infoCookieName);
    var vend = AllCookies.indexOf("{%}", vstart);
    AllCookies = AllCookies.substring(vstart, vend);    
    
    var SignedUp = (AllCookies.indexOf(infoCookieName) >= 0);       
    var VIP = userAccess();
    var dirSeparator = "&nbsp;<b>&#187;</b>&nbsp;";  
    var backSign = "&nbsp;<b>&#171;</b>&nbsp;";    
    var prevSign = "&nbsp;<b>&#171;</b>&nbsp;";
    var nextSign = "&nbsp;<b>&#187;</b>&nbsp;";         
    
    var qs = new Querystring();
    
    var UtilityServer="http://image.fotoever.com/ImageServer/";var Homepage="http://www.fotoever.com/";var ArchiveModule="http://www.fotoever.com/Archive/";var CommunityModule="http://www.fotoever.com/Community/";var MyPhotoModule="http://www.fotoever.com/MyPhoto/";var MallModule="http://www.fotoever.com/Mall/";var CelebrityModule="http://www.fotoever.com/Celebrity/";var ECardModule="http://www.fotoever.com/ECard/";var AccountModule="http://www.fotoever.com/Acct/";var MyAccountModule="http://www.fotoever.com/MyAcct/";var SearchModule="http://www.fotoever.com/Explorer/";var MineModule="http://www.fotoever.com/Mine/";var DocModule="http://www.fotoever.com/Doc/";
    var PhotoDownloadURL = "http://www.fotoever.com/Mine/DownloadPhoto.aspx";
    var ClientDownloadURL = "http://www.fotoever.com/Misalliance/ClientDownload.aspx";
    
    var home_on = UtilityServer + "img/tb/home_on.gif";
    var home_off = UtilityServer + "img/tb/home_off.gif";
    var home_over = UtilityServer + "img/tb/home_over.gif";    
    var arch_on = UtilityServer + "img/tb/arch_on.gif";
    var arch_off = UtilityServer + "img/tb/arch_off.gif";
    var arch_over = UtilityServer + "img/tb/arch_over.gif";    
    var com_on = UtilityServer + "img/tb/com_on.gif";
    var com_off = UtilityServer + "img/tb/com_off.gif";
    var com_over = UtilityServer + "img/tb/com_over.gif";    
    var myp_on = UtilityServer + "img/tb/myp_on.gif";
    var myp_off = UtilityServer + "img/tb/myp_off.gif";
    var myp_over = UtilityServer + "img/tb/myp_over.gif";    
    var mall_on = UtilityServer + "img/tb/mall_on.gif";
    var mall_off = UtilityServer + "img/tb/mall_off.gif";
    var mall_over = UtilityServer + "img/tb/mall_over.gif";    
    var cel_on = UtilityServer + "img/tb/cel_on.gif";
    var cel_off = UtilityServer + "img/tb/cel_off.gif";
    var cel_over = UtilityServer + "img/tb/cel_over.gif";    
    var ecr_on = UtilityServer + "img/tb/ecr_on.gif";
    var ecr_off = UtilityServer + "img/tb/ecr_off.gif";
    var ecr_over = UtilityServer + "img/tb/ecr_over.gif";
    
    var adh_on = UtilityServer + "img/tb/adh_on.jpg";    
    var adh_off = UtilityServer + "img/tb/adh_off.jpg";
    var adh_over = UtilityServer + "img/tb/adh_over.jpg";
    
    var DashImg = "<img src=" + UtilityServer + "img/bg/dashed.gif" + " border=0>";
    
    function setLocation()
    {
    		var locationValue = document.getElementById("selLocation").value;
    		var locationurl = "";    		
    		if(locationValue == "n")
    			locationurl = "/";
    		else if(locationValue == "p")
    			locationurl = "/pg";
    		else if(locationValue == "m")
    			locationurl = "/Merchant";
    		else if(locationValue == "a")
    			locationurl = "/ADLink";
    		else if(locationValue == "r")
    			locationurl = "/Partner";    		
    		
    		window.top.location = locationurl;    
    }
    
    function userAccess()
    {
    	var accessValue =  getCookieItem("G_x10{:t}");
    	if(accessValue == "V")
    		return true;	
    	else
    		return false;
    }    
    
    function getCookieItem(flag)
    {
    	var itemValue = "";
        if (SignedUp)
        {
            var start = AllCookies.indexOf(flag) + flag.length;            
            var end = AllCookies.indexOf("{:n}", start);            
            if (start > flag.length)
            {
                itemValue = escape(AllCookies.substring(start, end));    
            }
        }
        return itemValue;
    }
    
     String.prototype.trim   = function()   
      {   
              //   用正则表达式将前后空格 
              //   用空字符串替代。   
              return   this.replace(/(^\s*)|(\s*$)/g,   "");   
      }   
    //new
    
    function WritePageHeadLeft()  
    {			
    		var infostr = "";
    		if(SignedUp)
    		{
    			var UserName = getCookieItem("G_x01{:t}");				
    			var EmailCount = getCookieItem("G_x107{:t}");				
    			var CurCount = getCookieItem("G_x103{:t}");	
    			var VirCount = getCookieItem("G_x104{:t}");	
    			var CartCount = getCookieItem("G_x21{:t}");
    			var IsLoveUser= getCookieItem("G_x200{:t}");
			
				var UrlDomain=getCookieItem("G_x114{:t}");
				UrlDomain=UrlDomain.trim();
				if(UrlDomain.length<=0)
					UrlDomain="javascript:if(confirm('您目前还没有填写个人空间地址，是否立刻填写?')){window.location.href='http://www.fotoever.com/spacemanage/UserInfo/BaseInfo.aspx';}";
				else
					UrlDomain="http://"+UrlDomain+".fotoever.com";


					
					infostr = "&nbsp;&nbsp;&nbsp;" + decodeURI(UserName) + "&nbsp;<a href=\""+UrlDomain+"\" title=\"我的空间\" target=_top>我的空间</a>"+ "|<a href=\"http://www.fotoever.com/spacemanage/\" target=_top>个人管理中心</a>";
					  			
					//infostr = "&nbsp;&nbsp;" + decodeURI(UserName) + "&nbsp;&nbsp;<a href=\"http://www.fotoever.com/spacemanage/\" target=_top>个人管理中心</a>";
					if(IsLoveUser=="False")
					{
					    infostr += "|<a href=\"http://www.fotoever.com/spacemanage/UserInfo/baseinfo.aspx?Flag=1\" title=\"加入恋爱会员\" target=_top>加入恋爱会员</a>";
					}
					infostr += "|<a href=\"http://www.fotoever.com/spacemanage/message/listmsg.aspx\" title=\"您有" + EmailCount + "条未读信息\" target=_top>" + "<img alt=\"您有" + EmailCount + "条未读信息\" src=\"" + UtilityServer + "img/ico/ico_mail.gif\" border=0>&nbsp;" + EmailCount + "</a>";
					infostr += "|<a href=\"http://www.fotoever.com/spacemanage/MyBank/MyBankAccount.aspx\" title=\"您有" + CurCount + "枚易币\" target=_top>" + "<img alt=\"您有" + CurCount + "枚易币\" src=\"" + UtilityServer + "img/ico/ico_god.gif\" border=0>&nbsp;" + CurCount + "</a>";
					infostr += "|<a href=\"http://www.fotoever.com/spacemanage/MyBank/MyBankAccount.aspx\" title=\"您有" + VirCount + "点积分\" target=_top>" + "<img alt=\"您有" + VirCount + "点积分\" src=\"" + UtilityServer + "img/ico/gif-0974.gif\" border=0>&nbsp;" + VirCount + "</a>";
					infostr += "|<a href=\"" + MallModule + "CartInfo.aspx?p=c\" title=\"您的购物车内有" + CartCount + "件物品\" target=_top>" + "<img  alt=\"您的购物车内有" + CartCount + "件物品\" src=\"" + UtilityServer + "img/ico/gif-0473.gif\" border=0>&nbsp;" + CartCount + "</a>";
					infostr += "|<a href=\"http://www.fotoever.com/acct/logoff.aspx\" target=_top><img src=\"" + UtilityServer + "img/ico/ico_exit.gif\" border=0>&nbsp;退出</a>";						
    		}
    		else
    		{    			
    			if(typeof NoDirect == "undefined")
    			{
    				var currentURL = window.location.href;
	    			currentURL =  currentURL.replace(/(&)+/g,"%26");
	    			infostr = "&nbsp;&nbsp;&nbsp;<a href=\"http://www.fotoever.com/acct/login.aspx?ReturnURL=" + currentURL + "\" target=_top><img src=\"" + UtilityServer + "img/ico/gif_1041.gif\" border=0>&nbsp;登录</a>";
	    		}
	    		else
	    			infostr = "&nbsp;&nbsp;&nbsp;<a href=\"http://www.fotoever.com/acct/login.aspx\" target=_top><img src=\"" + UtilityServer + "img/ico/gif_1041.gif\" border=0>&nbsp;登录</a>";
					infostr += "&nbsp;|&nbsp;<a href=\"http://www.fotoever.com/acct/signup.aspx?ReturnURL=" + currentURL+"\" target=_top><img src=\"" + UtilityServer + "img/ico/gif_1042.gif\" border=0>&nbsp;注册</a>";	
    		}
    		
        document.write(infostr);
    }
    
    function WritePageHeadRight()
    {			
    		var infostr = "";
    		if(SignedUp)
    		{
    			infostr = "&nbsp;|<a href=\"http://www.fotoever.com/mall/\" class=\"black\" target=_top>个性礼品打印</a>";
    			infostr += "&nbsp;|<a href=\"http://www.fotoever.com/spacemanage/blog/diarypost.aspx\" class=\"black\" target=_top>写文章</a>";
    			infostr += "&nbsp;|<a href=\"http://www.fotoever.com/MyPhoto/photoupload.aspx\" class=\"black\" target=_top>传图片</a>";    			
    			infostr += "&nbsp;/<a href=\"http://www.fotoever.com/spacemanage/music/mymusic.aspx\" class=\"black\" target=_top>音乐</a>";
    			infostr += "&nbsp;/<a href=\"http://www.fotoever.com/spacemanage/video/myvideo.aspx\" class=\"black\" target=_top>视频</a>";
    			//infostr += "&nbsp;|&nbsp;<a href=\"http://www.fotoever.com/myacct/myfriend.aspx\" class=\"black\" target=_top>邀请好友</a>";
    			infostr += "&nbsp;|<a href=\"http://forum.fotoever.com/\" class=\"black\" target=_top>泡论坛</a>";
    		}
        document.write(infostr);
    }
    
    //end new
    
    	
    function WriteTabImg()
    {    	
    	var modulename = "";
    	if(document.all.TabModuleName)
    		modulename = document.all.TabModuleName.value;	 
    			
			document.write('<a class=\"btn\" href="' + Homepage + '">');	
			if(modulename == "homepage")
				document.write('<img src="' + home_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + home_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + home_over + '\')" onmouseout="switchImgSrc(this,\'' + home_off + '\')">');
			document.write('</a>');
		
			document.write('<a class=\"btn\" href="' + ArchiveModule + '">');
			if(modulename == "archive")
				document.write('<img src="' + arch_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + arch_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + arch_over + '\')" onmouseout="switchImgSrc(this,\'' + arch_off + '\')">');
			document.write('</a>');
			
			document.write('<a class=\"btn\" href="' + CelebrityModule + '">');
			if(modulename == "celebrity")
				document.write('<img src="' + cel_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + cel_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + cel_over + '\')" onmouseout="switchImgSrc(this,\'' + cel_off + '\')">');
			document.write('</a>');
			
			document.write('<a class=\"btn\" href="' + CommunityModule + '">');
			if(modulename == "community")
				document.write('<img src="' + com_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + com_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + com_over + '\')" onmouseout="switchImgSrc(this,\'' + com_off + '\')">');
			document.write('</a>');
			
			document.write('<a class=\"btn\" href="' + MyPhotoModule + '">');
			if(modulename == "myphoto")
				document.write('<img src="' + myp_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + myp_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + myp_over + '\')" onmouseout="switchImgSrc(this,\'' + myp_off + '\')">');
			document.write('</a>');			
		
			document.write('<a class=\"btn\" href="' + ECardModule + '">');
			if(modulename == "ecard")
				document.write('<img src="' + ecr_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + ecr_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + ecr_over + '\')" onmouseout="switchImgSrc(this,\'' + ecr_off + '\')">');
			document.write('</a>');
			
			document.write('<a class=\"btn\" href="http://www.fotoever.com/adhoc/">');
			if(modulename == "adhoc")
				document.write('<img src="' + adh_on + '" border="0" name="adhoc">');
			else
				document.write('<img src="' + adh_off + '" border="0" name="adhoc" onmouseover="switchImgSrc(this,\'' + adh_over + '\')" onmouseout="switchImgSrc(this,\'' + adh_off + '\')">');
			document.write('</a>');						
			
			document.write('<a class=\"btn\" href="' + MallModule + '">');
			if(modulename == "mall")
				document.write('<img src="' + mall_on + '" border="0" name="homepage">');
			else
				document.write('<img src="' + mall_off + '" border="0" name="homepage" onmouseover="switchImgSrc(this,\'' + mall_over + '\')" onmouseout="switchImgSrc(this,\'' + mall_off + '\')">');
			document.write('</a>');	
    }
    
    function switchImgSrc(img, imgSrc)
    {
    	img.src = imgSrc;
    }
    
    function writeModules()
    {
    	var moduleName = "gallery";    	
    	if(document.all.TabModuleName)    	
    		moduleName = document.all.TabModuleName.value;      	
    	var moduleNames = new Array("精品收藏", "社区", "明星偶像", "电子卡片");	
    	var moduleENames = new Array("archive", "community", "celebrity", "ecard");
    	var moduleKeywords = new Array("A", "M", "C", "E");
    	var selectedStr = "";     	
    	document.write("<select id=selModules>");    	
    	for(var i = 0; i < moduleNames.length; i++)
    	{    		
    		if(moduleName == moduleENames[i])
    			selectedStr = " selected=true";
    		else
    			selectedStr = "";
    		document.write("<option value=\"" + moduleKeywords[i] + "\"" + selectedStr + ">" + moduleNames[i] + "</option>");   		
    	}
    	document.write("</select>");    	
    }
    
    function writeHelp()
    {
    	var modulename = "";
    	if(document.all.TabModuleName)
    	{
    		modulename = document.all.TabModuleName.value;
    	}
    	var helpurl = Homepage + "doc/help/userhelp/Index.htm?para1=";
    			
			if(modulename == "homepage")
				document.write('<a target="_blank" href="' + helpurl + 'help0000">');		
			else if(modulename == "archive")
				document.write('<a target="_blank" href="' + helpurl + 'help0301">');		
			else if(modulename == "celebrity")
				document.write('<a target="_blank" href="' + helpurl + 'help0000">');		
			else if(modulename == "community")
				document.write('<a target="_blank" href="' + helpurl + 'help0401">');		
			else if(modulename == "myphoto")
				document.write('<a target="_blank" href="' + helpurl + 'help0201">');				
			else if(modulename == "mall")
				document.write('<a target="_blank" href="' + helpurl + 'help0601">');		
			else if(modulename == "ecard")
				document.write('<a target="_blank" href="' + helpurl + 'help0501">');
			else
				document.write('<a target="_blank" href="' + helpurl + '">');
			
			document.write('帮助</a>');
    }
    
    function switchExplorerBar()
    {
    	if(document.all.TabModuleName)
    	{
    		if(typeof document.all.HideSearchBar != "undefined")
				{
					var explorerbar = document.getElementById("divExplorer");
					if(explorerbar.style.display == "block")
						explorerbar.style.display = "none";
				}    		
    	} 	
    }
    
    function ExplorerResult(wordname, selectControlName)
    {    	
    	var vword = document.getElementById(wordname);
    	if(vword.value == "")
    	{
    		alert("请输入搜索关键字");
    		vword.focus();
    		return;
    	}
    	var vselect = document.getElementById(selectControlName);    	
    	window.location = SearchModule + "PhotoResult.aspx?kw=" + vword.value + "&m=" + vselect.options[vselect.selectedIndex].value;    	
    }
    
    function ExplorerAdv(wordname, author, selectControlName)
    {      	
    	var vword = document.getElementById(wordname);   		 
    	var vauthor = document.getElementById(author);  
    	var vselect = document.getElementById(selectControlName);      	
    	window.location = SearchModule + "Advanced.aspx?kw=" + vword.value + "&au=" + vauthor.value + "&m=" + vselect.options[vselect.selectedIndex].value;    	
    }
    
    function WriteLoginStatus()
    {			
				var pos = AllCookies.indexOf(infoCookieName);	 
        var line = "";              
        if (pos != -1)
        {
            line = "<a href=\"" + MyAccountModule + "\">我的帐户</a>";
            line += " - <a href=\"" + AccountModule + "Logoff.aspx\">退出</a>";
        }
        else
        {
            line = "匿名帐户 - <a href=\"" + AccountModule + "Signup.aspx\">注册</a>";
            line +=" - <a href=\"" + AccountModule + "Login.aspx\">登录</a>";
        }
        
        line = line;
        document.write(line);
    }
    
    function openwin(name, w, h, scrollbars, resizable, url)
    {
        var left = (screen.width-w)/2;
        var top  = (screen.height-h)/2;

        var win;
        if(name != "MMSSender")
        	win = window.open("",name,"width=" + w + ",height=" + h +",scrollbars=" + scrollbars +",resizable=" + resizable +",screenx="+left+",screeny="+top+",left="+left+",top="+top);
        else
        	win = window.open("",name);
        if (url)
            win.location.href=url;
        win.focus();
        return win;
    }
    
    function openwinmodal(name, w, h, scrollbars, resizable, url)
    {      
        var left = (screen.width-w)/2;
        var top  = (screen.height-h)/2;

        //var win = window.open("",name,"width=" + w + ",height=" + h +",scrollbars=" + scrollbars +",resizable=" + resizable +",screenx="+left+",screeny="+top+",left="+left+",top="+top+",modal=yes");
        var win = window.showModalDialog(url,name, "dialogWidth:" + w + "px;dialogHeight:" + h +"px;dialogScrollbars:" + scrollbars +";resizable:" + resizable + ";help=0;status:0;center=1;");        
        //var win = window.showModalDialog(url,name, "dialogWidth:255px;dialogHeight:250px;dialogScrollbars:1");        
    }        
    
    function WriteCartItem()
    {
				var count = getCookieItem("G_x21{:t}");	
				if (count.length > 0 && parseInt(count) > 0)
			        	document.write('<a href="' + MallModule + 'CartInfo.aspx"><b>' + count + '</b>件物品</a>');
    }  
    
   function WriteWelcome()
   {
				var name = getCookieItem("G_x01{:t}");				
				var portraitFile = getCookieItem("G_x23{:t}");
				portraitFile = portraitFile.replace("%3A", ":");
				if (name.length > 0)
				{
				    var line = "您好 <b>" + decodeURI(name) + "</b>,欢迎回来.";
				    //var line = "你好 <b>" + name + "</b>,欢迎回来.";
				    if (VIP)
				        line += '<img src="' + UtilityServer + 'img/mdocs/star_12x12.gif" height=12 width=12 alt="FotoEver贵宾">';  
				    document.write(line);
				}
				//if(portraitFile != "")
				//	document.write('<img src=\'' + portraitFile + '\' border=0>');
   }      
   
   function Preview(url)
   {
			var win = openwin('preview', 800, 600, 'yes', 'yes');
			if (win)
			{
				var str = "<title>Preview</title><body bgcolor=white><center><font face=arial size=2>\n";
				str += "<table border=0 cellpadding=0 cellspacing=0><tr><td>\n";
				str += "<img src='"+url+"'>\n</td></tr></table><br><br>";					
				str += "<a \nhref='javascript:close();'>关闭窗口</a>\n";
				str += "</body>\n";
				win.document.write(str);
				win.document.close();
			}
   }
   
   function Querystring(qs)
	 { 
			this.params = new Object()
			this.get=Querystring_get
			
			if (qs == null)
				qs=location.search.substring(1,location.search.length);
		
			if (qs.length == 0) 
				return;
		
			qs = qs.replace(/\+/g, ' ')
			var args = qs.split('&') 
			
		
			for (var i=0;i<args.length;i++) {
				var value;
				var pair = args[i].split('=')
				var name = unescape(pair[0])
		
				if (pair.length == 2)
					value = unescape(pair[1])
				else
					value = name
				
				this.params[name] = value
			}
	}
	
	function Querystring_get(key, default_)
	{	
		if (default_ == null) default_ = null;
		
		var value=this.params[key]
		if (value==null) value=default_;
		
		return value
	}
	
   function calPhotoSize(baseSize, photoWidth, photoHeight)	
   {
		   	return new Array(baseSize, baseSize);
		   	/*
		   	var photoSize = new Array(photoWidth, photoHeight);
		   	var photoRate = baseSize/photoWidth;
		   	if(photoHeight > photoWidth)
		   		photoRate = baseSize/photoHeight;
		   	if(photoRate < 1)
		   	{
		   		photoSize[0] = parseInt(photoWidth * photoRate);
		   		photoSize[1] = parseInt(photoHeight * photoRate);
		   	}
		   	return photoSize;
		   	*/
   }
   
   function getDoneURL(linkSign)
   {
			var doneURL = qs.get("done");	
			if(doneURL)
				doneURL = linkSign + "done=" + doneURL;
			else
				doneURL = "";
			return doneURL;
   }
		   
   function navigateTo(linkURL, newWin)
   {
	   	var doneURL = "";
	   	if(linkURL.indexOf("?") > 0)
	   		doneURL = getDoneURL("&");
	   	else
	   		doneURL = getDoneURL("?");	   	
	   	
	   window.location = linkURL + doneURL;	   
   }
   
function genPagingStr(itemDesc, curPage, totalItems, linkURL, appendParameter, itemsPerPage, pagingPages)
{
	var pagingStr = "";		
	if(appendParameter)
		linkURL += "&p=";
	else
		linkURL += "?p=";
	var totalPages = parseInt(totalItems/itemsPerPage);
	if(totalItems > (totalPages * itemsPerPage))
		totalPages++;
	if(itemDesc.length > 0)
		pagingStr += itemDesc + ":" + totalItems + "&nbsp;&nbsp;";
	pagingStr += "第" + curPage + "页&nbsp;&nbsp;共" + totalPages + "页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

	if(totalPages > 1)
	{
		var prevPages = parseInt((curPage - 1) / pagingPages) * pagingPages;				

		if(curPage > pagingPages)
		{					
			pagingStr += "<a href=\"" + linkURL + prevPages + "\">&lt;&lt;&nbsp;上&nbsp;" + pagingPages + "&nbsp;页</a>&nbsp;&nbsp;";
		}
		if(curPage > 1)
			pagingStr += "<a href=\"" + linkURL + (curPage - 1) + "\">&lt;上页</a>&nbsp;&nbsp;";
		
		var curPageIndex = curPage - prevPages;
		for(var i = 1; i < curPageIndex; i++)
		{
			pagingStr += "<a href=\"" + linkURL + (prevPages + i) + "\">" + (prevPages + i) + "</a>&nbsp;";
		}
		pagingStr += "<b>" + curPage + "</b>&nbsp;";				
		for(var i = 1; i <= (pagingPages - curPageIndex); i++)
		{
			if((curPage + i) > totalPages)
				break;
			pagingStr += "<a href=\"" + linkURL + (curPage + i) + "\">" + (curPage + i) + "</a>&nbsp;";
		}

		if(curPage < totalPages)
			pagingStr += "<a href=\"" + linkURL + (curPage + 1) + "\">下页&gt;</a>&nbsp;&nbsp;";
	
		var nextPages = totalPages - prevPages - pagingPages;
		if(nextPages > pagingPages)
			nextPages = pagingPages;
		if(nextPages > 0)				
			pagingStr += "<a href=\"" + linkURL + (prevPages + pagingPages + 1) + "\">下&nbsp;" + nextPages + "&nbsp;页&nbsp;&gt;&gt;</a>&nbsp;&nbsp;";
	}
	
	return pagingStr;
}	
   
function PutUpgradeIcon()
{		
	if (!VIP)
	{
		var numrand;
		var RandomUpgradeImg;
		if (Math.random)
			numrand = 1*Math.random();
		var UpgradeNum = Math.floor(numrand) + 1;
		if ((numrand>=0) && (numrand<=1)) RandomUpgradeImg="prem1.gif";		
		var UpgradeMsg = "<a class=\"btn\" href=\"" + MyAccountModule + "Upgrade.aspx\"><img border=0 src=\"" + UtilityServer + "img/mdocs/" + RandomUpgradeImg + "\"></a>";
		document.write(UpgradeMsg);
	}
}  
    
function downloadPhoto(resolution)
{
	if ((navigator.userAgent.indexOf("MSIE") < 0))
	{
			alert("很抱歉,你的浏览器不支持我们的上传工具.请用IE浏览我们的网站.");
	}
	else
	{
			if(document.control.FEVersionLS == "-1")
			{
			    //openwin("DownloadClient", 400, 200, 0, 0, ClientDownloadURL);
			    window.open(ClientDownloadURL, "Download");
			    //window.location = ClientDownloadURL;
			}
			else
			{
					var photoType = document.getElementById("tbPhotoType").value;
					var photoUID = document.getElementById("tbPhotoUID").value;
					var doneURL = document.getElementById("tbDoneURL").value;
					var url = PhotoDownloadURL + "?m=" + photoType + "&puid=" + photoUID + "&res=" + resolution + "&done=" + doneURL;
					openwin("downloadphoto", 450, 170, 0, 0, url);					
			}
	}
} 

function displayCtl(ctlHTML)
{
	document.write(ctlHTML);	
}

//-->
