// JavaScript Document
//********************** flash libray*************************************
//
//
// swf file = this.movieValue
// swf file width = this.width
// swf file height = this.height
//
//
//
//example1
//window.onload = function(){
//	
//	var obj = new flashWrite(770,250,"images/test.swf");
//	obj.writeDiv = "flashDiv";
//
//	obj.writeNode();
//}
//
//<div id="flashDiv"></div>
//
//
//example2
//
//	var obj = new flashWrite(770,250,"images/test.swf");
//	obj.writeHtml();
//
//
//
//
//<noscript>
//<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="250" title="testflash">
//  <param name="movie" value="images/test.swf" />
//  <param name="quality" value="high" />
//  <embed src="images/test.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="250"></embed>
//</object>
//</noscript>
//
//
//
//ver1.0 
// ************************************************************************


function flashWrite(wid,hgt,href,ary){
	this.classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
	this.codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0";
	this.width = "770";
	this.height = "243";
	this.title = "testflash";
	
	
	this.movieValue = "test.swf";
	this.qualityValue = "high";

	this.pluginpage = "http://www.macromedia.com/go/getflashplayer";
	this.type = "application/x-shockwave-flash";
	
	this.html = "";
	
	this.writeDiv = "flash";
	
	
	this.width = wid;
	this.height = hgt;
	this.movieValue = href;
	
	
	
	
			
	this.buildHtml = function(){
		this.html = "<object classid=\"" + this.classid + "\" codebase=\"" + this.codebase + "\" width=\"" + this.width + "\" height=\"" + this.height + "\" title=\"" + this.title + "\">";
		this.html += "<param name=\"movie\" value=\"" + this.movieValue + "\" />";  
		this.html += "<param name=\"qualityValue\" value=\"" + this.qualityValue + "\" />";
		
		this.html += "<embed src=\"" + this.movieValue + "\" quality=\"" + this.qualityValue + "\" pluginpage=\"" + this.pluginpage + "\" type=\"" + this.type + "\" width=\"" + this.width + "\" height=\"" + this.height + "\"></embed>";
		
		this.html += "</object>";
		
		return this.html;
		
		
	
	}
	
	
	this.writeHtml = function(){
		
		document.write(this.buildHtml());
	}
	
	
	
	this.writeNode = function(){
		document.getElementById(this.writeDiv).innerHTML = this.buildHtml();
	}
	
	
	
	
}


