function DrawImage(thisp,w,h){
var a=new Image();   
a.src=thisp.src; 
if (a.width<w && a.height<h) {
thisp.width=a.width;/*使用原始图片大小*/ 
thisp.height=a.height;   
}else{
if(a.width/a.height>w/h){
   thisp.height=w*a.height/a.width; /*不对图片拉伸*/ 
   thisp.width=w;
}else{
   thisp.width=h*a.width/a.height; 
   thisp.height=h;
}
}
}
//导航
function $(obj){return document.getElementById(obj)}
function Tab(Xname,Cname,Lenght,j){for(i=1;i<Lenght;i++){eval("$('"+Xname+i+"').className='n2'");}eval("$('"+Xname+j+"').className='n1'");for(i=1;i<Lenght;i++){eval("$('"+Cname+i+"').style.display='none'");eval("$('"+Cname+j+"').style.display='block'");}}
//图片特效
var g_iDelayTime = 2500; //图片延时时间
var g_arrMovingList = {};
function showpic(sMovingId, iIndex){
	//iIndex++;
	//alert(sMovingId);
	if(g_arrMovingList[sMovingId] == null){		
		g_arrMovingList[sMovingId]={"index":0,"time":0};
	}
	if(g_arrMovingList[sMovingId].time !=0){
		window.clearTimeout(g_arrMovingList[sMovingId].time);
		g_arrMovingList[sMovingId].time = 0;
	}
	//切换图片显示
	var oCurrentImg = document.getElementById(sMovingId + g_arrMovingList[sMovingId].index);
	if(oCurrentImg != null)oCurrentImg.style.display="none";
		
	var oImg = 	document.getElementById(sMovingId + iIndex);
	if(oImg != null)oImg.style.display="";
	
	g_arrMovingList[sMovingId].index = iIndex;
	iIndex ++;
	//alert(sMovingId + iIndex);
	if( document.getElementById(sMovingId + iIndex) == null){
		iIndex = 1;
	}
	//定时显示下一张图
	//alert(sMovingId);
	g_arrMovingList[sMovingId].time = window.setTimeout(function(){showpic(sMovingId, iIndex);}, g_iDelayTime);
}
function init(){}
