﻿function swf_load(fileid, filename, widths, heights, fvs, wmd)
{
    this.FlashVars = (fvs != undefined)? fvs :'';
    this.Wmod = (wmd != undefined)? wmd :''; 

    var strSwf = "";

    strSwf += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
    strSwf += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"';
    strSwf += 'width="'+widths+'" height="'+heights+'" id="'+fileid+'" >';
    strSwf += '<param name="movie" value="'+filename+'" />';
    strSwf += '<param name="quality" value="high" />';
    strSwf += '<param name="menu" value="false" />';
    strSwf += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
    strSwf += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : ''; 
    strSwf += '<embed';
    strSwf += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : ''; 
    strSwf += (Wmod != null) ? ' wmode="'+Wmod+'"' : ''; 
    strSwf += ' src="'+filename+'" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer"';
    strSwf += 'type="application/x-shockwave-flash" width="'+widths+'" height="'+heights+'"  name="'+fileid+'" ></embed>';
    strSwf += '</object>';

    document.write(strSwf);
}


//初始化列表页状态
function pageLoadFirst()
{
    var menuId=document.location.search;
    
    if(menuId.length>4)
    {
        menuId=document.location.search.substring(4,5);
    }
    
    showSelect(menuId);  
}


//显示选中的内容
function showSelect(menuId)
{    
    hideAll();  
    
    switch(menuId)
    {
        case("1"):            
		    tbtype1.style.display="";
		    tbContent1.style.display="";
		    break;
        case("2"):            
		    tbtype2.style.display="";
		    tbContent2.style.display="";
		    break;
        case("3"):            
		    tbtype3.style.display="";
		    tbContent3.style.display="";
		    break;
        case("4"):            
		    tbtype4.style.display="";
		    tbContent4.style.display="";
		    break;
        case("5"):            
		    tbtype5.style.display="";
		    tbContent5.style.display="";
		    break;
        case("6"):            
		    tbtype6.style.display="";
		    tbContent6.style.display="";
		    break;
        case("7"):            
		    tbtype7.style.display="";
		    tbContent7.style.display="";
		    break;
		default:            
		    tbtype1.style.display="";
		    tbContent1.style.display="";
		    break;            
    }  
}


//隐藏所有内容
function hideAll()
{
	tbtype1.style.display= "none";
	tbtype2.style.display= "none";
	tbtype3.style.display= "none";
	tbtype4.style.display= "none";
	tbtype5.style.display= "none";
	tbtype6.style.display= "none";
	tbtype7.style.display= "none";	
	
	tbContent1.style.display= "none";
	tbContent2.style.display= "none";
	tbContent3.style.display= "none";
	tbContent4.style.display= "none";
	tbContent5.style.display= "none";
	tbContent6.style.display= "none";
	tbContent7.style.display= "none";
}



//初始化左栏状态
function leftLoadFirst()
{
    var menuId=document.location.search;
    
    if(menuId.length>4)
    {
        menuId=document.location.search.substring(4,5);
    }  
    
	tbtype1.style.display= "none";
	tbtype2.style.display= "none";
	tbtype3.style.display= "none";
	tbtype4.style.display= "none";
	tbtype5.style.display= "none";
	tbtype6.style.display= "none";
	tbtype7.style.display= "none";	 
    
    switch(menuId)
    {
        case("1"):            
		    tbtype1.style.display="";
		    break;
        case("2"):            
		    tbtype2.style.display="";
		    break;
        case("3"):            
		    tbtype3.style.display="";
		    break;
        case("4"):            
		    tbtype4.style.display="";
		    break;
        case("5"):            
		    tbtype5.style.display="";
		    break;
        case("6"):            
		    tbtype6.style.display="";
		    break;
        case("7"):            
		    tbtype7.style.display="";
		    break;
		default:   
		    break;            
    }  
}