function o_m_over(action,marquee_id){
	var obj;
	obj=document.getElementById(marquee_id);
	if(action=="left"){
		obj.direction	=	"left";
	}else{
		obj.direction	=	"right";
	}
}

//for about_us

function showAboutUs(categoryId,obj){
	var tmpObj=obj;
	var ifrun	= false;
	currentId	= categoryId;
	currentObj	= obj
	if(typeof usArr =='undefined'){
		usArr	= [];
	}

	var func=function (){
		if(http.http_request.readyState==4){
			var tmpReturn=http.http_request.responseText.split('|||');
			var msg=tmpReturn[0];
			if(msg==1){
				usArr[categoryId]	= tmpReturn[1].split('-----');
				usArr[categoryId+'len']	= usArr[categoryId].length;
				tmpObj.innerHTML=usArr[categoryId][0];
				usArr[categoryId+'pos']	= 0;
			}else {
				alert(msg)
			}
		}else{
			if(ifrun)	return;
			ifrun	= true;
			tmpObj.innerHTML	= '<img style="float:left" src="/images/s_roller.gif"/>loading......';	
		}
	};
	if(typeof usArr[categoryId] =='undefined'){
		usArr[categoryId]	= [];
		http.init("get",func,"ajax.php","action=aboutus&categoryId="+categoryId,false);
	}else{

		if(arguments.length>2)	usArr[categoryId+'pos']	= 0;/*表示电击左侧菜单*/

		if(usArr[categoryId+'pos']>=usArr[categoryId+'len']){
			alert('the end');
			usArr[categoryId+'pos']--;
			return ;
		}else if(usArr[categoryId+'pos']<0){
			alert('the top');
			usArr[categoryId+'pos']++;
			return;
		}
		tmpObj.innerHTML	= usArr[categoryId][usArr[categoryId+'pos']];
	}
};

function goPage(flag){
	if(flag==1)	usArr[currentId+'pos']--;
	else		usArr[currentId+'pos']++;
	showAboutUs(currentId,currentObj);
};

// end about_us



function showflash(swf,width,height,swfdiv){
	document.getElementById(swfdiv).innerHTML='<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width+'" height="'+height+'"><param name="movie" value="'+swf+'" /><param name="quality" value="high" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="'+swf+'" quality="high" allowFullScreen="true" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" /></object>'; 
}

function   DownImage_t(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){
			ImgD.height=iheight;
		}
		else{
			ImgD.width=iwidth;
		}
	}
}



/*
*设置cookie
*/
function setCookie(sName,sValue){
	document.cookie=sName+"="+sValue+";path=/";
}
/*
*获取cookie
*/
function getCookie(sName){
	var aCookie=document.cookie.split(";");

	for(var i=0;i<aCookie.length;i++){
		var aCrumb=aCookie[i].split("=");
		if(sName==aCrumb[0])
			returnunescape(aCrumb[1]);
	}
	return null;
}
/*
*删除cookie
*/
function delCookie(sName){
	document.cookie=sName+"="+escape("sValue")+";expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}