<!--
	var imageFolder = "/img/"+slang+"/ya_services";
	var movFolder = "/upload/qtvr";
	var videosize = 500;

	function MediaPlayers() {
		this.propArray = new Array();
		this.count = 0;
		this.pos = -1;
		this.prop = function(mtype, height, width, mfile, text) {
			this.mtype = mtype;
			this.height = height;
			this.width = width;
			this.mfile = mfile;
			this.text = text;
		}
		this.setMedia = function(mtype, height, width, mfile, text) {
			this.propArray[this.count] = new this.prop(mtype, height, width, mfile, text);
			this.count += 1;
		}
		this.getPlayerPlugin = function()  {
			var strPlugin = '';
//			alert(this.propArray[pos].mtype);
			switch (this.propArray[this.pos].mtype) {
				case "quicktime":
					strPlugin += '<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" HEIGHT="'+this.propArray[this.pos].height+'" WIDTH="'+this.propArray[this.pos].width+'">';
					strPlugin += '<PARAM NAME="src" VALUE="'+movFolder+"/"+this.propArray[this.pos].mfile+'" >';
					strPlugin += '<PARAM NAME="AutoPlay" VALUE="true" >';
					strPlugin += '<PARAM NAME="Controller" VALUE="false" >';
					strPlugin += '<EMBED SRC="'+movFolder+"/"+this.propArray[this.pos].mfile+'" HEIGHT="'+this.propArray[this.pos].height+'" WIDTH="'+this.propArray[this.pos].width+'" TYPE="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download/" AUTOPLAY="true" CONTROLLER="false" />';
					strPlugin += '</OBJECT>';
					break;
				case "image":
					strPlugin += '<img src="'+movFolder+"/"+this.propArray[this.pos].mfile+'" HEIGHT="'+this.propArray[this.pos].height+'" WIDTH="'+this.propArray[this.pos].width+'" border="0">';
					break;
			}
			return strPlugin;
		}
		this.showList = function() {
			var liststr = '';
			liststr += '<table cellpadding="0" cellspacing="0" border="0">';
			liststr += '<tr>';
			for (i=0; i<this.count; i++) {
				if (this.propArray[i].text == "") {
					continue;
				}
				if (this.pos == i) {
					over = "_f2";
				} else {
					over = "";
				}
				liststr += '<td><a href="javascript:mp.run('+i+');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\''+this.propArray[i].text+'\',\'\',\''+imageFolder+'/'+this.propArray[i].text+'_f2.jpg\',1);"><img name="'+this.propArray[i].text+'" src="'+imageFolder+'/'+this.propArray[i].text+over+'.jpg" border="0" alt=""></a></td>';
    		}
  			liststr += '</tr>';
  			liststr += '</table>';
//  			alert(liststr);

  			document.getElementById("panel").innerHTML = liststr;
		}
		this.runplayer = function run(pos) {
			this.pos = pos;
			document.getElementById('innerpanel').innerHTML = this.getPlayerPlugin();
		}
		this.writeTemplate = function() {
			document.write ('<style type="text/css">');
			document.write ('<!--');
			document.write ('.innerpanel {');
			document.write ('	background-color: #666666;');
			document.write ('	margin: 7px;');
			document.write ('	padding: 7px;');
			document.write ('}');
			document.write ('-->');
			document.write ('</style>');
			document.write ('<table cellpadding="0" cellspacing="0" border="0" width="'+videosize+'">');
			document.write ('<tr>');
			document.write ('<td><div id="panel"></div></td>');
			document.write ('</tr>');
			document.write ('<tr>');
			document.write ('<td class="innerpanel"><div id="innerpanel"></div></td>');
			document.write ('</tr>');
			document.write ('</table>');
		}

		this.run = function run(pos) {
			this.pos = pos;
			document.getElementById('innerpanel').innerHTML = this.getPlayerPlugin();
			this.showList();
		}
	}

	var mp = new MediaPlayers();
//	mp.setMedia("image", 346, videosize, "index.jpg", "");
	mp.setMedia("quicktime", 346, videosize, "bar_v2.mov", "yacht_hk_btn_bar");
	mp.setMedia("quicktime", 346, videosize, "bathroom_v2.mov", "yacht_hk_btn_bath");
	mp.setMedia("quicktime", 346, videosize, "bedroom_v3.mov", "yacht_hk_btn_bed");
	mp.setMedia("quicktime", 346, videosize, "frontdeck_v2.mov", "yacht_hk_btn_front");
	mp.setMedia("quicktime", 346, videosize, "livingroom_v3.mov", "yacht_hk_btn_living");
	mp.setMedia("quicktime", 346, videosize, "topdeck_v2.mov", "yacht_hk_btn_top");

	mp.writeTemplate();
	mp.showList();
	mp.runplayer(0);
//-->