var langs = new Array('en', 'sc');
var lang = langs[0];
var loca = location.href;
var domain = '';
var found = false;

var menu = new Array();

/* Get Current Lang */
for(x in langs){
	if(loca.search('/'+langs[x]+'/')!=-1){
		lang = langs[x];
		found = true;
	}
}

if(loca.match(/.*\/$/)){
	location.href = loca.match(/.*\//)+'index.html';
}

if(found){
	domain = loca.match(eval('/.*\\/'+lang+'/'))[0].replace('/'+lang+'','/');
	var tempFolder = loca.match(eval('/\\/'+lang+'\\/[^\\/]+\\//'));
	var currentFolder = false;
	var fixedtd = false;
	var currentPage = '';
	var currentID = new Array();
	currentID[1] = 0;
	if(tempFolder){
		currentFolder = tempFolder[0].replace('/'+lang+'/','').replace('/','');
		currentPage = loca.replace(domain+lang+'/'+currentFolder+'/', '');
		if(currentFolder.toString() != "disclaimer" && currentFolder.toString() != "privacy" && currentFolder.toString() != "sitemap" && currentFolder.toString() != "contact" && currentFolder.toString() != "our_network" && currentFolder.toString() != "links" && currentFolder.toString() != "search"){
			fixedtd = true;
		}
	}
}else{
	domain = loca.match(/.*\//);
}

document.write('<link href="'+domain+'css/vr_common.css" rel="stylesheet" type="text/css" />');
document.write('<link href="'+domain+'css/vr_nav_level2.css" rel="stylesheet" type="text/css" />');
document.write('<link href="'+domain+'css/vr_add.css" rel="stylesheet" type="text/css" />');
document.write('<link href="'+domain+'css/vr_sitemap.css" rel="stylesheet" type="text/css" />');

function getSiteMap(){
	var result = '';
	result += '\t\t\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">';
	for(x in menu){
		if(menu[x].level==1){
			result+='\t\t\t  <tr>\r\n';
			result+='\t\t\t\t<td class="sitemap_fir">';
			if(menu[x].path.substr(0,4)=='http://'.substr(0,4)){
				thePath = menu[x].path;
				result += '<a href="'+thePath+'" target="_blank">';
			}else if(menu[x].path.search('javascript:')!=-1){
				thePath = menu[x].path;
				result += '<a href="'+thePath+'">';
			}else{
				thePath = domain+lang+'/'+menu[x].path;
				result += '<a   '+((menu[x].path.search("online_quotation_form") != -1)?'href="javascript: alert(\'Coming soon!\');"':'href="'+thePath+'"')+'  >';
				//result += '<a href="'+thePath+'">';
			}
			result += eval('menu[x].caption.'+lang)+'<br /></a>\r\n';
			if(menu[x].child && menu[x].child.length>0){
				result += '\t\t\t\t  <ul class="sitemap_sec">\r\n';
				for(y in menu[x].child){
					result += '\t\t\t\t\t<li>'
					if(menu[x].child[y].path.substr(0,4)=='http://'.substr(0,4)){
						result += '<a href="'+menu[x].child[y].path+'" target="_blank">';
					}else if(menu[x].child[y].path.search('javascript:')!=-1){
						result += '<a href="'+menu[x].child[y].path+'">';
					}else{
						thePath = domain+lang+'/'+menu[x].path+'/'+menu[x].child[y].path;
						result += '<a href="'+thePath+'">';
					}
					result += eval('menu[x].child[y].caption.'+lang)+'</a>\r\n';
				}
				result += '\t\t\t\t  </ul>\r\n';
			}
			result+='</td>';
			result+='\t\t\t  </tr>\r\n';
		}
	}
	result += '\t\t\r\n</table>';
	document.write(result);
}
function getFooter(){
	if(fixedtd!=false){
		document.writeln('	           </td>');
		document.writeln('          <td width="25" valign="top">&nbsp;</td>');
		document.writeln('          <td width="199" valign="top">');
		document.writeln('			<ul class="nav2">');
		document.writeln(getRightMenu());
		document.writeln('   			</ul></td>');
		document.writeln('          <td width="1" valign="top" background="'+domain+'images/index_border_right_1_inside.gif"><img src="'+domain+'images/index_border_right_1_inside.gif" width="1" height="20"></td>');
		document.writeln('        </tr>');
		document.writeln('      </table>');
		document.writeln('      <table width="980" border="0" cellspacing="0" cellpadding="0">');
	}else{
		document.writeln('</td>');
		document.writeln('          <td valign="top" background="'+domain+'images/index_border_right_1.gif"><img src="'+domain+'images/index_border_right_1.gif" width="20" height="20"></td>');
		document.writeln('        </tr>');
	}
	document.writeln('        <tr>');
	document.writeln('          <td width="20"><img src="'+domain+'images/index_border_left_2.gif" width="20" height="30"></td>');
	document.writeln('          <td background="'+domain+'images/index_border_center_1.gif">&nbsp;</td>');
	document.writeln('          <td width="20"><img src="'+domain+'images/index_border_right_2.gif" width="20" height="30"></td>');
	document.writeln('        </tr>');
	document.writeln('        <tr>');
	document.writeln('          <td width="20" background="'+domain+'images/index_border_left_3.gif"><img src="'+domain+'images/index_border_left_3.gif" width="20" height="20"></td>');
	document.writeln('          <td bgcolor="#f6f6f6"><table width="940" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('            <tr>');
	document.writeln('              <td align="left" class="footer"><a href="#" onclick="javascript: btn.link_internal(btn.disclaimer);">'+switch_word('Disclaimer','免责声明')+'</a> | <a href="#" onclick="javascript: btn.link_internal(btn.privacy);">'+switch_word('Privacy Policy','隐私声明')+'</a><br />');
	document.writeln('                '+switch_word('Copyright &copy;  2006-2010.  Ryerson China Limited.  All Rights Reserved.','版权所有 &copy;  2006-2010 瑞尔盛中国有限公司 不得转载')+'</td>');
	document.writeln('              <td align="right" valign="bottom"><a href="http://www.westcomzivo.com/" target="_blank"><img border="0" src="'+domain+'images/cover/cover_wzl.gif" width="92" height="15" /></a></td>');
	document.writeln('            </tr>');
	document.writeln('          </table></td>');
	document.writeln('          <td width="20" background="'+domain+'images/index_border_right_3.gif"><img src="'+domain+'images/index_border_right_3.gif" width="20" height="20"></td>');
	document.writeln('        </tr>');
	document.writeln('        <tr>');
	document.writeln('          <td width="20"><img src="'+domain+'images/index_border_left_4.gif" width="20" height="20"></td>');
	document.writeln('          <td background="'+domain+'images/index_border_center_2.gif">&nbsp;</td>');
	document.writeln('          <td width="20"><img src="'+domain+'images/index_border_right_4.gif" width="20" height="20"></td>');
	document.writeln('        </tr>');
	document.writeln('    </table></td>');
	document.writeln('  </tr>');
	document.writeln('</table>');
}
function getHeader(){
	document.writeln('<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="bg_'+((currentFolder)?"content":"index")+'"'+((currentFolder)?"":' height="100%"')+'>');
	document.writeln('  <tr>');
	document.writeln('    <td align="center" valign="top"><table width="980" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('      <tr>');
	document.writeln('        <td><table width="980" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('          <tr>');
	document.writeln('            <td align="left"><a href="'+domain+'"><img src="'+domain+'images/logo_vsc_ryerson.jpg" width="345" height="81" border="0"></a></td>');
	document.writeln('            <td align="right" valign="top"><a href="javascript:void(0);" onclick="javascript: btn.link(btn.intranet);"><img src="'+domain+'images/'+lang+'/btn/btn_intranet.jpg" width="105" height="28" class="btn_over" /></a></td>');
	document.writeln('          </tr>');
	document.writeln('        </table></td>');
	document.writeln('      </tr>');
	document.writeln('      <tr>');
	document.writeln('        <td class="imgTD"><img src="'+domain+'images/topbar.jpg" width="980" height="3"></td>');
	document.writeln('      </tr>');
	document.writeln('      <tr>');
	document.writeln('        <td align="right" bgcolor="#000000"><table border="0" cellspacing="0" cellpadding="0">');
	document.writeln('          <tr><form name="frm_search" id="frm_search">');
	document.writeln('            <td><a href="'+domain+lang+'/"><img src="'+domain+'images/'+lang+'/btn/btn_home.gif" class="btn_over" /></a></td>');
	document.writeln('            <td><a href="#" onclick="javascript: btn.link_internal(btn.sitemap);"><img src="'+domain+'images/'+lang+'/btn/btn_sitemap.gif" class="btn_over" /></a></td>');
	document.writeln('            <td><a href="#" onclick="javascript: btn.link_internal(btn.links);"><img src="'+domain+'images/'+lang+'/btn/btn_related_links.gif" class="btn_over" /></a></td>');
	document.writeln('            <td><img src="'+domain+'images/topbar_dotline_1.gif" width="22" height="23"></td>');
	document.writeln('            <td>');
//document.writeln('<form action="/en/search_result.html" id="cse-search-box">');
//document.writeln('  <div>');
document.writeln('    <input type="hidden" name="cx" value="011604960118737341785:bqowuinpxl8" />');
document.writeln('    <input type="hidden" name="cof" value="FORID:10" />');
document.writeln('    <input type="hidden" name="ie" value="UTF-8" />');
document.writeln('    <input type="text" name="q" size="31" class="input_box" />');
//document.writeln('    <input type="submit" name="sa" value="搜尋" />');
//document.writeln('  </div>');
//document.writeln('</form>');
	document.writeln('</td>');
	//document.writeln('            <td><a href="#" onclick="javascript: btn_search();"><img src="'+domain+'images/'+lang+'/btn/btn_search.gif" width="33" height="23" class="btn_over" /></a></td>');
	document.writeln('            <td><input type="image" src="'+domain+'images/'+lang+'/btn/btn_search.gif" width="33" height="23" class="btn_over" /></td>');
	document.writeln('            <td><img src="'+domain+'images/topbar_dotline_2.gif" width="20" height="23"></td>');
	if(lang=='en'){
		document.writeln('            <td><img src="'+domain+'images/common/btn/btn_eng_over.gif" /></td>');
		document.writeln('            <td><a href="#" onclick="javascript:switchLang(\'sc\');"><img src="'+domain+'images/common/btn/btn_chi.gif" class="btn_over" /></a></td>');
	}else{
		document.writeln('            <td><a href="#" onclick="javascript:switchLang(\'en\');"><img src="'+domain+'images/common/btn/btn_eng.gif" class="btn_over" /></a></td>');
		document.writeln('            <td><img src="'+domain+'images/common/btn/btn_chi_over.gif" /></td>');
	}
	document.writeln('            <td><img src="'+domain+'images/spacer.gif" width="17" height="10"></td>');
	document.writeln('          </form></tr>');
	document.writeln('        </table></td>');
	document.writeln('      </tr>');
	document.writeln('      <tr>');
	document.writeln('        <td align="left" background="'+domain+'images/bg_nav.jpg"><table border="0" cellspacing="0" cellpadding="0">');
	document.writeln('          <tr>');
	document.writeln('            <td><img src="'+domain+'images/spacer.gif" width="8" height="10"></td>');
	document.writeln('            <td class="imgTD"><ul class="topMenu">'+getTopMenu()+'</ul></td>');
	document.writeln('          </tr>');
	document.writeln('        </table></td>');
	document.writeln('      </tr>');
	document.writeln('      <tr><td>');
	if(currentFolder){
		document.writeln('        <img src="'+domain+'images/'+lang+'/main_'+'visual_sec_'+currentID[0]+'.jpg" height="124"'+' width="980">');
	}else{
		document.writeln('        			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" name="main_flash" width="980" height="244" align="middle" id="main_flash">');
		document.writeln('                      <param name="allowScriptAccess" value="sameDomain" />');
		document.writeln('                      <param name="allowFullScreen" value="false" />');
		document.writeln('                      <param name="movie" value="../images/'+switch_word('en','sc')+'/main_flash.swf" />');
		document.writeln('                      <param name="quality" value="high" />');
		document.writeln('                      <param name="wmode" value="transparent" />');
		document.writeln('                      <param name="bgcolor" value="#ffffff" />');
		document.writeln('                      <embed src="../images/'+switch_word('en','sc')+'/main_flash.swf" quality="high" bgcolor="#ffffff" width="980" height="244" name="sec_1_05_flash" align="middle" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></embed>');
		document.writeln('                    </object>');	
	}
	//document.writeln('        <td><img src="'+domain+'images/'+lang+'/main_'+((currentFolder)?'visual_sec_'+currentID[0]+'.jpg" height="124"':'flash.jpg" height="244"')+' width="980"></td>');
	
	
	document.writeln('      </td></tr>');
	document.writeln('    </table>');
	document.writeln('      <img src="'+domain+'images/index_border_top.gif" width="980" height="23"><br>');
	document.writeln('      <table width="980" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('        <tr>');
	document.writeln('          <td width="20" valign="top" background="'+domain+'images/index_border_left_1.gif"><img src="'+domain+'images/index_border_left_1.gif" width="20" height="20"></td>');
	document.writeln('          <td valign="top" class="text12"'+((fixedtd)?' width="735" align="left"':'"')+' id="html_content">');
}

function switchLang(toLang){
	/*if(toLang == 'sc')
		pop('/Ryerson/');*/
	location.href = location.href.replace('/'+lang+'/', '/'+toLang+'/');
}

function btn_search(){
	if(trim($('#searchQuery').val())==''){
		alert("Please enter the keywords to search");
		frm_search.searchQuery.focus();
		return false;
	}
}
function trim(str){
	return str.replace(/^\s+|\s+$/g,"");
}
function addMenu(menuObj){
	var foundParent = false;
	for(x in menu){
		if(menu[x].id==menuObj.parent){
			foundParent = x;
		}
	}
	if(foundParent){
		if(typeof menu[foundParent].child == "undefined"){
			menu[foundParent].child = new Array();
		}
		menu[foundParent].child.push(menuObj);
	}
	menu.push(menuObj);
}
function getTopMenu(){
	var str = '';
	var tempMenu = new Array();
	var thePath = '';
	for(x in menu){
		if(menu[x].level==1){
			tempMenu.push(menu[x]);
		}
		
		if(menu[x].path==currentFolder){
			currentID[1] = menu[x].id;
			currentID[0] = menu[x].id.match(/^\d+/);
			
		}
	}
	
	if(currentID[0] == null){
		currentID[0] = currentFolder;
	}
	
	for(x in tempMenu){
		if(currentID[1] != tempMenu[x].id){
			thePath = tempMenu[x].path;
			
			if(typeof menu[x].child != "undefined"){
				thePath += '/'+tempMenu[x].child[0].path;
			}else{
				if(thePath.search('.asp')==-1){
					thePath += '/index.html';
				}
			}
			if(tempMenu[x].path.substr(0,4)=='http://'.substr(0,4)){
				str += '<li style="position:relative;"><a href="'+thePath+'" target="_blank">';
			}else{
				str += '<li style="position:relative;"><a '+((tempMenu[x].path == "online_quotation_form")?'href="javascript: alert(\'Coming soon!\');"':'href="'+domain+lang+'/'+thePath+'"')+'>';
			}
			str += '<img src="'+domain+tempMenu[x].topmenuimg+'" class="btn_over" /></a>';
			
			var hassub = false;
			var i = 1;
			for(y in menu){
				
			
				if(menu[y].level==2 && menu[y].parent == tempMenu[x].id){
					hassub = true;
					if(i == 1){
						str += '<div id="submenu"><ul>';
					}
					str += '<li><a href="'+domain+lang+'/'+tempMenu[x].path+'/'+menu[y].path+'">' + eval('menu[y].caption.'+lang) + '</a></li>';
					i++;
				}
			}
			
			if(hassub){
				str += '</ul></div>';
			}				 
			str += '</li>';
		}else{
			document.title = document.title + ' - ' + eval('tempMenu[x].caption.'+lang);			
			str += '<li style="position:relative;"><img src="'+domain+tempMenu[x].topmenuimg.replace('\.','_over\.')+'" />';
			//New
			str += '<div id="submenu"><ul>';
			for(y in menu){
				if(menu[y].level==2 && menu[y].parent == tempMenu[x].id){
					str += '<li><a href="'+domain+lang+'/'+tempMenu[x].path+'/'+menu[y].path+'">' + eval('menu[y].caption.'+lang) + '</a></li>';
				}
			}
			str += '</ul></div>';
			//New
			str += '</li>';
		}
	}
	return str;
}
function getRightMenu(){
	var str = '';
	var tempMenu = new Array();
	var add = '';
	for(x in menu){
		if(menu[x].level==2 && menu[x].parent==currentID[1]){
			tempMenu.push(menu[x]);
		}
	}
	for(x in tempMenu){
		add = '';
		if(tempMenu[x].path==currentPage){
			add = ' class="current"';
			document.title = document.title + ' - ' + eval('tempMenu[x].caption.'+lang);
		}
		if(tempMenu[x].path.substr(0,4)=='http://'.substr(0,4)){
			str += '<li><a href="'+tempMenu[x].path+'" target="_blank" '+add+'>';
		}else{
			str += '<li><a href="'+tempMenu[x].path+'" '+add+'>';
		}
		str += eval('tempMenu[x].caption.'+lang)+'</a></li>';
	}
	return str;
}

function pop(path){
	if(path == null)
		path = '';
	var myWindow = window.open('', '_blank', 'resizable=no,height=250,width=500');
	myWindow.document.write("<head><title>VSC - Ryerson</title></head>");
	myWindow.document.write("<body style='margin: 35px 0px 0px 0;background-color=DDDDDD;'>");
	myWindow.document.write("<div align='center' ><br><img border='0' src='"+path+"images/logo_vsc_ryerson.jpg' /><br><br><br><br>");
	myWindow.document.write("<font face='新細明體'>欢迎来到瑞尔盛  全新中文网站即将启动</font><br><br></div>");
	myWindow.document.write("</body>");
	myWindow.focus();
}

function contactFormCheck(){
	var data = [
		{name:"contact_f_company",checker:"length{1,200}",caption:"Company"},
		{name:"contact_f_name",checker:"length{1,100}",caption:"Name"},
		{name:"contact_f_country",checker:"length{1,100}",caption:"Country"},
//		{name:"contact_f_phone",checker:"phone",caption:"Phone"},
//		{name:"contact_f_fax",checker:"phone",caption:"Fax"},
		{name:"contact_f_emailaddress",checker:"email",caption:"Email"},
		{name:"contact_f_subject",checker:"length{1,200}",caption:"Subject"},
		{name:"contact_f_message",checker:"length{1,5000}",caption:"Message"}
	];
	var msg2user = new Array();
	$('.red').remove();
	for(var x in data){
		switch(data[x].checker){
			case "phone":
				if(!is.Valid.Phone($('#'+data[x].name).val())){
					msg2user.push("Please enter valid "+data[x].caption+" with 8+ integer.");
					$('#'+data[x].name).after('<span class="red">*</span>');
				}
				break;
			case "email":
				if(!is.Valid.Email($('#'+data[x].name).val())){
					msg2user.push("Please enter valid "+data[x].caption);
					$('#'+data[x].name).after('<span class="red">*</span>');
				}
				break;
			default:
				var checkFromTo = data[x].checker.match(/{.*}/)[0].replace(/{|}/g,'').split(",");
				if(! is.Valid.Length($('#'+data[x].name).val(), checkFromTo[0], checkFromTo[1])){
					msg2user.push("Please enter "+data[x].caption+" with "+checkFromTo[0]+" to "+checkFromTo[1]+" characters.");
					$('#'+data[x].name).after('<span class="red">*</span>');
				}
				break;
		}
	}
	if(msg2user.length>0){
		alert(msg2user.join("\r\n"));
		return false;
	}else{
		return true;
	}
}
var is = {
	NotEmpty: function(str){
		return str.replace(/^\s+|\s+$/g,"").length>0;
	},
	Valid:{
		Phone: function(str){
			var filter = /^\d{8,}$/;
			return filter.test(str);
		},
		Email: function(str){
			var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
			return filter.test(str);
		},
		Length: function(str,from,to){
			var needTo = true;
			if(typeof to=="undefined"){
				needTo = false;
			}
			if(needTo){
				return (str.length>from && str.length<to);
			}else{
				return (str.length>from);
			}
		}
	}
}
function contact_f_reset(){
	document.contactfrm.reset();
}
function switch_word(en,sc){

	if(lang == "sc")
		return sc;
	else
		return en;

}
switch_word(1,2);

function PopWin(url,page,w,h){
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
	eval("nw = window.open(url, page,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,pageXOffset=0,pageYOffset=0,top=" + top + ",left=" + left + ",width=" + w + ",height=" + h + "')");
	if ( nw.focus != null)
	{nw.focus();}
}

function pop_wmv(path, width, height){
var left = (screen.width/2)-(width/2);
var top = (screen.height/2)-(height/2);

height = (height*1)+45;
var myWindow = window.open('', '_blank', 'resizable=no,top='+top+',left='+left+',height='+height+',width='+width);
myWindow.document.write('<link href="' + this.url_location + 'css/format.css" rel="stylesheet" type="text/css">');
myWindow.document.write("<body style='margin: 0 0 0 0'>");
myWindow.document.write('      <OBJECT id="mediaPlayer" width="'+width+'" height="'+height+'" ');
myWindow.document.write('      classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ');
myWindow.document.write('      codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
myWindow.document.write('      standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
myWindow.document.write('      <param name="fileName" value="'+path+'">');
myWindow.document.write('      <param name="animationatStart" value="true">');
myWindow.document.write('      <param name="transparentatStart" value="true">');
myWindow.document.write('      <param name="autoStart" value="true">');
myWindow.document.write('      <param name="showControls" value="true">');
myWindow.document.write('      <param name="loop" value="true">');
myWindow.document.write('      <EMBED type="application/x-mplayer2"');
myWindow.document.write('        pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"');
myWindow.document.write('        id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="-1" ');
myWindow.document.write('        bgcolor="darkblue" showcontrols="true" showtracker="-1" ');
myWindow.document.write('        showdisplay="0" showstatusbar="-1" videoborder3d="-1" width="'+width+'" height="'+height+'"');
myWindow.document.write('        src="'+path+'" autostart="true" designtimesp="5311" loop="true">');
myWindow.document.write('      </EMBED>');
myWindow.document.write('      </OBJECT>');
myWindow.document.write("</body>");
myWindow.focus();
}

function pop_mp4(path, width, height){
var left = (screen.width/2)-(width/2);
var top = (screen.height/2)-(height/2);

height = (height*1)+45;
var myWindow = window.open('', '_blank', 'resizable=no,top='+top+',left='+left+',height='+height+',width='+width);
myWindow.document.write('<link href="' + this.url_location + 'css/format.css" rel="stylesheet" type="text/css">');
myWindow.document.write("<body style='margin: 0 0 0 0'>");
myWindow.document.write('        <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" WIDTH="'+width+'" HEIGHT="'+height+'">');
myWindow.document.write('        <PARAM NAME="src" VALUE="'+path+'">');
myWindow.document.write('        <PARAM NAME="autoplay" VALUE="true">');
myWindow.document.write('        <PARAM NAME="controller" VALUE="true">');
myWindow.document.write('        <PARAM NAME="loop" VALUE="false">');
myWindow.document.write('        <EMBED SRC="'+path+'" PLUGINSPAGE="http://www.apple.com/quicktime/download" WIDTH="'+width+'" HEIGHT="'+height+'" AUTOPLAY="true" controller="true" loop="false"></EMBED>');
myWindow.document.write('        </OBJECT>');

myWindow.document.write("</body>");
myWindow.focus();
}
