	/*
		Title: 		Booknow365 Flash Video Player
		Created: 	14  Feb, 2007
		By: 			David Rooney (david@booknow365.com)
		Version:	v1.0
		
		Usage: 	Pass in the hotels id to dynamically load the video tour of the hotel.
						Please note, the hotel id must be numeric and the .flv file must be
						located in the default folder. If no div tag id is set the player will just
						write the player to where ever the script was called.
						
		Example:	ShowPlayer('player', '1400');
	*/
	function ShowPlayer(div_id, id) {
		var div_tag = div_id;
		var hotelid = id;
		var name = 'video_player';
		var width = '230';
		var height = '175';
		var bg = '#ffffff';
		var scriptaccess = 'sameDomain';
		var playerurl = '/swf/video_player.swf'
		var player = '';
		
		if(hotelid) {
			player += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + name + '" align="middle">';
			player += '<param name="allowScriptAccess" value="' + scriptaccess + '" />';
			player += '<param name="movie" value="' + playerurl + '?hotelid=' + hotelid + '" />';
			player += '<param name="quality" value="high" />';
			player += '<param name="bgcolor" value="' + bg + '" />';
			player += '<embed src="' + playerurl + '?hotelid=' + hotelid + '" quality="high" bgcolor="' + bg + '" width="' + width + '" height="' + height + '" name="' + name + '" align="middle" allowScriptAccess="' + scriptaccess + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
			player += '</object><br/><span style="font-size: 11px; color: #cccccc; text-align: center;">Click the screen to pause, click again to play.</span>';
			
			if (div_tag) {
				document.getElementById(div_tag).innerHTML = player;
			} else {
				document.write(player);
			}
		}
	}
	
	function ShowPlayerNormal(div_id, id) {
		var div_tag = div_id;
		var hotelid = id;
		var name = 'video_player';
		var width = '480';
		var height = '285';
		var bg = '#ffffff';
		var proto = '';
		var scriptaccess = 'sameDomain';
		
		var playerurl = '/ireland/dublin-hotels/VideoPlayer_' + hotelid + '.swf';
		var player = '';
		var message = 'Sorry, the hotel you are currently viewing does not have a video tour at this time. Please come back later!';
		
		if(hotelid) {
			player += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + name + '" align="middle">';
			player += '<param name="allowScriptAccess" value="' + scriptaccess + '" />';
			player += '<param name="movie" value="' + playerurl + '" />';
			player += '<param name="quality" value="high" />';
			player += '<param name="bgcolor" value="' + bg + '" />';
			player += '<embed src="' + playerurl + '" quality="high" bgcolor="' + bg + '" width="' + width + '" height="' + height + '" name="' + name + '" align="middle" allowScriptAccess="' + scriptaccess + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
			player += '</object>';
			player += '<br/><span style="font-size: 11px; color: #cccccc; text-align: center;">Hotel Video Tours Provided by <a href="http://www.citycentrehotels.com" target="_parent">CityCentreHotels.com</a></span>';
			
			if (div_tag) {
				document.getElementById(div_tag).innerHTML = player;
			} else {
				document.write(player);
			}
		} else {
			if (div_tag) {
				document.getElementById(div_tag).innerHTML = message;
			} else {
				document.write(message);
			}	
		}
	}
	
	function ShowPlayerLarge(div_id, id) {
		var div_tag = div_id;
		var hotelid = id;
		var name = 'video_player';
		var width = '500';
		var height = '300';
		var bg = '#ffffff';
		var scriptaccess = 'sameDomain';
		var playerurl = '/swf/video_player_large.swf'
		var player = '';
		
		if(hotelid) {
			player += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + name + '" align="middle">';
			player += '<param name="allowScriptAccess" value="' + scriptaccess + '" />';
			player += '<param name="movie" value="' + playerurl + '?hotelid=' + hotelid + '" />';
			player += '<param name="quality" value="high" />';
			player += '<param name="bgcolor" value="' + bg + '" />';
			player += '<embed src="' + playerurl + '?hotelid=' + hotelid + '" quality="high" bgcolor="' + bg + '" width="' + width + '" height="' + height + '" name="' + name + '" align="middle" allowScriptAccess="' + scriptaccess + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
			player += '</object><br/><span style="font-size: 11px; color: #cccccc; text-align: center;">Click the screen to pause, click again to play.</span>';
			
			if (div_tag) {
				document.getElementById(div_tag).innerHTML = player;
			} else {
				document.write(player);
			}
		}
	}
