function setFlashMovie() {
	
	//console.info('playerId : ' + elm.href.substring(elm.href.lastIndexOf('/') + 1 ) );
	var flashvars = {
		server: $('video-container').className,
		domain: "embed",
		autoStart: "true"
	};
	var params = {
		play: "true",
		wmode: "",
		allowfullscreen: "true",
		allowScriptAccess:"always"
	};
	var attributes = {
		id: "FlashSwfAddress"
		}

	swfobject.embedSWF('/officer/media/swf/ROCS_microsite.swf', 'video-container', '1000', '538', '9.0.0', 'media/swf/expressInstall.swf', flashvars, params,attributes);

}

function initAnchor() {
	var externalLinks = $('container').getElementsBySelector('a[rel~="external"]');
	var closeLinks = $('container').getElementsBySelector('a[rel~="close"]');
	
	externalLinks.each(function(item) {
		item.addClassName("external");
		item.target = "_blank";
		item.onclick=function(){
			s.linkType = "e";
			s.tl(item,s.linkType);
		}
	});
	
	closeLinks.each(function(item) {
		$(item).observe('click', function(evt){ Event.stop(evt); window.close();});
	});
}


function newPopup(url) {
	var newwmin = window.open(url,'newwmin','menubar=no, toolbar=no, location=no, scrollbars=yes,width=600,height=800,left='+(screen.width-600)/2+',top='+(screen.height-800)/2);
	newwmin.focus();
	return false;
}

Event.observe(window, 'load', function() { 
	if ($('video-container') ) {
		if(swfobject.getFlashPlayerVersion().major < 9){
			var link = document.createElement("a");
			link.href="http://www.adobe.com/go/getflash";
			link.target = "_blank";
			var img = document.createElement("img");
			img.src = "images/pic/noflash_ROCS_microsite.jpg";
			link.appendChild(img);
			$("video-container").appendChild(link);
		}else{
			setFlashMovie();
		}
 	}  
});

Event.observe(window, 'load', initAnchor);
Event.observe(window, 'load', initSaf);
