﻿
////图片移动
//var sh;
//marqueesWidth=317;
//preLeft=0; currentLeft=0; stopscroll=false; getlimit=0;preTop=0; currentTop=0;
//var obj;
//var temp;
//function scrollLeft()
//{
//	if(stopscroll==true) return;
//	preLeft=obj.scrollLeft;
//	obj.scrollLeft+=2;
//	if(preLeft==obj.scrollLeft)
//	{
//		obj.scrollLeft=temp.offsetWidth-marqueesWidth+1;
//	}
//}

//function scrollRight()
//{
//	if(stopscroll==true) return;

//	preLeft=obj.scrollLeft;
//	obj.scrollLeft-=2;
//	if(preLeft==obj.scrollLeft)
//	{
//	obj.scrollLeft=temp.offsetWidth+marqueesWidth-1;
////		if(!getlimit)
////		{
////			marquees.scrollLeft=templayer.offsetWidth*2;
////			getlimit=marquees.scrollLeft;
////		}
////		marquees.scrollLeft-=1;
//	}
//}

//function Left(objstr,tempstr)
//{
//    obj=document.getElementById(objstr);
//    temp=document.getElementById(tempstr);
//	stopscroll = false;
//	sh = setInterval("scrollLeft()",20);
//}

//function Right(objstr,tempstr)
//{
//    obj=document.getElementById(objstr);
//    temp=document.getElementById(tempstr);
//	stopscroll = false;
//	sh = setInterval("scrollRight()",20);
//}

//function StopScroll()
//{
//	stopscroll = true;
//	clearInterval( sh );
//}

//function init()
//{	
//    var marstr=document.getElementById("marquees");
//    var marstr1=document.getElementById("marquees1");
//    if(marstr!=null)
//    {
//      with(marstr)
//	    {
//		    style.height=0;
//		    style.width=marqueesWidth;
//		    style.overflowX="hidden";
//		    style.overflowY="visible";
//		    style.align = "center";
//		    noWrap=true;
//	    }
//    }
//    if(marstr1!=null)
//    {
//	    with(marstr1)
//	    {
//		    style.height=0;
//		    style.width=marqueesWidth;
//		    style.overflowX="hidden";
//		    style.overflowY="visible";
//		    style.align = "center";
//		    noWrap=true;
//	    }
//    }
//}



//显示图片
function ShowDialog(url,width,height) 
{ 
  var  iWidth=width; 
  var  iHeight=height;
  var  iTop=(window.screen.height-iHeight)/2;
  var  iLeft=(window.screen.width-iWidth)/2;
  window.open(url,"Detail",
 "Scrollbars=yes,Toolbar=no,Location=no,Direction=no,Resizeable=no,   Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft) 
} 
////FLASH
//function SWFObject(swf, id, w, h, ver, c){
//	this.params = new Object();
//	this.variables = new Object();
//	this.attributes = new Object();
//	this.setAttribute("id",id);
//	this.setAttribute("name",id);
//	this.setAttribute("width",w);
//	this.setAttribute("height",h);
//	this.setAttribute("version",ver);
//	this.setAttribute("swf",swf);	
//	this.setAttribute("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
//	this.addParam("bgcolor",c);
//}
//SWFObject.prototype.addParam = function(key,value){
//	this.params[key] = value;
//}
//SWFObject.prototype.getParam = function(key){
//	return this.params[key];
//}
//SWFObject.prototype.addVariable = function(key,value){
//	this.variables[key] = value;
//}
//SWFObject.prototype.getVariable = function(key){
//	return this.variables[key];
//}
//SWFObject.prototype.setAttribute = function(key,value){
//	this.attributes[key] = value;
//}
//SWFObject.prototype.getAttribute = function(key){
//	return this.attributes[key];
//}
//SWFObject.prototype.getVariablePairs = function(){
//	var variablePairs = new Array();
//	for(key in this.variables){
//		variablePairs.push(key +"="+ this.variables[key]);
//	}
//	return variablePairs;
//}
//SWFObject.prototype.getHTML = function(){
//	var con = '';
//	if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
//		con += '<embed type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
//		con += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
//		for(var key in this.params){ con += [key] +'="'+ this.params[key] +'" '; }
//		var pairs = this.getVariablePairs().join("&");
//		if (pairs.length > 0){ con += 'flashvars="'+ pairs +'"'; }
//		con += '/>';
//	}else{
//		con = '<object id="'+ this.getAttribute('id') +'" classid="'+ this.getAttribute('classid') +'"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.setAttribute("version")+',0,0,0" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
//		con += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
//		for(var key in this.params) {
//		 con += '<param name="'+ key +'" value="'+ this.params[key] +'" />';
//		}
//		var pairs = this.getVariablePairs().join("&");
//		if(pairs.length > 0) {con += '<param name="flashvars" value="'+ pairs +'" />';}
//		con += "</object>";
//	}
//	return con;
//}
//SWFObject.prototype.write = function(elementId){	
//	if(typeof elementId == 'undefined'){
//		document.write(this.getHTML());
//	}else{
//		var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
//		n.innerHTML = this.getHTML();
//	}
//}
//   
//   

//   
//   var orginFlash = {init:false,isFullScreen:false,position:"",top:"",left:"",width:"",height:""};
//   var url="http://www.eflink.cn";
//	function writeFlash(flvName){
//		var so = new SWFObject(url+"/szicResource/Upload/Soft/playFLV.swf", "fplayer", "100%", "100%", 8, "#000000");
//		so.addParam("quality", "high");
//		so.addParam("swLiveConnect", "true");
//		so.addParam("menu", "false");
//		so.addParam("allowScriptAccess", "sameDomain");
//		so.addParam("allowFullScreen", "true");
//		so.addParam("FlashVars","myurl="+url+"/szicResource/Upload/FLV/"+flvName+"&myskin="+url+"/szicResource/Upload/Soft/SteelExternalAll.swf");
//		so.write("flashcontent");		
//	}
//		function writeFlash9(flvName){
//		var so = new SWFObject(url+"/szicResource/Upload/Soft/szicPlayFLV.swf", "fplayer", "100%", "100%", 8, "#000000");
//		so.addParam("quality", "high");
//		so.addParam("swLiveConnect", "true");
//		so.addParam("menu", "false");
//		so.addParam("allowScriptAccess", "sameDomain");
//		so.addParam("allowFullScreen", "true");
//		so.addParam("FlashVars","myurl="+url+"/szicResource/Upload/FLV/"+flvName+"&myskin="+url+"/szicResource/Upload/Soft/SkinUnderAllNoCaption.swf");
//		so.write("flashcontent");		
//	}
//	function getScreenSize(){
//		var w = 0;
//		var h = 0;
//		if( typeof( window.innerWidth ) == 'number' ) {
//			w = window.innerWidth;
//			h = window.innerHeight;
//		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//			w = document.documentElement.clientWidth;
//			h = document.documentElement.clientHeight;
//		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//			w = document.body.clientWidth;
//			h = document.body.clientHeight;
//		}
//		return {width:w,height:h};
//	}
//	function fullScreen(){
//		if(!orginFlash.init){			
//			orginFlash.position = document.getElementById("flashcontent").style.position;
//			orginFlash.top = document.getElementById("flashcontent").style.top;
//			orginFlash.left = document.getElementById("flashcontent").style.left;
//			orginFlash.width = document.getElementById("flashcontent").style.width;
//			orginFlash.height = document.getElementById("flashcontent").style.height;
//		}
//		orginFlash.init = true;
//		orginFlash.isFullScreen = true;
//		var screenSize = getScreenSize();
//		try{
//			document.getElementById("flashcontent").style.position = "absolute";
//			document.getElementById("flashcontent").style.top = "0px";
//			document.getElementById("flashcontent").style.left = "0px";
//			document.getElementById("flashcontent").style.width = screenSize.width +"px";
//			document.getElementById("flashcontent").style.height = screenSize.height +"px";
//			document.body.style.overflow="hidden";
//			window.scrollTo(0,0);
//		}catch(e){
//		}
//	}
//	function normal(){
//		if(orginFlash.init){
//			orginFlash.isFullScreen = false;
//			try{
//				document.getElementById("flashcontent").style.position = orginFlash.position;
//				document.getElementById("flashcontent").style.top = orginFlash.top;
//				document.getElementById("flashcontent").style.left = orginFlash.left;
//				document.getElementById("flashcontent").style.width = orginFlash.width;
//				document.getElementById("flashcontent").style.height = orginFlash.height;
//				document.body.style.overflow="auto";
//			}catch(e){				
//			}
//		}
//	}
//	function reSize(){
//		if(orginFlash.isFullScreen){
//			fullScreen();
//		}
//	}
//	window.onresize = reSize;
//function init()
//	{
//    	loadFlash("thyl.flv");
//	}
//function loadFlash(flvName)
//{
//    var flashcontent=document.getElementById("flashcontent");
//    if(flashcontent!=null)
//    {
//        p = navigator.plugins;
//        if (p && p.length) {
//            for (var i = 0; i < p.length; i++) {
//                if (p[i].name.indexOf('Shockwave Flash') > -1) {
//                    if(p[i].description.indexOf('9.0'))
//                    {
//                    writeFlash9(flvName);
//                    }
//                    else
//                    {
//                    writeFlash(flvName);
//                    }
//                    break;
//                }
//            }
//        } else if (window.ActiveXObject) {
//            for (var j=9;j>=6;j--) {
//                   try {   
//                    var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+j+"');");
//                    if (fl) {
//                        f=j + '.0';
//                        break;
//                    }
//                   }
//                   catch(e) {}
//          
//           }
//            if(f==9.0)
//            {
//            writeFlash9(flvName);
//            }
//            else
//            {	
//            writeFlash(flvName);
//            }
//        } 
//    }	
//}


//jxc 显示Tab

function ShowTab(k,MenuId,ContentId)
{
    for (i=0;i<2;i++)
    {
	    objMenu = document.getElementById(MenuId + i);
	    objContent =document.getElementById(ContentId + i);
	    if(objMenu!=null && objContent!=null)
	    {
            if(i==k)
            {
                objMenu.className ="tab_menu tab_on";
                objContent.style.display="";
            }
            else
            {
                objMenu.className="tab_menu tab_off";
	            objContent.style.display ="none";
            }
        }   
    }
}

//jxc 弹出对话框
function popupDialog(url,opw,oph)
{
   var isMSIE= (navigator.appName == "Microsoft Internet Explorer");  //判断浏览器 
        if (isMSIE) {
            window.showModalDialog(url,null,"dialogWidth:"+opw+"px;dialogHeight:"+oph+"px;status:0;scroll:no"); 
                   } 
       else { 
       window.open (url, 'newwindow', 'height="+opw+", width="+oph+",toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no') 
    } 
}