﻿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 mytitle="上海汇益控制系统股份有限公司"
var title_en="SHANGHAI HUIYI CONTROL SYSTEM CO., LTD."
function menu(item){
var orginFlash = {init:false,isFullScreen:false,position:"",top:"",left:"",width:"",height:""};
    var so = new SWFObject("hy.swf?transfer="+item, "fplayer", "1000", "120", 8, "#FFFFFF");
    so.addParam("quality", "high");
    so.addParam("swLiveConnect", "true");
    so.addParam("menu", "false");
    so.addParam("allowScriptAccess", "sameDomain");
    so.addParam("allowFullScreen", "true");
    so.write("flashcontent");
    var so1 = new SWFObject("bottom.swf", "fplayer2", "1000", "80", 8, "#FFFFFF");
    so1.addParam("quality", "high");
    so1.addParam("swLiveConnect", "true");
    so1.addParam("menu", "false");
    so1.addParam("allowScriptAccess", "sameDomain");
    so1.addParam("allowFullScreen", "true");
    so1.write("flashcontent2");
}
function initialize() { 
  if(GBrowserIsCompatible()) { 
    var map = new GMap2(document.getElementById("map_canvas"))
    map.addControl(new GLargeMapControl());
    map.addControl(new GOverviewMapControl());
    var center = new GLatLng(31.250139190566062, 121.12855096435547)
    map.setCenter(center, 14)
    var huiyi = new GLatLng(31.260139190566062, 121.11555096435547)
    var blueIcon = new GIcon(G_DEFAULT_ICON)
    blueIcon.image = "http://www.huiyi-hydraulic.com/pic/huiyi.png"
    markerOptions = { icon:blueIcon };
    var marker = new GMarker(huiyi,{title:"上海汇益控制系统股份有限公司\n青浦区白鹤镇腾富路258号\n201711"});
    map.addOverlay(marker);
 } 
}
function resume(){
var orginFlash = {init:false,isFullScreen:false,position:"",top:"",left:"",width:"",height:""};
var so = new SWFObject("../video.swf", "fplayer", "480", "410", 8, "#FFFFFF");
so.addParam("quality", "high");
so.addParam("swLiveConnect", "true");
so.addParam("menu", "false");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("allowFullScreen", "true");
so.write("flashcontent6");	
}
function sale(){
var orginFlash = {init:false,isFullScreen:false,position:"",top:"",left:"",width:"",height:""};
var so = new SWFObject("marketing.swf", "fplayer2", "560", "1017", 8, "#FFFFFF");
so.addParam("quality", "high");
so.addParam("swLiveConnect", "true");
so.addParam("menu", "false");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("allowFullScreen", "true");
so.write("flashcontent3");
}
function kv(){
var orginFlash = {init:false,isFullScreen:false,position:"",top:"",left:"",width:"",height:""};
var so = new SWFObject("kv.swf", "fplayer", "700", "250", 8, "#FFFFFF");
so.addParam("quality", "high");
so.addParam("swLiveConnect", "true");
so.addParam("menu", "false");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("allowFullScreen", "true");
so.write("flashcontent6");
}
