/*******************************************************************//***( image gallery )**********************************************//*******************************************************************/var ImageGallery = {	curStep: 1,	steps: new Array(),	init: function() {		var gallerynavlinks = $('gallery_nav').getElementsByTagName('a');		for(var i=0, link; link = gallerynavlinks[i]; i++) {			var self = this;			addEventToObject(link,'onclick',function(ev) {self.swap(ev)});		}	},	swap: function(ev) {		this.steps = $('gallery_nav').getElementsByTagName('li');		this.stepsA = $('gallery_nav').getElementsByTagName('a');		if (getClickedLink(ev).id.split('_')[1]) {			var num = getClickedLink(ev).id.split('_')[1];		} else {			for (var i=0; i < this.steps.length; i++) {				if ( this.stepsA[i] == getClickedLink(ev) ) {					var num = i+1;				}			}		}		if (num != this.curStep) {			elem = $("gallery" + num);			prevElem = $("gallery" + this.curStep);			elem.style.display = "block";			prevElem.style.display = "none";			this.steps[this.curStep-1].className = "";			this.steps[num-1].className = "active";			this.curStep = num;			GalleryPro.Swap(ev);		}			}}/***( old image gallery )**********************************************/var curStep = 1;var steps = new Array();function imagegallery(num) {steps = document.getElementById("gallery_nav").getElementsByTagName("li");	if (num != curStep) {		elem = document.getElementById("gallery" + num);		prevElem = document.getElementById("gallery" + curStep);		elem.style.display = "block";		prevElem.style.display = "none";		steps[curStep-1].className = "";		steps[num-1].className = "active";		curStep = num;	}}/*******************************************************************//***( drawer gallery )**********************************************//*******************************************************************//***( visual effects )**********************************************/var oDiv = document.createElement('div');var oA = document.createElement('a');var oP = document.createElement('p');var oImg = document.createElement('img');var oSpan = document.createElement('span');var oUl = document.createElement('ul');var oLi = document.createElement('li');var oH5 = document.createElement('h5');var movement;var myGalleryObj;function InitializeGalleryXML(url,galleryDiv) {	AppleJAX.getXML(url,function() {		myGalleryObj = new GalleryObj(galleryDiv,results);		myGalleryObj.displayHTML();	});	return true;}GalleryObj = function(galleryDiv,results) {	this.galleryStr = galleryDiv;	this.results = results;	this.glryX = this.results.getElementsByTagName('gallery')[0];	this.glryitmsX = this.glryX.getElementsByTagName('galleryitems')[0];	this.glryimgsX = new Array();	this.glrycntntH = document.getElementById(galleryDiv);	this.glryrlH = oDiv.cloneNode(true);	this.glryimgglrynavH = oDiv.cloneNode(true);	this.glrylftopacH = oDiv.cloneNode(true);	this.glryrghtopacH = oDiv.cloneNode(true);	this.glrymvingglryH = oDiv.cloneNode(true);	this.glryspd = 4;	this.thumbsacrs = 4;	this.thumbwdth =    110; // 87; 	this.thumbhght = 110; // 66; 	this.thumbpding = 10;	this.thumbalt = 'Product Thumbnail';	this.glrywdth = 580; // 665; // nat	this.txtclr = '#666';	this.thumbfntsz = 10;	this.thumbnavwdth = ((this.thumbwdth+(this.thumbpding*2))*this.thumbsacrs);	this.glryH = new HTMLObject(oDiv.cloneNode(true));	Object.extend(this.glryH,WhizBang.prototype);	this.mvspd = parseFloat((this.thumbwdth+(this.thumbpding*2))/this.glryspd);	this.glrynavprevH = oA.cloneNode(true);	this.glrynavprevimgH = oImg.cloneNode(true);	this.glrynavnextH = oA.cloneNode(true);	this.glrynavnextimgH = oImg.cloneNode(true);	this.glrynavH = oDiv.cloneNode(true);	this.glrypgnavH = oDiv.cloneNode(true);	this.glrymtncontH = oDiv.cloneNode(true);	this.glrylstcntnrH = oDiv.cloneNode(true);	this.glrylstH = oUl.cloneNode(true);	this.rlclr;	this.thumbnavhght;	this.thumbnmstgl = false;	this.flszimgtgl = false;	this.reqattrs = new Array();	this.thumbnum = 0;	this.glryh4H;	this.currglryimg = 0;	this.currbgningthumb = 0;	this.nextbgningthumblft = false;	this.mvingthumblft = [];	this.mvingthumbs = [];	this.thumbimgs = [];	this.flszimgs = [];	this.errmsg = '';	this.onimage = 'http://images.apple.com/pro/images/colored_dot20060413.gif';	this.offimage = 'http://images.apple.com/pro/images/empty_dot20060413.gif';	this.onoffimageheight = 7;	this.onoffimagewidth = 7;	this.nextarrow = 'http://images.apple.com/pro/images/arrow_right20060413.gif';	this.prevarrow = 'http://images.apple.com/pro/images/arrow_left20060413.gif';	this.nextarrowheight = 17;	this.nextarrowwidth = 17;	this.prevarrowheight = 17;	this.prevarrowwidth = 17;	this.oFullSzImg = oImg.cloneNode(true);	this.oDateH5 = oH5.cloneNode(true);	this.oDescriptionP = oP.cloneNode(true);};/*************************** gallery movement ***************************/function moveRight(obj,nextBeginningThumbnail) {	obj.thumbnum = nextBeginningThumbnail;	obj.displayThumbnailsHTML('right');		var scroll = true;	movement = function() {		for(i=0;i<obj.mvingthumbs.length;i++) {			obj.mvingthumblft[i] += obj.mvspd;			if(isFinite(obj.mvingthumblft[i])) {				obj.mvingthumbs[i].style.left =					obj.mvingthumblft[i] + 'px';			}		}		if(obj.mvingthumblft[obj.thumbsacrs] == 0) {scroll = false;}		var moveTimeout;		if(scroll == true) {moveTimeout = window.setTimeout('movement();',10);}		else {clearTimeout(moveTimeout); return true;}		obj.currbgningthumb = nextBeginningThumbnail;	};		movement();	obj.displayPageNavHTML();	};function moveLeft(obj,nextBeginningThumbnail) {	obj.thumbnum = nextBeginningThumbnail;	obj.displayThumbnailsHTML('left');		var scroll = true;	movement = function() {		for(i=obj.mvingthumbs.length-1;i>=0;i--) {			obj.mvingthumblft[i] -= obj.mvspd;			if(isFinite(obj.mvingthumblft[i])) {				obj.mvingthumbs[i].style.left =					obj.mvingthumblft[i] + 'px';			}		}		if(obj.mvingthumblft[obj.thumbsacrs] == 0) {scroll = false;}		var moveTimeout;		if(scroll == true) {moveTimeout = window.setTimeout('movement();',10);}		else {clearTimeout(moveTimeout); return true;}		obj.currbgningthumb = nextBeginningThumbnail;	};		movement();	obj.displayPageNavHTML();}/*************************** process functions ***************************/function processMovingGalleryNavItem(obj,ev) {	if(!ev) {ev = window.event;}	if (ev.stopPropagation) { ev.stopPropagation(); } else { ev.cancelBubble = true; }	if (ev.preventDefault) { ev.preventDefault(); } else { ev.returnValue = false; }	var clickedLink = (window.event) ? window.event.srcElement : ev.target;	while (!clickedLink.tagName || clickedLink.tagName.toLowerCase() != "a") {		clickedLink = clickedLink.parentNode;	}	if(clickedLink === obj.glrynavprevH) {		var nextBeginningThumbnail = (obj.currbgningthumb > 0) ?			obj.currbgningthumb - obj.thumbsacrs :			obj.glryimgsX.length - obj.thumbsacrs;		moveRight(obj,nextBeginningThumbnail);	}	else if(clickedLink === obj.glrynavnextH) {		var nextBeginningThumbnail =			((obj.currbgningthumb + obj.thumbsacrs) <			obj.glryimgsX.length) ?			obj.currbgningthumb + obj.thumbsacrs : 0 ;		moveLeft(obj,nextBeginningThumbnail);	}	else {		var clickedNum = parseInt(clickedLink.id.split('_')[1]);		if(clickedNum < obj.currbgningthumb) {			moveRight(obj,clickedNum);		}		else if(clickedNum > obj.currbgningthumb) {			moveLeft(obj,clickedNum);		}	}		return false;}GalleryObj.prototype.processGalleryImageItem = function(ev) {	if (!ev) { ev = window.event; }	var clickedLink = (window.event) ? window.event.srcElement : ev.target;	while (!clickedLink.tagName || clickedLink.tagName.toLowerCase() != "a") {		clickedLink = clickedLink.parentNode;	}	myGalleryObj.currglryimg = clickedLink.parentNode.id.split('_')[1];	if (ev.stopPropagation) { ev.stopPropagation(); } else { ev.cancelBubble = true; }	if (ev.preventDefault) { ev.preventDefault(); } else { ev.returnValue = false; }	return false;};/*************************** alternate to display HTML ***************************/GalleryObj.prototype.displaySmallGallery = function(self) {	self.glryimgsXcntnt = self.glryX.getElementsByTagName('galleryimage');	var iGalleryWidth = self.glrycntntH.offsetWidth;	for(var i=0; i<self.glryimgsXcntnt.length; i++) {		var oItem = self.glryimgsXcntnt[i];		var sName = (oItem.getElementsByTagName('name')[0].hasChildNodes()) ? oItem.getElementsByTagName('name')[0].firstChild.data : '';		var sDate = (oItem.getElementsByTagName('date')[0].hasChildNodes()) ? oItem.getElementsByTagName('date')[0].firstChild.data : '';		if(iGalleryWidth > 570 && sDate.length > 0) { sDate += ' / '; }		var sDescription = (oItem.getElementsByTagName('description')[0].hasChildNodes()) ? oItem.getElementsByTagName('description')[0].firstChild.data : '';		self.glryimgsX[self.glryimgsX.length] = {			obj: oItem,			href:oItem.getAttribute('href'),			thumbnail:oItem.getElementsByTagName('thumbnail')[0].firstChild.data,			fullsize:oItem.getElementsByTagName('fullsize')[0].firstChild.data,			alt:oItem.getAttribute('alt'),			name:sName,			date:sDate,			description:sDescription		};	}			self.thumbalt = 'Image Thumbnail';	self.onimage = '/pro/creative/images/onnavdot20060420.gif';	self.offimage = '/pro/creative/images/offnavdot20060420.gif';	self.onoffimageheight = 9;	self.onoffimagewidth = 9;	self.nextarrow = '/pro/creative/images/rightgalleryarrow20060420.gif';	self.prevarrow = '/pro/creative/images/leftgalleryarrow20060420.gif';	self.nextarrowheight = 14;	self.nextarrowwidth = 12;	self.prevarrowheight = 14;	self.prevarrowwidth = 12;	self.smallglry = true;		if(iGalleryWidth < 570) {		self.thumbsacrs = 6;		self.thumbpding = 5;		self.thumbwdth = 41;		self.thumbhght = 40;		self.glrywdth = 370;		self.thumbnavwdth = ((self.thumbwdth+(self.thumbpding*2))*self.thumbsacrs);		self.mvspd = parseFloat((self.thumbwdth+(self.thumbpding*2))/self.glryspd);		self.smallglryimgheight = 178;		self.smallglryimgwidth = 300;		if(self.glryimgsX.length > 1) { self.displayHTML(); }		self.displaySmallGalleryImg();	} else {		self.thumbsacrs = 7;		self.thumbpding = 10;		self.thumbwdth = 55;		self.thumbhght = 55;		self.glrywdth = 572;		self.thumbnavwdth = ((self.thumbwdth+(self.thumbpding*2))*self.thumbsacrs);		self.mvspd = parseFloat((self.thumbwdth+(self.thumbpding*2))/self.glryspd);		self.smallglryimgheight = 183;		self.smallglryimgwidth = 260;				if(self.glryimgsX.length > 1) { self.displayHTML(); }		self.displayWideGalleryImg();	}};GalleryObj.prototype.displayWideGalleryImg = function() {	var oGlryImgX = this.glryimgsX[0];	this.oFullSzImg.src = oGlryImgX.fullsize;	this.oFullSzImg.alt = oGlryImgX.alt;	this.oDateH5.appendChild(document.createTextNode(oGlryImgX.date));	this.oDescriptionP.appendChild(document.createTextNode(oGlryImgX.description));	var oDateDescDiv = oDiv.cloneNode(true);		this.oFullSzImg.style.width = this.smallglryimgwidth+'px';	this.oFullSzImg.style.height = this.smallglryimgheight+'px';	this.oFullSzImg.style.margin = '0 15px 0 33px';	if(browser.isIE == true) {		this.oFullSzImg.style.styleFloat = 'left';	} else {		this.oFullSzImg.style.cssFloat = 'left';	}	oDateDescDiv.style.margin = '0 33px 0 0';	this.oDateH5.style.margin = '0';	this.oDateH5.style.color = '#666666';	this.oDateH5.style.fontSize = '11px';	this.oDateH5.style.display = 'inline';	this.oDescriptionP.style.margin = '0';	this.oDescriptionP.style.padding = '0';	this.oDescriptionP.style.color = '#999999';	this.oDescriptionP.style.fontSize = '10px';	this.oDescriptionP.style.display = 'inline';		oDateDescDiv.appendChild(this.oDateH5);	oDateDescDiv.appendChild(this.oDescriptionP);	this.glrycntntH.appendChild(this.oFullSzImg);	this.glrycntntH.appendChild(oDateDescDiv);};GalleryObj.prototype.displaySmallGalleryImg = function() {	var oGlryImgX = this.glryimgsX[0];	this.oFullSzImg.src = oGlryImgX.fullsize;	this.oFullSzImg.alt = oGlryImgX.alt;	this.oDateH5.appendChild(document.createTextNode(oGlryImgX.date));	this.oDescriptionP.appendChild(document.createTextNode(oGlryImgX.description));	this.oFullSzImg.style.width = this.smallglryimgwidth+'px';	this.oFullSzImg.style.height = this.smallglryimgheight+'px';	this.oFullSzImg.style.margin = '0 35px';	this.oDateH5.style.width = this.smallglryimgwidth+'px';	this.oDateH5.style.margin = '5px 35px';	this.oDateH5.style.color = '#666666';	this.oDateH5.style.fontSize = '11px';	this.oDescriptionP.style.width = this.smallglryimgwidth+'px';	this.oDescriptionP.style.margin = '0 35px';	this.oDescriptionP.style.color = '#999999';	this.oDescriptionP.style.fontSize = '10px';		this.glrycntntH.appendChild(this.oFullSzImg);	this.glrycntntH.appendChild(this.oDateH5);	this.glrycntntH.appendChild(this.oDescriptionP);};GalleryObj.prototype.processSmallGalleryFSImg = function(obj,ev) {	stopDefaultAction(ev);	var oClickedLink = getClickedLink(ev);	var iImgNum = oClickedLink.parentNode.id.split('_')[1];	var oGlryImgX = obj.glryimgsX[iImgNum];		obj.oFullSzImg.src = oGlryImgX.fullsize;	obj.oFullSzImg.alt = oGlryImgX.alt;	obj.oDateH5.innerHTML = oGlryImgX.date;	obj.oDescriptionP.innerHTML = oGlryImgX.description;};GalleryObj.prototype.getGalleryImages = function(self,func) {	self.thumbnmstgl = true;	if(self.glryimgsX.length <= 0 && self.glryX.getElementsByTagName('galleryitems').length > 0) {		if(self.glryitmsX.getAttribute('fromurl')) {			var xmlfile = self.glryitmsX.getAttribute('fromurl');						var images = new Array();			AppleJAX.getXML(xmlfile,function(){				var category;				var results = req.responseXML;				//if(self.glryitmsX.getAttribute('fromelement')) {				//	category = results.getElementsByTagName(self.glryitmsX.getAttribute('fromelement'))[0];				//}				category = results;				var items = self.glryitmsX.getElementsByTagName('item');				for(var i=0;i<items.length;i++) {					var item = items[i].firstChild.data;					var oItem = category.getElementsByTagName(item)[0].getElementsByTagName('galleryimage')[0];					self.glryimgsX[i] = {						obj:oItem,						href:oItem.getAttribute('href'),						thumbnail:oItem.getElementsByTagName('thumbnail')[0].firstChild.data,						alt:oItem.getAttribute('alt'),						name:oItem.getElementsByTagName('name')[0].firstChild.data,						learnmore:oItem.getAttribute('learnmore'),						buynow:oItem.getAttribute('buynow')					};				}				self.displayHTML();				if(func) {func();}			});		}	} else {		self.displayHTML();		if(func) {func();}	}};GalleryObj.prototype.setGalleryList = function(self) {	self.glrywdth = self.glrywdth-170;		self.glrylstcntnrH.style.width = '170px';	self.glrylstH.style.width = '170px';		for(var i=0;i<self.glryimgsX.length;i++) {		var listitem = oLi.cloneNode(true);		listitem.appendChild(document.createTextNode(self.glryimgsX[i].name));		listitem.style.listStyle = 'disc inside';		self.glrylstH.appendChild(listitem);	}	self.glrylstcntnrH.style.position = 'absolute';	self.glrylstcntnrH.style.top = '10px';	self.glrylstcntnrH.style.left = '10px';	self.glrycntntH.style.position = 'absolute';	self.glrycntntH.style.top = '10px';	self.glrycntntH.style.left = '180px';	self.glrylstcntnrH.appendChild(self.glrylstH);	var containerDiv = self.glrycntntH.parentNode;	containerDiv.insertBefore(self.glrylstcntnrH,self.glrycntntH);		self.displayHTML();	var glrylstcntnrheight = self.glrylstcntnrH.offsetHeight;	var drawerheight = 184;	var glrylstcntnrtop = (drawerheight-glrylstcntnrheight)/2;	self.glrylstcntnrH.style.top = glrylstcntnrtop+'px';	var glryheight = self.glrycntntH.offsetHeight;	var glrytop = (drawerheight-glryheight)/2;	self.glrycntntH.style.top = glrytop+'px';};/*************************** display HTML ***************************/GalleryObj.prototype.displayHTML = function() {	this.pgs = parseInt(this.glryimgsX.length/this.thumbsacrs);		if(this.glryimgsX.length <= 0) {		this.errmsg += 'What are you thinking? A gallery with no images? That won\'t work! ';	}	var requiredattributeerrors = '';	for(i=0;i<this.reqattrs.length;i++) {		if(!(this.glryX.getAttribute(this.reqattrs[i]))) {			if(i == (this.reqattrs.length-1)) {				requiredattributeerrors += 'and ' + this.reqattrs[i];			} else {				requiredattributeerrors += this.reqattrs[i] + ', ';			}		}	}	if(requiredattributeerrors.length > 0) {		this.errmsg += 'You need to add attributes to the gallery tag.  Please add: ' +			requiredattributeerrors + '. ';	}		if(this.glryX.getAttribute('rulecolor')) { //should be hasAttribute but doesn't work in IE		this.rlclr = this.glryX.getAttribute('rulecolor');	}	if(this.glryX.getAttribute('thumbnailnavheight')) { //should be hasAttribute		this.thumbnavhght = parseInt(this.glryX.getAttribute('thumbnailnavheight'));	} else {		this.thumbnavhght = this.thumbhght+60+this.onoffimageheight;	}	var remainder = (this.glryimgsX.length%this.thumbsacrs);	if(remainder > 0) {		this.errmsg += 'You have an incorrect number of gallery images.  ' +			'Please check your XML file. ' + this.glryimgsX.length +			' gallery images and ' + this.thumbsacrs + ' thumbnails across. You need ' +			(this.thumbsacrs-parseInt(remainder)) + ' more or ' + remainder + ' less. ';	}	this.glryH.setAttribute('id',this.galleryStr+'gallery');	this.glryrlH.setAttribute('id',this.galleryStr+'galleryrule');	this.glryimgglrynavH.setAttribute('id',this.galleryStr+'imagegallerynav');	this.glrypgnavH.setAttribute('id',this.galleryStr+'pagenav');	this.glrymtncontH.setAttribute('id',this.galleryStr+'motioncontainer');	this.glrylftopacH.setAttribute('id',this.galleryStr+'leftopacity');	this.glryrghtopacH.setAttribute('id',this.galleryStr+'rightopacity');	this.glrymvingglryH.setAttribute('id',this.galleryStr+'movinggallery');		var gallerynavtoggle = false;	if(this.glryimgsX.length > this.thumbsacrs) {		gallerynavtoggle = this.displayPrevNextNavHTML();		this.displayPageNavHTML();	}	this.displayOpacityHTML();		this.glrymtncontH.appendChild(this.glrymvingglryH);	this.glryimgglrynavH.appendChild(this.glrypgnavH);	this.glryimgglrynavH.appendChild(this.glrymtncontH);		var moveSpeedString = this.mvspd.toString();	var moveSpeedDecimal = this.mvspd.toString().split('.')[1];	if(moveSpeedDecimal && moveSpeedDecimal.length >= 10) {		this.errmsg += 'Watch your speed! Your speed will not work ' +			'in this scenario. Your current speed is ' + this.glryspd +			' and your image width with padding is ' +			(this.thumbwdth+(this.thumbpding*2)) +			'. This results in an actual speed of ' + this.mvspd +			', which may be a repeating decimal. ';	}		if(this.errmsg.length > 0) {		var errorText = document.createTextNode(this.errmsg);		this.glrycntntH.appendChild(errorText);	} else {		this.preloadImages();		this.displayThumbnailsHTML();		this.styleHTML();		if(this.flszimgtgl) {			this.glrycntntH.appendChild(this.glryH);			this.glrycntntH.appendChild(this.glryrlH);		}		if(gallerynavtoggle) {this.glrycntntH.appendChild(this.glrynavH);}		this.glrycntntH.appendChild(this.glryimgglrynavH);	}};GalleryObj.prototype.preloadImages = function() {	for(i=0;i<this.glryimgsX.length;i++) {		if(this.glryimgsX[i].length > 0 && this.glryimgsX[i].thumbnail) {			this.thumbimgs[i] = new Image();			this.thumbimgs[i].src = this.glryimgsX[i].thumbnail;		}	}};GalleryObj.prototype.styleHTML = function() {	this.glrycntntH.style.width = this.glrywdth + 'px';	if(!this.smallglry) {		this.glrycntntH.style.cssFloat = 'left';	}	this.glryrlH.style.width = this.glrywdth + 'px';	if(this.rlclr) {		this.glryrlH.style.borderTop = '1px solid ' + this.rlclr;	}		this.glrypgnavH.style.width = this.glrywdth + 'px';	this.glrypgnavH.style.textAlign = 'center';	this.glrypgnavH.style.margin = '0 0 10px 0';		this.glrymtncontH.style.width = this.thumbnavwdth + 'px';	this.glrymtncontH.style.height = this.thumbnavhght + 'px';	this.glrymtncontH.style.margin = '0 ' + (this.glrywdth-this.thumbnavwdth)/2 + 'px'; 	this.glrymtncontH.style.padding = '0';	this.glrymtncontH.style.overflow = 'hidden';	this.glrymtncontH.style.position = 'relative';		this.glrymvingglryH.style.width = this.thumbnavwdth + 'px';	this.glrymvingglryH.style.height = this.thumbnavhght + 'px';	this.glrymvingglryH.style.position = 'relative';};GalleryObj.prototype.displayOpacityHTML = function() {	if(this.glryX.getElementsByTagName('gallerysideopacity').length > 0) {		var gallerysideopacityXML = this.glryX.getElementsByTagName('gallerysideopacity')[0];		var galleryleftopacityXML = gallerysideopacityXML.getElementsByTagName('leftopacity')[0];		var galleryrightopacityXML = gallerysideopacityXML.getElementsByTagName('rightopacity')[0];		this.glrylftopacH.style.position = 'absolute';		this.glrylftopacH.style.left = '0px';		this.glrylftopacH.style.top = '0px';		this.glrylftopacH.style.height = this.thumbnavhght + 'px';		this.glrylftopacH.style.width = galleryleftopacityXML.getAttribute('width') + 'px';		this.glrylftopacH.style.background = 'url(' + galleryleftopacityXML.getAttribute('src') + ') repeat-y';		this.glrylftopacH.style.zIndex = '200';		this.glrylftopacH.style.behavior = 'url(/main/js/iepngfix/iepngfix.htc)';			this.glryrghtopacH.style.position = 'absolute';		this.glryrghtopacH.style.right = '0px';		this.glryrghtopacH.style.top = '0px';		this.glryrghtopacH.style.height = this.thumbnavhght + 'px';		this.glryrghtopacH.style.width = galleryrightopacityXML.getAttribute('width') + 'px';		this.glryrghtopacH.style.background = 'url(' + galleryrightopacityXML.getAttribute('src') + ') repeat-y';		this.glryrghtopacH.style.zIndex = '200';		this.glryrghtopacH.style.behavior = 'url(/main/js/iepngfix/iepngfix.htc)';			this.glrymtncontH.appendChild(this.glrylftopacH);		this.glrymtncontH.appendChild(this.glryrghtopacH);	}};GalleryObj.prototype.displayPageNavHTML = function() {		var pagenavonimg = oImg.cloneNode(true);		pagenavonimg.setAttribute('width',this.onoffimagewidth);		pagenavonimg.setAttribute('height',this.onoffimageheight);		pagenavonimg.setAttribute('border','0');		pagenavonimg.style.margin = '2px 4px 0pt'; // '0 2px'; // nat			while(this.glrypgnavH.hasChildNodes()) { this.glrypgnavH.removeChild(this.glrypgnavH.firstChild); }			for(i=0;i<this.pgs;i++) {			if(this.currbgningthumb == (i*this.thumbsacrs)) {					pagenavonimg.setAttribute('src',this.onimage);				this.glrypgnavH.appendChild(pagenavonimg);			}			else {				var pagenavoffa = oA.cloneNode(true);				var pagenavoffimg = pagenavonimg.cloneNode(true);						pagenavoffa.setAttribute('id',this.galleryStr+'pagenav_'+(this.thumbsacrs*i));								pagenavoffa.setAttribute('href','#');				pagenavoffimg.setAttribute('src',this.offimage);					pagenavoffa.appendChild(pagenavoffimg);				this.glrypgnavH.appendChild(pagenavoffa);				var myObj = this;				addEventToObject(pagenavoffa,'onclick',function(ev){processMovingGalleryNavItem(myObj,ev);});			}		}		return true;};GalleryObj.prototype.displayPrevNextNavHTML = function() {		this.glrynavH.setAttribute('id',this.galleryStr+'gallerynav');			this.glrynavprevH.setAttribute('href','#');		this.glrynavnextH.setAttribute('href','#');		this.glrynavprevH.setAttribute('id',this.galleryStr+'prevgallerynav');		this.glrynavnextH.setAttribute('id',this.galleryStr+'nextgallerynav');				this.glrynavprevimgH.setAttribute('src',this.prevarrow);		this.glrynavnextimgH.setAttribute('src',this.nextarrow);				this.glrynavprevimgH.setAttribute('width',this.prevarrowwidth);		this.glrynavnextimgH.setAttribute('width',this.nextarrowwidth);		this.glrynavprevimgH.setAttribute('height',this.prevarrowheight);		this.glrynavnextimgH.setAttribute('height',this.nextarrowheight);		this.glrynavprevimgH.setAttribute('border','0');		this.glrynavnextimgH.setAttribute('border','0');		this.glrynavprevimgH.setAttribute('alt','Previous');		this.glrynavnextimgH.setAttribute('alt','Next');				this.glrynavprevH.appendChild(this.glrynavprevimgH);		this.glrynavnextH.appendChild(this.glrynavnextimgH);				this.glrynavH.appendChild(this.glrynavprevH);		this.glrynavH.appendChild(this.glrynavnextH);			this.glrynavH.style.width = this.glrywdth + 'px';		this.glrynavH.style.position = 'relative';		this.glrynavprevH.style.position = 'absolute';		this.glrynavnextH.style.position = 'absolute';		if(this.glryX.getElementsByTagName('gallerypagenav')[0]) {			this.glrynavprevH.style.top = (((this.thumbnavhght-parseInt(this.prevarrowheight))/2)+parseInt(this.onoffimageheight)+((this.thmbnmstgl) ? 10 : 0)) + 'px';			this.glrynavnextH.style.top = (((this.thumbnavhght-parseInt(this.nextarrowheight))/2)+parseInt(this.onoffimageheight)+((this.thmbnmstgl) ? 10 : 0)) + 'px';		} else {			this.glrynavprevH.style.top = ((this.thumbnavhght-parseInt(this.prevarrowheight))/2) + 'px';			this.glrynavnextH.style.top = ((this.thumbnavhght-parseInt(this.nextarrowheight))/2) + 'px';		}		this.glrynavprevH.style.left = (((this.glrywdth-this.thumbnavwdth)/2)-(parseInt(this.prevarrowwidth)+10)) + 'px';		this.glrynavnextH.style.right = (((this.glrywdth-this.thumbnavwdth)/2)-(parseInt(this.nextarrowwidth)+10)) + 'px'; // '100px'; //  // nat test				this.glrynavprevH.style.zIndex = 100;		this.glrynavnextH.style.zIndex = 100;		var myObj = this;		addEventToObject(this.glrynavprevH,'onclick',function(ev){processMovingGalleryNavItem(myObj,ev);});		addEventToObject(this.glrynavnextH,'onclick',function(ev){processMovingGalleryNavItem(myObj,ev);});		return true;};GalleryObj.prototype.displayThumbnailsHTML = function(direction) {	for(i=0;i<this.glrymvingglryH.childNodes.length;i++) {		if((i < this.currbgningthumb) || (i > (this.currbgningthumb+this.thumbsacrs))) {			var childToRemove = document.getElementById(this.galleryStr+'imagenav_'+i);			if(childToRemove) {				this.glrymvingglryH.removeChild(childToRemove);			}		}	}	if(this.mvingthumbs.length > this.thumbsacrs) {		this.mvingthumbs.splice(0,this.thumbsacrs);		this.mvingthumblft.splice(0,this.thumbsacrs);	}	var endingThumbnail = (this.thumbnum+this.thumbsacrs);	var i = this.thumbsacrs;	var j = this.thumbsacrs;	for(this.thumbnum;this.thumbnum<endingThumbnail;this.thumbnum++) {				var galleryimagedivHTML = oDiv.cloneNode(true);		var galleryimageaHTML = oA.cloneNode(true);		var galleryimagetitleaHTML = oA.cloneNode(true);		var galleryimageimgHTML = oImg.cloneNode(true);		var galleryimagespanHTML = oSpan.cloneNode(true);		var galleryimagelearnmoreimgHTML = oImg.cloneNode(true);		var galleryimagebuynowimgHTML = oImg.cloneNode(true);		var galleryimagelearnmoreaHTML = oA.cloneNode(true);		var galleryimagebuynowaHTML = oA.cloneNode(true);		var galleryimagelearnmorespanHTML = oSpan.cloneNode(true);		var galleryimagebuynowspanHTML = oSpan.cloneNode(true);		var buttonHeight = '17px';		var buttonWidth = '86px';				galleryimagedivHTML.setAttribute('id',this.galleryStr+'imagenav_'+this.thumbnum);		galleryimagedivHTML.style.position = 'absolute';		galleryimagedivHTML.style.width = (this.thumbwdth+(this.thumbpding*2)) + 'px';		galleryimagedivHTML.style.height = this.thumbnavhght + 'px';		galleryimagedivHTML.style.top = '0px';		var thumbnailLeft;		if(direction === 'right') {			thumbnailLeft = (-(this.thumbwdth+(this.thumbpding*2))*i);			i--;		}		else if(direction === 'left') {			thumbnailLeft = ((this.thumbwdth+(this.thumbpding*2))*j);			j++;		}		else {			thumbnailLeft = (this.thumbnum*(this.thumbwdth+(this.thumbpding*2)));		}		galleryimagedivHTML.style.left = thumbnailLeft + 'px';		this.mvingthumblft.push(thumbnailLeft);		galleryimagedivHTML.style.padding = '0 ' + this.thumbpding + 'px';		// add link to a thumbnail		if(this.glryimgsX[this.thumbnum].href){			galleryimageaHTML.setAttribute('href',this.glryimgsX[this.thumbnum].href);		}		if(this.glryimgsX[this.thumbnum].thumbnail) {			galleryimageimgHTML.setAttribute('src',this.glryimgsX[this.thumbnum].thumbnail);		}		galleryimageimgHTML.setAttribute('width',this.thumbwdth);		galleryimageimgHTML.setAttribute('height',this.thumbhght);		if(this.glryimgsX[this.thumbnum].alt) {			galleryimageimgHTML.setAttribute('alt',this.glryimgsX[this.thumbnum].alt);		}		galleryimageimgHTML.setAttribute('border','0');		// display title with a link underneath of each thumbnail		if(this.thumbnmstgl && this.glryimgsX[this.thumbnum].name) {			var childTitle = document.createTextNode(this.glryimgsX[this.thumbnum].name);			if(this.glryimgsX[this.thumbnum].href)			{				galleryimagetitleaHTML.setAttribute('href',this.glryimgsX[this.thumbnum].href);				galleryimagetitleaHTML.style.color = '#666';							}			galleryimagetitleaHTML.appendChild(childTitle);			galleryimagespanHTML.appendChild(galleryimagetitleaHTML);					}				// display Learn More button		if(this.thumbnmstgl && this.glryimgsX[this.thumbnum].learnmore) {			galleryimagelearnmoreimgHTML.setAttribute('src', 'http://images.apple.com/pro/images/btnLearnmore.gif');			galleryimagelearnmoreimgHTML.setAttribute('border','0');			galleryimagelearnmoreimgHTML.setAttribute('width',buttonWidth);			galleryimagelearnmoreimgHTML.setAttribute('height',buttonHeight);			galleryimagelearnmoreimgHTML.style.width = buttonWidth;			galleryimagelearnmoreimgHTML.style.height = buttonHeight;			galleryimagelearnmoreaHTML.setAttribute('href',this.glryimgsX[this.thumbnum].learnmore);			galleryimagelearnmoreaHTML.appendChild(galleryimagelearnmoreimgHTML);			galleryimagelearnmorespanHTML.appendChild(galleryimagelearnmoreaHTML);		}				// display Buy Now button		if(this.thumbnmstgl && this.glryimgsX[this.thumbnum].buynow) {			galleryimagebuynowimgHTML.setAttribute('src', 'http://images.apple.com/pro/images/btnBuynow.gif');			galleryimagebuynowimgHTML.setAttribute('border','0');			galleryimagebuynowimgHTML.setAttribute('width',buttonWidth);			galleryimagebuynowimgHTML.setAttribute('height',buttonHeight);			galleryimagebuynowimgHTML.style.width = buttonWidth;			galleryimagebuynowimgHTML.style.height = buttonHeight;			galleryimagebuynowaHTML.setAttribute('href',this.glryimgsX[this.thumbnum].buynow);			galleryimagebuynowaHTML.appendChild(galleryimagebuynowimgHTML);			galleryimagebuynowspanHTML.appendChild(galleryimagebuynowaHTML);		}								// SPAN that wraps thumb image and title		galleryimagespanHTML.style.display = 'block';		galleryimagespanHTML.style.width = this.thumbwdth + 'px';		galleryimagespanHTML.style.textAlign = 'center';		//galleryimagespanHTML.style.margin = '0 ' + thumbnailpadding + 'px';		galleryimagespanHTML.style.fontSize = this.thumbfntsz + 'px';				// SPAN that wraps Learn More button		galleryimagelearnmorespanHTML.style.display = 'block';		galleryimagelearnmorespanHTML.style.width = this.thumbwdth + 'px';		galleryimagelearnmorespanHTML.style.textAlign = 'center';		galleryimagelearnmorespanHTML.style.padding =  this.thumbpding + 'px' + ' 0 0 0';				// SPAN that wraps Buy Now button		galleryimagebuynowspanHTML.style.display = 'block';		galleryimagebuynowspanHTML.style.width = this.thumbwdth + 'px';		galleryimagebuynowspanHTML.style.textAlign = 'center';		galleryimagebuynowspanHTML.style.padding =  this.thumbpding + 'px' + ' 0 0 0';		//if(this.glryimgsX[this.thumbnum].hasChildNodes()) {		galleryimageaHTML.appendChild(galleryimageimgHTML);		galleryimagedivHTML.appendChild(galleryimageaHTML);		galleryimagedivHTML.appendChild(galleryimagespanHTML);		if(this.thumbnmstgl && this.glryimgsX[this.thumbnum].buynow)			galleryimagedivHTML.appendChild(galleryimagebuynowspanHTML); //nat		if(this.thumbnmstgl && this.glryimgsX[this.thumbnum].learnmore)			galleryimagedivHTML.appendChild(galleryimagelearnmorespanHTML); //nat						if(this.flszimgtgl) {				addEventToObject(galleryimageaHTML,'onclick',this.processGalleryImageItem);			}			var myObj = this;			if(this.smallglry) {				addEventToObject(galleryimageaHTML,'onclick',function(ev){myObj.processSmallGalleryFSImg(myObj,ev);});			}		this.glrymvingglryH.appendChild(galleryimagedivHTML);				this.mvingthumbs.push(galleryimagedivHTML);			}	return true;};GalleryObj.prototype.displayLargeImageHTML = function(galleryimage) {	var galleryImgHTML = oImg.cloneNode(true);	this.glryh4H = document.createElement('h4');	var galleryH4Text;	if(galleryimage.getElementsByTagName('name')[0] && galleryimage.getElementsByTagName('name')[0].hasChildNodes()) {		galleryH4Text = document.createTextNode(galleryimage.getElementsByTagName('name')[0].firstChild.data);	} else {		galleryH4Text = document.createTextNode('');	}		while(this.glryH.hasChildNodes()) { this.glryH.removeChild(this.glryH.firstChild); }		if(galleryimage.getElementsByTagName('fullsize')[0] && galleryimage.getElementsByTagName('fullsize')[0].hasChildNodes()) {	galleryImgHTML.setAttribute('src',galleryimage.getElementsByTagName('fullsize')[0].firstChild.data);	}	galleryImgHTML.setAttribute('alt',galleryimage.getAttribute('alt'));	galleryImgHTML.setAttribute('border','0');	galleryImgHTML.setAttribute('width',this.flszwdth);	galleryImgHTML.setAttribute('height',this.flszhght);		galleryImgHTML.style.width = this.flszwdth + 'px';	galleryImgHTML.style.height = this.flszhght + 'px';			this.glryh4H.appendChild(galleryH4Text);		this.glryH.style.width = this.glrywdth + 'px';	this.glryH.style.height = (this.flszhght+this.lrgfntsz+5) + 'px';	this.glryH.style.padding = '0 0 ' + (this.lrgfntsz+5) + 'px 0';	this.glryH.style.textAlign = 'center';		this.glryh4H.style.color = this.txtclr;	this.glryh4H.style.fontSize = this.lrgfntsz + 'px';	this.glryH.style.visibility = 'hidden';		this.glryH.appendChild(galleryImgHTML);	this.glryH.appendChild(this.glryh4H);			this.glryH.Fade(600,0,100,50,10,10);		return true;};
