﻿
function $(s){
	return document.all?document.all[s]:document.getElementById(s);
}




function changeCurrent(evt,objstr,str){
	var evt = (evt)?evt:(window.event)?window.event:"";
	var tgt = evt.srcElement?evt.srcElement:evt.target;
	//var obj = $("swapper");
	var obj = $(objstr);
	var j = 0;
	for(var i=0;i<obj.childNodes.length;i++){
		if(obj.childNodes[i].tagName&&obj.childNodes[i].tagName.toUpperCase()=="A"){
			j++;
			obj.childNodes[i].onfocus = function(){
				this.blur();
			}
			if(obj.childNodes[i]==tgt){
				$(str+j).style.display = "block";
				obj.childNodes[i].className = "c";
			}else{
				$(str+j).style.display = "none";
				obj.childNodes[i].className = "";
			}
		}
	}
	

}

function searchValue() {
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById) return false;
	if (!document.getElementById("searchValue")) return false;
	var searchValue = document.getElementById("searchValue");
	tempValue = searchValue.value;
	searchValue.onfocus = function() {
		if (searchValue.value == tempValue){
			searchValue.value = ""
		}
	}

	searchValue.onblur = function() {
		if (searchValue.value == ""){
			searchValue.value = tempValue;
		}
	}
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
	window.onload = func;
  } else {
	window.onload = function() {
	  oldonload();
	  func();
	}
  }
}
function setTab(){
 var tli=document.getElementById("menu0").getElementsByTagName("a");
 var mli=document.getElementById("main0").getElementsByTagName("ul");
 tli[0].onclick=function(){
		this.className="company"; 
		tli[1].className="remind";
		mli[0].style.display="block";
		mli[1].style.display="none";
	}
 tli[1].onclick=function(){
		this.className="click"; 
		tli[0].className="company_off";
		mli[1].style.display="block";
		mli[0].style.display="none";
	}
}


// <script language="javascript" type="text/javascript">flashWrite('flash/intro.swf','350','350','','#ffffff','var=num','transparent')</script>
function flashWrite(url,w,h,id,bg,vars,win){

var flashStr=   "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
                "<param name='allowScriptAccess' value='always' />"+
                "<param name='movie' value='"+url+"' />"+
                "<param name='FlashVars' value='"+vars+"' />"+
                "<param name='wmode' value='"+win+"' />"+
                "<param name='menu' value='false' />"+
                "<param name='quality' value='high' />"+
                "<param name='bgcolor' value='"+bg+"' />"+
                "<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
                "</object>";

document.write(flashStr); 
}

//window.onload=setTab;

//addLoadEvent(searchValue);

 var initialtab = [1, "sc1"]

    var previoustab = "";
    var intv;

    function expandcontent(cid, aobject)
        {
        stopTimer();
         var clen=aobject.offsetLeft
        highlighttab(aobject)

        if (previoustab != "")
            document.getElementById(previoustab).style.display = "none"

        document.getElementById(cid).style.display = "block"
        document.getElementById(cid).style.position = "absolute"
		
        previoustab = cid
	  
		
		
		
		 if(cid=="sc5")
			  {
		       document.getElementById(cid).style.left =clen/2
              } 
			else if (cid=="sc8")
			{document.getElementById(cid).style.right ="0"
			}
			else if (cid=="sc7")
			{document.getElementById(cid).style.right ="100px"
			}
			else if (cid=="sc6")
			{document.getElementById(cid).style.right ="200px"
			}
			else
				{document.getElementById(cid).style.left =clen
			    }
        }

    function highlighttab(aobject)
        {
        stopTimer();

        if (typeof tabobjlinks == "undefined")
            collectddimagetabs()

        for (i = 0; i < tabobjlinks.length; i++)
            tabobjlinks[i].className = ""

        aobject.className = "o"
        }

    function collectddimagetabs()
        {
        var tabobj = document.getElementById("navmenu")
        tabobjlinks = tabobj.getElementsByTagName("A")
        }

    function do_onload()
        {
        collectddimagetabs()
        expandcontent(initialtab[1], tabobjlinks[initialtab[0] - 1])
        }

    function startTimer()
        {
        intv = setTimeout("expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])", 2000);
        }

    function stopTimer()
        {
        clearTimeout(intv);
        }

  
  function showimg(valu)
   {var pict=document.getElementById("szzsimg");
   pict.src=valu;
   }
 


function fAddFavorite(sTitle)
{ 
    var url = "";
    url = window.location.href;
    if(document.all)
    {
    window.external.AddFavorite(url, sTitle); 
    }
    else
    {
    window.sidebar.addPanel(sTitle,url, "");
    }
}


function filterText(obj,type)
{
    
    var filterTex = "and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|script|create|object|xp_|drop";
    var endTex = "Ａnd|Ｅxec|Ｉnsert|Ｓelect|Ｄelete|Ｕpdate|Ｃount|＊|％|Ｃhr|Ｍid|Ｍaster|Ｔruncate|Ｃhar|Ｄeclare|Ｓcript|Ｃreate|Ｏbject|Ｘp_|Ｄrop";
    var arrfilterTex = filterTex.split('|');
    var arrEndTex = endTex.split('|');
     
    var txtValue = "";
    var border = "";
    txtValue = obj.value;
    txtValue = txtValue.toLowerCase();
    for(var i = 0;i<filterTex.length;i++)
    {
        txtValue = txtValue.split(arrfilterTex[i]).join(arrEndTex[i]);
    }

    obj.value = txtValue;
}