function showDirByDate(date)
{
	if ( typeof date == "undefined" || date == "")
	{
		var loDate = new Date();
		
		var month = loDate.getMonth().toString().length == 1 ? "0"+(loDate.getMonth()+1) : loDate.getMonth()+1;
		var day   = loDate.getDate().toString().length == 1 ? "0"+loDate.getDate() : loDate.getDate();
		var dirName = loDate.getYear()+"/"+month+"/"+day;
	}else
		var dirName = date.replace(/\-/g, "/");
	
	location.href = "?dir="+dirName;
}


function getRelateImgInfo(id, user, userchar, gameid, offset)
{
	
	if ( id == "" || user == "" )
	{
		alert('Sorry, parameters error!');
		return;
	}
	$("relatePic").innerHTML = "Loading...";
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=getRelateImg&id="+id+"&uin="+user+"&userchar="+userchar+"&offset="+offset;
	
	var myAjax = new Ajax.Updater('relatePic', url, {method: 'get', parameters: pars, onComplete: RelateImgLoaded,evalScripts: true } );
}

function RelateImgLoaded()
{
	
}

/**
*É¾
*
*/
function delImgInfo(id, classid,img)
{
	if ( id == "" || classid == "" )
	{
		alert("Sorry, you need to select at least one image to delete.");
	}
	if ( confirm("[Note] This will delete the screenshot permanently, are you sure to continue?") )
	{
		window.open('/member/upload_process.php?Work=delImg&idList='+id+'&gameList='+classid+'&imgList='+img, "iframe_target");
	}
	
}
function deluserfavInfo(img)
{
	if ( img == "")
	{
		alert("Sorry, you need to select at least one image to delete.");
	}
	if ( confirm("[Note] Are you sure to remove this screenshot from your collection?") )
	{
		window.open('/member/store_process.php?Work=deluserfavInfo&imgList='+img, "iframe_target");
	}
	
}
/**
*É¾Ï¢
*
*/
function delMoreImgInfo(idObj)
{
	if ( !IsRadioChecked(idObj) )
	{
		alert("Sorry, you need to select at least one image to delete.");
		return false;
	}
	if( confirm('[Note] The images won\'t be recoverd, are you sure to delete them?'))
	{ 
		$('Work').value='delImg';
		return true;
	}else 
		return false;
	

}

/*Â½Ö¤*/
function loginInfo(userobj, pwdobj,codebj,backUrl)
{
	if ( userobj == "" || pwdobj == "" || codebj == "")
	{
		alert('Sorry, please input your username and validation code.');
		return ;
	}
	if ( $(userobj).value == "")
	{
		alert("Sorry, please input your username.");
		$(userobj).focus();
		return;
	}

	if ( $(pwdobj).value == "" )
	{
		alert("Sorry, please input your password.");
		$(pwdobj).focus();
		return;
	}
	if ( $(codebj).value == "" )
	{
		alert("Sorry, please input your validation code.");
		$(codebj).focus();
		return;
	}
    $('loginbut').value = "Logging..";
	//alert("Â¼Ð½Ê±ÄµÈº.");
	$('loginbut').disabled = true;
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=loginCheck&user="+$(userobj).value+"&pwd="+$(pwdobj).value+"&code="+$(codebj).value;
	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseLoginInfo});
	if(backUrl != "")
	{
	 setTimeout(function(){location.href=backUrl;},1000);
	 //location.href=backUrl;
	}
	
}
function loginInfo_new(userobj, pwdobj,codebj,backUrl)
{
	if ( userobj == "" || pwdobj == "" || codebj == "")
	{
		alert('Sorry, please input your username and validation code.');
		return ;
	}
	if ( $(userobj).value == "")
	{
		alert("Sorry, please input your username.");
		$(userobj).focus();
		return;
	}

	if ( $(pwdobj).value == "" )
	{
		alert("Sorry, please input your password.");
		$(pwdobj).focus();
		return;
	}
	if ( $(codebj).value == "" )
	{
		alert("Sorry, please input your validation code.");
		$(codebj).focus();
		return;
	}
    $('loginbut').value = "Logging..";
	$('loginbut').disabled = true;
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=loginCheck_new&user="+$(userobj).value+"&pwd="+$(pwdobj).value+"&code="+$(codebj).value;
	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseLoginInfo_new});
	try{
	if(backUrl != ""){
	 setTimeout(function(){location.href='/';},1000);
	 //location.href=backUrl;
	}
	}catch(e){}
}
	
function responseLoginInfo_new(request)
{
	if (request.responseText != 1 && request.responseText != 2)
	{
		alert(request.responseText);
		$('loginbut').value = "Login";
		$('loginbut').disabled = false;
		$('login').style.display = "";	
		return;
	}
	try{
		$('loginNickname').innerHTML = getCookie("pic91Cookienickname");
		$('admincp').innerHTML = "<a href=\"/member/albums.php?uin="+ getCookie("pic91Cookieuin") +"\" class=\"admin\"My Screenshots</a>";	
		$('logined').style.display = "";
		$('login').style.display = "none";
		if(request.responseText==2){
			location.href="/member/personal_info.php";
		}
	}catch(e){}
}


function responseLoginInfo(request)
{
	if ( request.responseText != 1)
	{
		alert(request.responseText);
		$('loginbut').value = "Login";
		$('loginbut').disabled = false;
		$('login').style.display = "";	
		return;
	}
	$('loginNickname').innerHTML =getCookie("pic91Cookienickname");
	//$('picadmincp').innerHTML = "<a href=\"/member/myphoto.php?uin="+ getCookie("pic91Cookieuin") +"\" class=\"admin\">Management Center</a>";
	$('admincp').innerHTML = "<a href=\"/member/albums.php?uin="+ getCookie("pic91Cookieuin") +"\" class=\"admin\">Management Center</a>";	
	$('logined').style.display = "";
	$('login').style.display = "none";
	//location.href="http://album.91.com/";
}

function chkLoginInfo()
{
	var loginUser = getCookie("pic91Cookieuin");
	if ( loginUser != "" && loginUser != null && loginUser != "null" )
	{
		chkIsLogin(); //Ð¶sessionÇ·Ê§Ð§
	}else{
		try{
			$('logined').style.display = "none";
			$('login').style.display = "";
		}catch(e){}
	}
}



//Ð¶sessionÇ·Ê§Ð§
function chkIsLogin()
{
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=chkIsLogin";
	var ajax = new Ajax.Request(url, {method:"get", parameters:pars, onComplete:responseIsLogin});
}

function responseIsLogin(request)
{
	if (request.responseText == 1)
	{
		/*$('logined').style.display = "";
		$('login').style.display = "none";
		$('loginNickname').innerHTML =getCookie("pic91Cookienickname");
		$('adminscore').innerHTML =getCookie("pic91Cookieexpirescore");
		$('lastlogintime').innerHTML =getCookie("pic91Cookielastlogin");
		//$('user_face').innerHTML = "<img src='"+getCookie("pic91Cookieface")+"' alt=''>";
		//alert(getCookie('pic91Cookieface'));
		$('admincp').innerHTML = "<a href=\"/member/albums.php?uin="+ getCookie("pic91Cookieuin") +"\" class=\"admin\">Management Center</a>";	
		 */
	    
	}else{
		try{
			$('logined').style.display = "none";
			$('login').style.display = "";
		}catch(e){}
	}
}


//Ë³Â½
function exitLoginInfo()
{
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=exitLogin";
	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseExitInfo});
}

function responseExitInfo(request)
{
	$('logined').style.display = "none";
	$('login').style.display = "";
	$('loginbut').value = "login";
	$('loginbut').disabled = false;
	window.location.href = '/';
}


function chkCommentForm(userobj, conobj, commentobj)
{
	if ( $(commentobj).value == "")
	{
		alert("Sorry, parameters error, please comment later.");
		return false;
	}

	if ( $F(conobj) == "")
	{
		alert("Please input the comment content.");
		$(conobj).focus();

		return false;
	}
	if ( $F(userobj) == "")
	{
		alert("Please input your username.");
		$(userobj).focus();
		return false;
	}



	return true;
}


//changed by cwq 2009.10.26
function getCommentInfo(objDiv,commenturl)
{

	if ( typeof userList == "undefined" || userList == "" || typeof (conList) == "undefined" || conList == "")
	{
		$(objDiv).innerHTML = "";
		return ;
	}
    if(document.getElementById('total_con'))
	{
		document.getElementById('total_con').innerHTML='( Total <strong>'+total_con+'</strong> Comments )';
	}
	
	var strHtml = "";

	for ( i=0; i<conList.length ; i++ )
	{
        strHtml += '<ul class="comment_con"><li><p>#'+floor[i]+'</p>';
        strHtml += '<p>'+conList[i]+'</p>';
		strHtml += '<dl><dd>Posted by <strong class="color_4">'+userList[i]+'</strong>,'+timeList[i]+'</dd>';
		if("0 "==jbList[i])
		{
		    strHtml += '<dd class="seeall"><a onclick="fz('+infoidList[i]+');" href="#p">Quote</a>  <a onclick="window.open(\'http://album.91.com/member/act_info.php?id='+infoidList[i]+'&rid='+rid+'&path='+path+'&pagenum=10000&page=10&template=1&backUrl='+escape(location.href)+'\',\'_blank\',\'width=480,height=350\')" href="javascript:;">Report Abuse</a></dd>';
		}
		else
		{
			strHtml += '<dd class="seeall"><a onclick="fz('+infoidList[i]+');" href="#p">Quote</a>  Reported</dd>';
		}
		strHtml += '</dl></li></ul>';
	
	}

	$(objDiv).innerHTML = strHtml;
	//+"<div class=\"morediv\"><a href=\""+commenturl+"\" target=\"_blank\">>></a></div>";
}

//Û±íµ¥
function clearCommentForm(userobj, conobj)
{
	$(userobj).value = "";
	$(conobj).value = "";
}

/**
*Ö¤Ï´íµ¥
*
*/
function chkUploadForm()
{
	if ( $("gameclass").value == "" || $("gameclass").value == 0)
	{
		alert("Sorry, please select your game.");
		return false;
	}

	if ($("selserver").value == "")
	{
		alert("Sorry, please select your game server.");
		return false;
	}

	$("server").value = $("selserver").options[$("selserver").selectedIndex].text;
	if ( $("selsubserver").value != "")
	{
		$("subserver").value = $("selsubserver").options[$("selsubserver").selectedIndex].text;
	}
	

	if ( $("server").value == "")
	{
		alert("Sorry, please select your game group.");
		return false;
	}
	if ( $("type").value == "" || $("type").value == 0)
	{
		alert("Sorry, please select the category of the picture.");
		return false;
	}

     /*
	if ( $F("myclub") == "")
	{
		alert("Ô²Ð´.");
		$("myclub").focus();
		return false;
	}
   */
   /*if ( $F("type").value == "" || $F("type").value == 0)
	{
		alert("Sorry, please select the category of the picture.");
		return false;
	}
	if ( $F("title") == "")
	{
		alert("Sorry, please input the title for the picture.");
		$("title").focus();
		return false;
	}*/

	if ( $("img").value == "")
	{
		alert("Sorry, please select a picture to upload.");
		return false;
	}

	if (!chkFile($("img").value))
	{
		alert("Sorry, the filetype is invalid.");
		return false;
	}
	
	
	if ( $F("intro") == "")
	{
		alert("Sorry, please input the introduction of the picture.");
		$("intro").focus();
		return false;
	}
	try{
		$("uploadstr").innerHTML = "<strong>Uploading Screenshot</strong> <img src=\"http:\/\/images.91.com\/album91e\/album_images\/uploading.gif\" alt=\"Uploading\" /><br/>Please don\'t close this window until the uploading is completed.";
	}catch(e){}

	return true;
}



function sendGoodsInfo(id, user, userchar, gameclass, flag)
{
	if ( typeof id == "undefined"  || id == "" || user == "" || userchar == "" || userchar.length != 1 || gameclass == "" || flag == "")
	{
		alert("Sorry, parameters error!");
		return ;
	}

	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=sendGoods&flag="+flag+"&id="+id+"&uin="+user+"&userchar="+userchar+"&gameclass="+gameclass;

	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseSendGoods, responseArguments:flag});

}

function hdsendGoodsInfo(id, user, userchar, gameclass, flag)
{
	if ( typeof id == "undefined"  || id == "" || user == "" || userchar == "" || userchar.length != 1 || gameclass == "" || flag == "")
	{
		alert("Sorry, parameters error!");
		return ;
	}

	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=sendGoods&flag="+flag+"&id="+id+"&uin="+user+"&userchar="+userchar+"&gameclass="+gameclass;

	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responsehdSendGoods, responseArguments:flag});
}
//î¶¯Í¶Æ±
function sendvoteInfo(id, user, userchar, gameclass, actid)
{

	if ( typeof id == "undefined"  || id == "" || user == "" || userchar == "" || userchar.length != 1 || gameclass == "" || actid == "")
	{
		alert("Sorry, parameters error!");
		return ;
	}

	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=sendVote&id="+id+"&uin="+user+"&userchar="+userchar+"&gameclass="+gameclass+"&actid="+actid;

	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseSendVote, responseArguments:id});
}


function sendHit(id, user, userchar,gameclass)
{
	if ( typeof id == "undefined"  || id == "" || user == "" || userchar == "" || gameclass == "")
	{
		alert("Sorry, parameters error!");
		return ;
	}
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=sendHit&id="+id+"&uin="+user+"&userchar="+userchar+"&gameclass="+gameclass;

	var ajax = new Ajax.Request(url,{method:"get", parameters:pars});
}

function responseSendGoods(request, flag)
{
	if ( request.responseText != 0  &&  request.responseText != "" )
	{
		//setCookie('sendgoods
		switch ( request.responseText ) {
			case "error": 			
				$('voteerror').innerHTML = Number($('voteerror').innerHTML)+1;
				break;
			case "right":
				$('voteright').innerHTML = Number($('voteright').innerHTML)+1;
				break;
		}
	}else if(request.responseText == "-11")
		alert("Sorry, You can only vote once for a picture.");
	else
		alert("Sorry, You can only vote once for a picture.");
}

function responsehdSendGoods(request, flag)
{
	if ( request.responseText != 0  &&  request.responseText != "" )
	{
		//setCookie('sendgoods
		alert("Thanks for your vote!");
	}else if(request.responseText == "-11")
		alert("Sorry, You can only vote once for a picture.");
	else
		alert("Sorry, You can only vote once for a picture.");
}
//Í¶Æ±Ê¾
function responseSendVote(request, flag)
{
	if(request.responseText == "-11")
		{
		alert("Sorry, you have already voted.");
		return false;
		}
	if(request.responseText == "-12")
		{
		alert("Sorry, the vote is closed.");
	     return false;
		}
	if ( request.responseText != 0  &&  request.responseText != "" )
	{
		if ( request.responseText == "right" )
		{
			$('vote').innerHTML = Number($('vote').innerHTML)+1;
		}
	}		
	/*
	alert(request.responseText);
	if ( request.responseText >= 0  &&  request.responseText != "" )
	{
		if ( flag > 0)
		{
			$('vote'+flag).innerHTML = Number($('vote'+flag).innerHTML)+1;
		}
	}else if(request.responseText == "-12")
			alert("Í¶Æ±Ñ¹Ø±");
	else if(request.responseText == "-11")
		alert("Ô²IPÒ»Ö»Í¶Ò»Æ±");
	*/	
		
		
}

function sendvoteInfo_new(id, user, userchar, gameclass, actid)
{

	if ( typeof id == "undefined"  || id == "" || user == "" || userchar == "" || userchar.length != 1 || gameclass == "" || actid == "")
	{
		alert("Sorry, parameters error!");
		return ;
	}

	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=sendVote&id="+id+"&uin="+user+"&userchar="+userchar+"&gameclass="+gameclass+"&actid="+actid;

	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseSendVote_new});
}
function responseSendVote_new(request)
{
	var flag = request.responseText;
	if(request.responseText == "-11")
		{
		alert("Sorry, you have already voted.");
		return false;
		}
	if(request.responseText == "-12")
		{alert("Sorry, the vote is closed.");
	     return false;}
	if ( request.responseText != 0  &&  request.responseText != "" )
	{
			$('vote'+flag).innerHTML = Number($('vote'+flag).innerHTML)+1;
	}		
}

/*Ð¡Í¼Æ¬

function DrawImage(ImgD,iwidth,iheight){ 
    //(Í¼Æ¬,Ä¿,Ä¸ß¶)
    var image=new Image(); 
    image.src=ImgD.src; 
    if(image.width>0 && image.height>0){ 
        flag=true; 
        if(image.width/image.height>=iwidth/iheight){ 
            if(image.width>iwidth){ 
                ImgD.width=iwidth; 
                ImgD.height=(image.height*iwidth)/image.width; 
            }else{ 
                ImgD.width=image.width; 
                ImgD.height=image.height; 
            } 
        } 
        else{ 
            if(image.height>iheight){ 
                ImgD.height=iheight; 
                ImgD.width=(image.width*iheight)/image.height; 
            }else{ 
                ImgD.width=image.width; 
                ImgD.height=image.height; 
            } 
        } 
    } 
} 
function Init() {
    var obj=document.getElementsByTagName("img");
	
    for (var j=0; j < obj.length; j++) {
		
        DrawImage(obj[j],710,510);
    }
}
*/


function showPicInfo(img, obj, url)
{
	if ( typeof img == "undefined" || img == "")
	{
		$(obj).innerHTML = "No picture.";
		return;
	}
	img = img.replace(".jpg", "b.jpg");
	$(obj).innerHTML = '<a href='+url+' title="Click to view the next picture."><img src="'+img+'" border="0"></a>';
}

function showTagInfo(tag, obj)
{
	if ( typeof tag == "undefined" || tag == "")
	{
		$(obj).innerHTML = "No tag.";
		return;
	}
	
	var tagArr = new Array();
	var strHtml ="";
	var quote = /,/gi;
	tagArr  = tag.split(quote);

	var url = location.href;

	var link = url.indexOf("?") == -1 ? "?" : "&";
	for(i=0;i<tagArr.length;i++)
	{
		if ( typeof tagArr[i] == "undefined" || tagArr[i] == ""  )
		{
			continue;
		}
		strHtml+='<a href="index.php?tag='+tagArr[i]+'">'+tagArr[i]+'</a> &nbsp;';
	}
	$(obj).innerHTML = strHtml;
}

function jbinfo(title,uin,url)
{
	if ( title == "" || uin == "" || url == "" )
	{
		alert("Sorry, parameters error!");
	}
	if ( confirm("[Note] Do you really want to report this picture?") )
	{
		window.open('/member/jbinfo.php?title='+encodeURIComponent(title)+'&uin='+uin+'&url='+encodeURIComponent(url));
	}	
}
function addfav(title,img,gameclass,imgtime,imgurl)
{
	if ( title == "" || img == "" || imgurl == "" || imgtime == "" || gameclass == "" || BASEisNotNum(gameclass))
	{
		alert("Sorry, parameters error!");
		return ;
	} 
	var url = "/ajax/getajaxinfo.php";
	var pars = "Work=addfav&title="+encodeURIComponent(title)+"&img="+encodeURIComponent(img)+"&gameclass="+encodeURIComponent(gameclass)+"&imgtime="+encodeURIComponent(imgtime)+"&imgurl="+encodeURIComponent(imgurl);
	var ajax = new Ajax.Request(url,{method:"get", parameters:pars, onComplete:responseSendaddfav});
}
function responseSendaddfav(request)
{
	if(request.responseText ==1)
	alert("This picture has been added to your favorites successfully.");
	if(request.responseText ==-11)
	{alert("Sorry, please login to proceed this operation.");
	 //window.open('https://login.91.com/LoginCheck.aspx?siteflag=6&backUrl='+base64encode(window.location.href));
	 window.open('http://album.91.com/login.php');
	}
	if(request.responseText ==-12)
	alert("Sorry, favorites list error.");
	if(request.responseText ==-13)
	alert("Sorry, this picture is already in your favorites.");
	
}

/*JS64Î»*/
var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var base64DecodeChars = new Array(
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
    -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
    -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);

function base64encode(str) {
    var out, i, len;
    var c1, c2, c3;

    len = str.length;
    i = 0;
    out = "";
    while(i < len) {
    c1 = str.charCodeAt(i++) & 0xff;
    if(i == len)
    {
        out += base64EncodeChars.charAt(c1 >> 2);
        out += base64EncodeChars.charAt((c1 & 0x3) << 4);
        out += "==";
        break;
    }
    c2 = str.charCodeAt(i++);
    if(i == len)
    {
        out += base64EncodeChars.charAt(c1 >> 2);
        out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
        out += base64EncodeChars.charAt((c2 & 0xF) << 2);
        out += "=";
        break;
    }
    c3 = str.charCodeAt(i++);
    out += base64EncodeChars.charAt(c1 >> 2);
    out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
    out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
    out += base64EncodeChars.charAt(c3 & 0x3F);
    }
    return out;
}

function base64decode(str) {
    var c1, c2, c3, c4;
    var i, len, out;

    len = str.length;
    i = 0;
    out = "";
    while(i < len) {
    /* c1 */
    do {
        c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
    } while(i < len && c1 == -1);
    if(c1 == -1)
        break;

    /* c2 */
    do {
        c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
    } while(i < len && c2 == -1);
    if(c2 == -1)
        break;

    out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));

    /* c3 */
    do {
        c3 = str.charCodeAt(i++) & 0xff;
        if(c3 == 61)
        return out;
        c3 = base64DecodeChars[c3];
    } while(i < len && c3 == -1);
    if(c3 == -1)
        break;

    out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));

    /* c4 */
    do {
        c4 = str.charCodeAt(i++) & 0xff;
        if(c4 == 61)
        return out;
        c4 = base64DecodeChars[c4];
    } while(i < len && c4 == -1);
    if(c4 == -1)
        break;
    out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
    }
    return out;
}
function BASEisNotNum(theNum)
{
//Ð¶Ç·Îª
/*
if (BASEtrim(theNum)=="")
  return true;
*/
for(var i=0;i<theNum.length;i++){
  oneNum=theNum.substring(i,i+1);
if (oneNum<"0" || oneNum>"9")
return true;
}
return false;

}

/*
print
*/

function printme(pic_url)
{
  document.body.innerHTML="<a target='_self' href='http://album.91.com/'><img src="+pic_url+" title='Click to Return Home' /></a>"
  window.print();
}
