//显示系统时间
function showlocale(date){
    var str,
    colorhead,
    colorfoot;
    var yy = date.getYear();
    if (yy < 1900) yy = yy + 1900;
    var MM = date.getMonth() + 1;
    if (MM < 10) MM = '0' + MM;
    var dd = date.getDate();
    if (dd < 10) dd = '0' + dd;
    var hh = date.getHours();
    if (hh < 10) hh = '0' + hh;
    var mm = date.getMinutes();
    if (mm < 10) mm = '0' + mm;
    var ss = date.getSeconds();
    if (ss < 10) ss = '0' + ss;
    var ww = date.getDay();
    if (ww == 0) ww = "星期日";
    if (ww == 1) ww = "星期一";
    if (ww == 2) ww = "星期二";
    if (ww == 3) ww = "星期三";
    if (ww == 4) ww = "星期四";
    if (ww == 5) ww = "星期五";
    if (ww == 6) ww = "星期六";
    //str = yy + "年" + MM + "月" + dd + "日 " + ww ;
    str = yy + "-" + MM + "-" + dd + " " + ww + " " + hh + ":" + mm;// + ":" + ss
    return str;
}
function taobataoba_net_tick(){
    var today = new Date();
    document.getElementById("show-time").innerHTML = showlocale(today);
    window.setTimeout("taobataoba_net_tick()", 1000);
}
//首页图片翻滚
function taobataoba_net_pic(){
	var chma = new Tab();
	chma.bind = ["pic-small","a","pic-big","div"];
	chma.style = ["","on",""];
	chma.auto = [true, 6000];
	chma.overStyle = true;
	chma.overChange = true;
	chma.creat();
	chma = null
}
//图片按比例缩放
//参数(图片,允许的宽度,允许的高度)
function drawimage(img,iwidth,iheight){
    var flag=false;
	var image=new Image();
	image.src=img.src;
	if(image.width>0 && image.height>0){
		flag=true;
		if(image.width/image.height>= iwidth/iheight){
			if(image.width>iwidth){  
				img.width=iwidth;
				img.height=(image.height*iwidth)/image.width;
			}else{
				img.width=image.width;  
				img.height=image.height;
			}
		}
		else{
			if(image.height>iheight){  
				img.height=iheight;
				img.width=(image.width*iheight)/image.height;        
			}else{
				img.width=image.width;  
				img.height=image.height;
			}
		}
		//IMG ALT 标签
		//img.alt=image.width+"×"+image.height;
	}
}
//form input
function inputfocus(){
	$(document).ready(function(){
		$(".inputd").focus(function(){
			$(this).addClass("inputfocus");
		}).blur(function(){
			$(this).removeClass("inputfocus");
		});
	});
}
//SHOW图片自动缩放
function taobataoba_net_loadimage(){
	$(function(){
		$("#taobataoba-net-content img").loadimage(true, 638, 10000);
	});
}
//操作提示 - 成功
function hideActived(strClass){
	$(strClass).fadeOut(1000);   
}
