function $obj(obj)
{
	return document.getElementById(obj);
}

function show(obj)
{
	$obj(obj).style.display='';
}

function hide(obj)
{
	$obj(obj).style.display='none';
}

//正则得到地址栏传递参数的函数
function getPara(paraName){ 
var url = location.href;
var str="(?:\\?|&){1}"+paraName+"=([^&]*)"
var re=new RegExp(str,"gi");
re.exec(url);
return RegExp.$1;
}

//设置CSS
function setScroll(mode){
if(!mode||mode=="left"){
    document.getElementById("sqBorder").className="sqBorder_left";
    document.getElementById("scroll_div").className="scroll_div_left";
}
}
//设置滚动
function PicScroll(mode){
window.location.href="?action="+mode+"";
return false;
}


<!--
//图片滚动核心代码
function ScrollImg(ScrollType){
/*ScrollType参数有：top,bottom,left,right*/
var speed=28 //值越大速度越小 
var scroll_begin = document.getElementById("scroll_begin");
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
    //if (ScrollType=="left"){
    if (!ScrollType||ScrollType=="left"){
      if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
        scroll_div.scrollLeft-=scroll_begin.offsetWidth
      else
        scroll_div.scrollLeft++
    }
}

var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
}
//-->




function changediv20(id)
{
	if(id==1)
	{
		$obj('div20a_1').className='hover';
		$obj('div20a_2').className='';
		show('div20_1');
		hide('div20_2');
	}
	else if(id==2)
	{
		$obj('div20a_1').className='';
		$obj('div20a_2').className='hover';
		hide('div20_1');
		show('div20_2');
	}
}

function sethomepage(obj)
{
	obj.style.behavior='url(#default#homepage)';obj.setHomePage('http://www.dsti.net');
}

function addbookmark(url,title){
if (document.all)
window.external.AddFavorite(url,title);
}

function changesec(url)
{
	if($obj('sec').innerText>0)
		{$obj('sec').innerText=$obj('sec').innerText-1;}
	if($obj('sec').innerText<=0)
		{location=url;}
	setTimeout("changesec('"+url+"')",1000);
}


function returnfocus(obj,pics,links,texts,w,h,sh)
{
	var focus_width=w;
	var focus_height=h;
	var text_height=sh;
	var swf_height = focus_height+text_height;
	var FocusFlash = new sinaFlash("/Images/pixviewer.swf", "focusflash", focus_width, swf_height, "7", "#ffffff", false, "High");
	FocusFlash.addParam("allowScriptAccess", "sameDomain");
	FocusFlash.addParam("menu", "false");
	FocusFlash.addParam("wmode", "opaque");
	FocusFlash.addVariable("pics", pics);
	FocusFlash.addVariable("links", links);
	FocusFlash.addVariable("texts", texts);
	FocusFlash.addVariable("borderwidth", focus_width);
	FocusFlash.addVariable("borderheight", focus_height);
	FocusFlash.addVariable("textheight", text_height);
	FocusFlash.write(obj);
}
