	function movieWrite() {
		Pro.QTTest();
		fullName = '';
		if (Pro.okQT == false) {
			document.write('<div class="movie" id="qtm"><a href="/es/quicktime/download/"><img src="http://images.apple.com/es/pro/images/quicktime7required20051118.jpg" border="0" width="640" height="360" alt="QuickTime 7 Required"><\/a><\/div>');
		} else {
			document.write('<div class="movie" id="qtm"><object classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="640" height="360" id="pm"><param name="cache" value="true"><param name="src" value="http://images.apple.com/movies/euro/uk/pro/movies/guygowan_640X360-1.mov"><param name="autoplay" value="false"><param name="controller" value="false"><param name="enablejavascript" value="true"><embed width="640" height="360" pluginspage="/es/quicktime/download/" src="http://images.apple.com/movies/euro/uk/pro/movies/guygowan_640X360-1.mov" type="video/quicktime" controller="false" autoplay="false" cache="true" name="pm" enablejavascript="true"><\/object><\/div>');
			document.write('<div id="transport"><a href="#" id="btnPlay">&nbsp;<\/a><a href="#" id="btnPause">&nbsp;<\/a><div id="timeline"><div id="position"><div id="handle"><img src="http://images.apple.com/es/pro/images/indexqtpointer20051020.gif" alt="pointer" width="11" height="16" border="0"><\/div><\/div><\/div>');
			document.write('<p id="profileName">'+fullName+'<\/p><\/div><\/div>');
		}
	}
	
/**************************************************
 * dom-drag
 * 09.25.2001
 * www.youngpup.net
 **************************************************
 * 10.28.2001 - fixed minor bug where events
 * sometimes fired off the handle, not the root.
 **************************************************/

var Drag = {

	obj : null,

	init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
	{
		o.onmousedown	= Drag.start;

		o.hmode			= bSwapHorzRef ? false : true ;
		o.vmode			= bSwapVertRef ? false : true ;

		o.root = oRoot && oRoot != null ? oRoot : o ;

		if (o.hmode  && isNaN(parseInt(o.root.style.left  ))) o.root.style.left   = "0px";
		if (o.vmode  && isNaN(parseInt(o.root.style.top   ))) o.root.style.top    = "-7px";
		if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right  = "0px";
		if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";

		o.minX	= typeof minX != 'undefined' ? minX : null;
		o.minY	= typeof minY != 'undefined' ? minY : null;
		o.maxX	= typeof maxX != 'undefined' ? maxX : null;
		o.maxY	= typeof maxY != 'undefined' ? maxY : null;

		o.xMapper = fXMapper ? fXMapper : null;
		o.yMapper = fYMapper ? fYMapper : null;

		o.root.onDragStart	= new Function();
		o.root.onDragEnd	= new Function();
		o.root.onDrag		= new Function();
	},

	start : function(e)
	{
		clearTimeout(Pro.timer1);
		var o = Drag.obj = this;
		e = Drag.fixE(e);
		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
		o.root.onDragStart(x, y);

		o.lastMouseX	= e.clientX;
		o.lastMouseY	= e.clientY;

		if (o.hmode) {
			if (o.minX != null)	o.minMouseX	= e.clientX - x + o.minX;
			if (o.maxX != null)	o.maxMouseX	= o.minMouseX + o.maxX - o.minX;
		} else {
			if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
			if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
		}

		if (o.vmode) {
			if (o.minY != null)	o.minMouseY	= e.clientY - y + o.minY;
			if (o.maxY != null)	o.maxMouseY	= o.minMouseY + o.maxY - o.minY;
		} else {
			if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
			if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
		}

		document.onmousemove	= Drag.drag;
		document.onmouseup		= Drag.end;

		return false;
	},

	drag : function(e)
	{
		e = Drag.fixE(e);
		var o = Drag.obj;

		var ey	= e.clientY;
		var ex	= e.clientX;
		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
		var nx, ny;

		if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
		if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
		if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
		if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);

		nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
		ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));

		if (o.xMapper)		nx = o.xMapper(y)
		else if (o.yMapper)	ny = o.yMapper(x)

		Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
		//Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
		Drag.obj.root.style[o.vmode ? "top" : "bottom"] = -7 + "px";
		Drag.obj.lastMouseX	= ex;
		Drag.obj.lastMouseY	= ey;
		
		$('position').style.width = nx+5+"px";
		//Pro.QTMovie.obj.SetTime(((parseInt($('handle').style.left.split('px')[0])+5)/650)*Pro.QTMovie.timeEnd); // nat
		Pro.QTMovie.obj.SetTime(((parseInt($('handle').style.left.split('px')[0])+5)/570)*Pro.QTMovie.timeEnd); 
		Pro.Pause();
		
		Drag.obj.root.onDrag(nx, ny);
		return false;
	},

	end : function()
	{
		document.onmousemove = null;
		document.onmouseup   = null;
		Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
		Drag.obj = null;
		Pro.ProcessDrag();
		Pro.Play();
	},

	fixE : function(e)
	{
		if (typeof e == 'undefined') e = window.event;
		if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
		if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
		return e;
	}
};








/**************************************************
 * quicktime
 * 09.25.2001
 * www.youngpup.net
 **************************************************
 * 10.28.2001 - fixed minor bug where events
 * sometimes fired off the handle, not the root.
 **************************************************/

var Pro = {
	hasQT: false,
	okQT: false,
	okBR: true,
	QTMovie: {
		timeNow: 0,
		timeEnd: 0,
		obj: null,
		isPlaying: false
	},
	interval: 50,
	tryCount: 0,
	timer1: null, 
	timer2: null,
	timer3: null,
	sliderPosition: 0,
	Init: function() {
		var n = Pro;
		n.QTTest();	
		var oakland = $('content').getElementsByTagName('a');
		for (i=0; i<oakland.length; i++) { addEventToObject(oakland[i],'onclick',Pro.Swap); }
		n.btnPlay = ($('btnPlay')) ? new _btnPlay($('btnPlay')) : false;
		n.btnPause = ($('btnPause')) ? new _btnPause($('btnPause')) : false;
		n.handle = $('handle');
		//Drag.init(Pro.handle, null, 0, 650, 0, 0);
		Drag.init(Pro.handle, null, 0, 570, 0, 0); // nat
		n.ffx = function() {
			var n = Pro;
				//n.QTMovie.obj = document['pm']; //: $('pme'); //firefox sees embed
				//if (navigator.userAgent.toLowerCase().indexOf('safari')>0) {n.QTMovie.obj = $('pm');}
				
				//alert($('pm'));
				try
				{ 
					var o = document.getElementById("pm"); 
					o.GetPluginStatus(); 
					n.QTMovie.obj = o; 
				}
				catch(e)
				{ 
					try 
					{ 
						var o = document.getElementById("pme"); 
						o.GetPluginStatus(); 
						n.QTMovie.obj = o; 
					}
					catch(e)
					{
						try 
						{ 
							var o = document['pm']
							o.GetPluginStatus(); 
							n.QTMovie.obj = o; 
						}
						catch(e)
						{
							n.QTMovie.obj = null;
						}
					}
				}
				//$('debug').innerHTML += 'n.QTMovie.obj.GetPluginStatus = ' + n.QTMovie.obj.GetPluginStatus.toString()+'<br>';
				//$('debug').innerHTML += n.QTMovie.obj.GetPluginStatus().toLowerCase()+'<br>';
				if ((n.QTMovie.obj != null) && (n.QTMovie.obj.GetPluginStatus().toLowerCase() == "playable" 
					|| n.QTMovie.obj.GetPluginStatus().toLowerCase() == "complete"))
				{
					$('debug').innerHTML += 'passed. n.QTMovie.obj = '+n.QTMovie.obj+'<br>';
					clearTimeout(n.timer3);
					setTimeout('Pro.Play();',1000);
					return;
				}
			n.timer3 = setTimeout("Pro.ffx();",700);
		}
		n.timer3 = setTimeout("Pro.ffx();",700);
	},
	Play: function() {
		var n = Pro;
		n.QTMovie.isPlaying = true;
		n.GetQTPosition();
		n.GetQTInfo();
		n.GetQTPosition();
		n.SetSliderPosition();
		try {n.QTMovie.obj.Play();}
		catch (err) {n.okQT = n.okBR = false;}
		return false;
	},
	Pause: function() {
		var n = Pro;
		clearTimeout(n.timer1);
		clearTimeout(n.timer2);
		try {n.QTMovie.obj.Stop();}
		catch (err) {n.okQT = n.okBR = false;}
		n.QTMovie.isPlaying = false;
		n.GetQTPosition();
		n.SetSliderPosition();
		return false;
	},
	GetQTInfo: function() {var n = Pro; n.QTMovie.timeEnd = n.QTMovie.obj.GetDuration();},
	GetQTPosition: function() {
		var n = Pro;
		n.QTMovie.timeNow = n.QTMovie.obj.GetTime();
		if(n.QTMovie.isPlaying) {n.timer2 = setTimeout(Pro.GetQTPosition,Pro.interval);};
	},
	SetSliderPosition: function() {
		var n = Pro;
		//n.sliderPosition = Math.round((n.QTMovie.timeNow/n.QTMovie.timeEnd)*650); // nat
		n.sliderPosition = Math.round((n.QTMovie.timeNow/n.QTMovie.timeEnd)*570);
		$('position').style.width = n.sliderPosition+"px";
		Pro.handle.style.left = n.sliderPosition-5+"px";
		if(n.QTMovie.isPlaying) {n.timer1 = setTimeout(Pro.SetSliderPosition,Pro.interval);};
	},
	ProcessDrag: function() {
		var n = Pro;
		clearTimeout(n.timer1);
		// n.QTMovie.obj.SetTime(((parseInt($('handle').style.left.split('px')[0])+5)/650)*n.QTMovie.timeEnd);	//nat
		n.QTMovie.obj.SetTime(((parseInt($('handle').style.left.split('px')[0])+5)/570)*n.QTMovie.timeEnd);	
		n.SetSliderPosition();
	},
	QTTest: function() {
		var n = Pro;
		n.hasQT = false;
		if(navigator.plugins && navigator.plugins.length) {
			for (var i=0;i<navigator.plugins.length;i++) {
				if(navigator.plugins[i].name.indexOf('QuickTime') >= 0) {
					n.hasQT = true;
					//$('debug').innerHTML += 'n.hasQT = ' + n.hasQT+'<br>';
					n.okQT = (parseInt(navigator.plugins[i].name.substring(18))<7)?false:true;
					//$('debug').innerHTML += 'n.okQT = ' + n.okQT+'<br>';
				}
			}
		} else {
			execScript('on error resume next: Pro.hasQT = IsObject(CreateObject("QuickTimeCheckObject.QuickTimeCheck.1"))','VBScript');
			execScript('on error resume next: Pro.okQT = Hex(CreateObject("QuickTimeCheckObject.QuickTimeCheck.1").QuickTimeVersion)/1000000','VBScript');
			n.okQT = (n.okQT<7)?false:true;
		}
	},
	Swap: function(ev) {
		var n = Pro;
		if (!ev) ev = window.event;
		var clickedLink = (window.event) ? window.event.srcElement : ev.target;
		while (!clickedLink.tagName || clickedLink.tagName.toLowerCase() != "a") clickedLink = clickedLink.parentNode;
		var loc = document.location+"";
		var workingStr = "http://images.apple.com/movies/us/apple/creative_pro/apple-creative_pro-"+clickedLink.getAttribute('target')+"_720x416.mov";
		n.QTMovie.obj.SetURL(workingStr);
		n.QTMovie.obj.SetControllerVisible(false);
		n.ffx();
		if ($('profileName')) $('profileName').innerHTML = clickedLink.title;
		(ev.stopPropagation) ? ev.stopPropagation() : ev.cancelBubble = true;
		(ev.preventDefault) ? ev.preventDefault() : ev.returnValue = false;
		return false;
	}
}
function _btnPlay(obj) {
	addEventToObject(obj,'onmousedown',function(){obj.style.backgroundPosition="left -29px"})
	addEventToObject(obj,'onmouseup',function(){obj.style.backgroundPosition="left 0px"})
	addEventToObject(obj,'onclick',Pro.Play)
}
function _btnPause(obj) {
	addEventToObject(obj,'onmousedown',function(){obj.style.backgroundPosition="left -29px"})
	addEventToObject(obj,'onmouseup',function(){obj.style.backgroundPosition="left 0px"})
	addEventToObject(obj,'onclick',Pro.Pause)
}
function CurrentStyle(el,prop) {
	var viewCSS = (typeof document.defaultView=='function') ? document.defaultView() : document.defaultView;
	if (viewCSS && viewCSS.getComputedStyle){
		var s = viewCSS.getComputedStyle(el,null);
		return s && s.getPropertyValue(prop);
	}
	return el.currentStyle && (el.currentStyle[prop] || null) || null;
}
function getStyle(el,styleProp)
{
	var x = document.getElementById(el);
	if (x.currentStyle) var y = x.currentStyle[styleProp];
	else if (window.getComputedStyle) var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
  return y;
}
