///displayFlash///////////////////////////////////////////
// s	: url
// d	: flash id
// w	: source width
// h	: source height
// q	: quality ( for high ... )
// t	: wmode ("" for none, transparent, opaque ...)
// m	: menu
// bg : bgcolor
// fv : FlashVars
// asa : allowScriptAccess
/////////////////////////////////////////////////////////

function displayFlash(s,d,w,h,q,t,m,bg,fv,asa){
	var returnval = "";
	returnval = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"  codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\"";
	if (w!="")  returnval += " width="+w+" ";
	if (h!="")  returnval += " height="+h+" ";
	if (d!="")  returnval += " id="+d+ " ";

	returnval += " align=middle >";

	if (t!="")  returnval += " <param name=wmode value="+t+" /> ";
	if (s!="")  returnval += " <param name=movie value="+s+" />";
	if (q!="")  returnval += " <param name=quality value="+q+" />";
	if(m!="")  returnval += " <param name=menu value="+m+" />";
	if(bg!="")  returnval += "<param name=bgcolor value="+bg+" />";
	if(fv!="")  returnval += "<param name=FlashVars value="+fv+" />";
	if(asa!="") returnval += "<param name=allowScriptAccess value="+asa+" />";

	returnval += "<param name=menu value=false />";
	returnval += "<param name=bgcolor value=#ffffff />";

	returnval += " <embed src="+s+" ";

	if (q!="")  returnval += " quality="+q+" ";
	if (t!="")  returnval += " wmode="+t+" ";
	if (m!="")  returnval += " menu="+m+" ";
	if(bg!="") returnval += " bgcolor="+bg+" ";
	//if(a!="") returnval += " align="+a+" ";
	if(fv!="") returnval += " flashvars="+fv+" ";

	returnval += " type=\"application/x-shockwave-flash\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" ";

	if (w!="")  returnval += " width="+w+" ";
	if (h!="")  returnval += " height="+h+" ";

	returnval += " >";
	returnval += " </embed></object>";

	return returnval;
}


///displayFlash2//////////////////////////////////////////
// s	: url
// d	: id
// cx : ÁÂÇ¥ x
// cy : ÁÂÇ¥ y
// h : height
// w : width
////////////////////////////////////////////////////////
function displayFlash2(s,d,cx,cy,h,w)
{
	var returnval = "";
	returnval = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"  codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\"";
	if(d!="") returnval += " id="+d+" ";
	if(h!="")  returnval += " height="+h+" ";
	if(w!="")  returnval += " width="+w+" ";
	returnval += " > ";

	if(cx!="")  returnval += " <PARAM NAME=\"_cx\" VALUE="+cx+"> ";
	if(cy!="")  returnval += " <PARAM NAME=\"_cy\" VALUE="+cy+"> ";

	returnval += " <PARAM NAME=\"FlashVars\" VALUE=\"\"> ";
	returnval += " <PARAM NAME=\"Movie\" VALUE="+s+"> ";
	returnval += " <PARAM NAME=\"Src\" VALUE="+s+"> ";
	returnval += " <PARAM NAME=\"WMode\" VALUE=\"Window\"> ";
	returnval += " <PARAM NAME=\"Play\" VALUE=\"-1\"> ";
	returnval += " <PARAM NAME=\"Loop\" VALUE=\"-1\"> ";
	returnval += " <PARAM NAME=\"Quality\" VALUE=\"High\"> ";
	returnval += " <PARAM NAME=\"SAlign\" VALUE=\"\"> ";
	returnval += " <PARAM NAME=\"Menu\" VALUE=\"-1\"> ";
	returnval += " <PARAM NAME=\"Base\" VALUE=\"\"> ";
	returnval += " <PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\"> ";
	returnval += " <PARAM NAME=\"Scale\" VALUE=\"ShowAll\"> ";
	returnval += " <PARAM NAME=\"DeviceFont\" VALUE=\"0\"> ";
	returnval += " <PARAM NAME=\"EmbedMovie\" VALUE=\"0\"> ";
	returnval += " <PARAM NAME=\"BGColor\" VALUE=\"\"> ";
	returnval += " <PARAM NAME=\"SWRemote\" VALUE=\"\"> ";
	returnval += " <PARAM NAME=\"MovieData\" VALUE=\"\"> ";
	returnval += " <PARAM NAME=\"SeamlessTabbing\" VALUE=\"1\"> ";

	returnval += " <embed src="+s+" menu=\"false\" quality=\"high\" bgcolor=\"#ffffff\" ";
	if(w!="") returnval += " width="+w+" ";
	if(h!="") returnval += " height="+h+" ";
	if(d!="") returnval += "name="+d+" ";
	returnval += " align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" /></embed>";
	returnval += " </OBJECT> ";

	return returnval;
}


// write document contents
function documentWrite(src){
	document.write(src);
	//alert(src);
}
