// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'assets/images/sewouts/emb.png'
theImages[1] = 'assets/images/sewouts/emb1.png'
theImages[2] = 'assets/images/sewouts/emb2.png'
theImages[3] = 'assets/images/sewouts/emb3.png'
theImages[4] = 'assets/images/sewouts/emb4.png'
theImages[5] = 'assets/images/sewouts/emb5.png'
theImages[6] = 'assets/images/sewouts/emb6.png'


// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" border=0>');
}


// Random Backgroundz
var el="colorPreview";
var bgimg=new Array("assets/images/brian_lift1.jpg", "assets/images/scott_lift1.jpg","assets/images/brian_lift2.jpg", "assets/images/scott_lift2.jpg","assets/images/brian_lift3.jpg", "assets/images/scott_lift3.jpg","assets/images/brian_lift4.jpg", "assets/images/scott_lift4.jpg");
var random=Math.round((bgimg.length-1)*Math.random());
var cssStr="#"+el+" { background: url("+bgimg[random]+") no-repeat top left } ";
var style=document.createElement("style");style.setAttribute("type","text/css");
if(style.styleSheet){style.styleSheet.cssText=cssStr;}
else{var cssText=document.createTextNode(cssStr);style.appendChild(cssText);}

document.getElementsByTagName("head")[0].appendChild(style);


var el="featureSpot";
var bgimg=new Array("assets/images/scott_quality_stomp.jpg", "assets/images/brian_price_stomp.jpg");
var random=Math.round((bgimg.length-1)*Math.random());
var cssStr="#"+el+" { background: url("+bgimg[random]+") no-repeat bottom right } ";
var style=document.createElement("style");style.setAttribute("type","text/css");
if(style.styleSheet){style.styleSheet.cssText=cssStr;}
else{var cssText=document.createTextNode(cssStr);style.appendChild(cssText);}

document.getElementsByTagName("head")[0].appendChild(style);

var el="tagSwap";
var bgimg=new Array("assets/images/free_embroidery.jpg", "assets/images/fast_shipping.jpg", "assets/images/satisfaction.jpg");
var random=Math.round((bgimg.length-1)*Math.random());
var cssStr="#"+el+" { background: url("+bgimg[random]+") no-repeat bottom left } ";
var style=document.createElement("style");style.setAttribute("type","text/css");
if(style.styleSheet){style.styleSheet.cssText=cssStr;}
else{var cssText=document.createTextNode(cssStr);style.appendChild(cssText);}

document.getElementsByTagName("head")[0].appendChild(style);

var el="sewout1";
var bgimg=new Array("assets/images/sewouts/alt_s1.jpg", "assets/images/sewouts/alt_s2.jpg", "assets/images/sewouts/alt_s3.jpg", "assets/images/sewouts/alt_s4.jpg", "assets/images/sewouts/alt_s5.jpg");
var random=Math.round((bgimg.length-1)*Math.random());
var cssStr="#"+el+" { background: url("+bgimg[random]+") no-repeat bottom left } ";
var style=document.createElement("style");style.setAttribute("type","text/css");
if(style.styleSheet){style.styleSheet.cssText=cssStr;}
else{var cssText=document.createTextNode(cssStr);style.appendChild(cssText);}

document.getElementsByTagName("head")[0].appendChild(style);


var el="sewout2";
var bgimg=new Array("assets/images/sewouts/alt_s6.jpg", "assets/images/sewouts/alt_s7.jpg", "assets/images/sewouts/alt_s8.jpg", "assets/images/sewouts/alt_s9.jpg", "assets/images/sewouts/alt_s10.jpg");
var random=Math.round((bgimg.length-1)*Math.random());
var cssStr="#"+el+" { background: url("+bgimg[random]+") no-repeat bottom left } ";
var style=document.createElement("style");style.setAttribute("type","text/css");
if(style.styleSheet){style.styleSheet.cssText=cssStr;}
else{var cssText=document.createTextNode(cssStr);style.appendChild(cssText);}

document.getElementsByTagName("head")[0].appendChild(style);


//** Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)

//** Updated: July 14th 06' to v2.0
	//1) Ability to "left", "center", or "right" align the menu items easily, just by modifying the CSS property "text-align".
	//2) Added an optional "swipe down" transitional effect for revealing the drop down menus.
	//3) Support for multiple Chrome menus on the same page.

//** Updated: Nov 14th 06' to v2.01- added iframe shim technique

//** Updated: July 23rd, 08 to v2.4
	//1) Main menu items now remain "selected" (CSS class "selected" applied) when user moves mouse into corresponding drop down menu. 
	//2) Adds ability to specify arbitrary HTML that gets added to the end of each menu item that carries a drop down menu (ie: a down arrow image).
	//3) All event handlers added to the menu are now unobstrusive, allowing you to define your own "onmouseover" or "onclick" events on the menu items.
	//4) Fixed elusive JS error in FF that sometimes occurs when mouse quickly moves between main menu items and drop down menus

//** Updated: Oct 29th, 08 to v2.5 (only .js file modified from v2.4)
	//1) Added ability to customize reveal animation speed (# of steps)
	//2) Menu now works in IE8 beta2 (a valid doctype at the top of the page is required)

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '<img src="assets/images/nav_down.png" border="0" />', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 5], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)

//No need to edit beyond here////////////////////////

dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, revealtimers: {},

getposOffset:function(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
},

css:function(el, targetclass, action){
	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
	if (action=="check")
		return needle.test(el.className)
	else if (action=="remove")
		el.className=el.className.replace(needle, "")
	else if (action=="add" && !needle.test(el.className))
		el.className+=" "+targetclass
},

showmenu:function(dropmenu, e){
	if (this.enablereveal[0]){
		if (!dropmenu._trueheight || dropmenu._trueheight<10)
			dropmenu._trueheight=dropmenu.offsetHeight
		clearTimeout(this.revealtimers[dropmenu.id])
		dropmenu.style.height=dropmenu._curheight=0
		dropmenu.style.overflow="hidden"
		dropmenu.style.visibility="visible"
		this.revealtimers[dropmenu.id]=setInterval(function(){cssdropdown.revealmenu(dropmenu)}, 10)
	}
	else{
		dropmenu.style.visibility="visible"
	}
	this.css(this.asscmenuitem, "selected", "add")
},

revealmenu:function(dropmenu, dir){
	var curH=dropmenu._curheight, maxH=dropmenu._trueheight, steps=this.enablereveal[1]
	if (curH<maxH){
		var newH=Math.min(curH, maxH)
		dropmenu.style.height=newH+"px"
		dropmenu._curheight= newH + Math.round((maxH-newH)/steps) + 1
	}
	else{ //if done revealing menu
		dropmenu.style.height="auto"
		dropmenu.style.overflow="hidden"
		clearInterval(this.revealtimers[dropmenu.id])
	}
},

clearbrowseredge:function(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
		var dropmenuW=this.dropmenuobj.offsetWidth
		if (windowedge-this.dropmenuobj.x < dropmenuW)  //move menu to the left?
			edgeoffset=dropmenuW-obj.offsetWidth
	}
	else{
		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
		var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
		var dropmenuH=this.dropmenuobj._trueheight
		if (windowedge-this.dropmenuobj.y < dropmenuH){ //move up?
			edgeoffset=dropmenuH+obj.offsetHeight
			if ((this.dropmenuobj.y-topedge)<dropmenuH) //up no good either?
				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
},

dropit:function(obj, e, dropmenuID){
	if (this.dropmenuobj!=null) //hide previous menu
		this.hidemenu() //hide menu
	this.clearhidemenu()
	this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
	this.asscmenuitem=obj //reference associated menu item
	this.showmenu(this.dropmenuobj, e)
	this.dropmenuobj.x=this.getposOffset(obj, "left")
	this.dropmenuobj.y=this.getposOffset(obj, "top")
	this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
	this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
	this.positionshim() //call iframe shim function
},

positionshim:function(){ //display iframe shim function
	if (this.iframeshimadded){
		if (this.dropmenuobj.style.visibility=="visible"){
			this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
			this.shimobject.style.height=this.dropmenuobj._trueheight+"px"
			this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px"
			this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px"
			this.shimobject.style.display="block"
		}
	}
},

hideshim:function(){
	if (this.iframeshimadded)
		this.shimobject.style.display='none'
},

isContained:function(m, e){
	var e=window.event || e
	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
},

dynamichide:function(m, e){
	if (!this.isContained(m, e)){
		this.delayhidemenu()
	}
},

delayhidemenu:function(){
	this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},

hidemenu:function(){
	this.css(this.asscmenuitem, "selected", "remove")
	this.dropmenuobj.style.visibility='hidden'
	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px"
	this.hideshim()
},

clearhidemenu:function(){
	if (this.delayhide!="undefined")
		clearTimeout(this.delayhide)
},

addEvent:function(target, functionref, tasktype){
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false);
	else if (target.attachEvent)
		target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},

startchrome:function(){
	if (!this.domsupport)
		return
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	for (var ids=0; ids<arguments.length; ids++){
		var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
		for (var i=0; i<menuitems.length; i++){
			if (menuitems[i].getAttribute("rel")){
				var relvalue=menuitems[i].getAttribute("rel")
				var asscdropdownmenu=document.getElementById(relvalue)
				this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
				this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
				this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
				try{
					menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
				}catch(e){}
				this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
					if (!cssdropdown.isContained(this, e)){
						var evtobj=window.event || e
						cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
					}
				}, "mouseover")
				this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
				this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
			}
		} //end inner for
	} //end outer for
	if (this.enableiframeshim && document.all && !window.XDomainRequest && !this.iframeshimadded){ //enable iframe shim in IE5.5 thru IE7?
		document.write('<IFRAME id="iframeshim" src="about:blank" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>')
		this.shimobject=document.getElementById("iframeshim") //reference iframe object
		this.shimobject.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
		this.iframeshimadded=true
	}
} //end startchrome

}


	MagicThumb.options = {
		captionSlideDuration: 0.5,
		zoomDuration: 0.5,
		restoreDuration: 0.3,
		zoomPosition: 'center',
		zoomTrigger: 'click',
		zoomTriggerDelay: 0.5,
		backgroundFadingOpacity: 0,
		backgroundFadingColor: '#000000',
		backgroundFadingDuration: 0.2,
		controlbarPosition: 'top right',
		zIndex: 10001,
		keepThumbnail: true,
		allowKeyboard: true,
		useCtrlKey: false,
		controlbarEnable: true,
		allowMultipleImages: false
	}

function MagicThumb_selectorClick(el) {
el.blur();
var a = document.getElementById(el.getAttribute('rel'));
a.href = el.href;
a.setAttribute('title', el.getAttribute('title'));
a.firstChild.src = el.getAttribute('rev');
MagicThumb.refresh();
}            




//Hint Script

var defaultMenuWidth="450px" //set default menu width.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<b>How will my logo be handled?</b><br>During Step 3 of the Checkout Process you will be asked to email your logo to <a href="mailto:logos@logoup.com"><u>Logos@LogoUp.com</u></a>.<ul><li><b>New Customers &amp; Logos:</b> After your order is processed, one of our Graphic Designers will email you your Custom Logo Proof.</li><li><b>Returning Customers &amp; Logos on file:</b> Before checking out, be sure to reference your previous Order Number in the Comments section during Step 3 of Checkout; This will ensure that we use the correct logo on file.</li></ul>Don\'t have a logo yet? Not to worry, our expert logo artists can assist you. Get in touch with us at 800-321-LOGO(5646)'

linkset[1]='<B>Super-Easy Ordering Process</B><br><ol><li>Mix &amp; match ALL of our items. Your logo will "shine" on everything.</li><Br>'
linkset[1]+='<li>Place your order and receive an immediate order confirmation email. Pow!</li><Br><li>Submit your logo to <a href="mailto:logos@logoup.com"><u>Logos@LogoUp.com</u></a> referencing your Order Number.</li><Br><li> Receive a digital Custom Logo Proof of your logo from our Graphics Department within 2-3 business days.</li><Br><li>Upon your approval, our superheroes will get to work sewing your order ensuring it will ship within 9-12 business days!</li><Br><li>Re-order with ease! Your logo is now on-file with us for a "lifetime" of free use.</li></ol>'

linkset[2]='<b>How and when will my card be charged?</b><br><br>Payments are processed based on the type of card used and the particular issuing financial institution:<ul><li><b>Credit card</b> purchases are pre-authorized at the time of your order. This process does not place an actual charge on your card, but temporarily “holds” the availability of funds (1-7 days on average).<br><br>Once your order is completed and shipped this pre-authorization amount will be replaced with an actual charge which is then posted to your credit card.</li><br><li><b>Debit Card</b> purchases are NOT pre-authorized and the invoice amount will be charged immediately at the time you place your order.</li></ul>'

////No need to edit beyond here

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu



// Random Testimonials

<!--
var t1_text = new Array ();
t1_text[0] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nThe shirts were a big hit and I\'m amazed we were able to pull it off in such a short time. Thanks again for your help. If you ever need references for the job you guys do, please feel free to call on me.\n<\/div><\/div><div class="tA_base">\nTom, VA-82, Colorado\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>     ');

t1_text[1] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nJust a note to let you know that the shirts arrived on time and in good condition. They came out great, and everyone at the conference was pleased with the shirts. Count me as a happy customer.\n<\/div><\/div><div class="tA_base">\nClif, Tcl Community Association, Michigan\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

t1_text[2] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nI was shopping around and chose you because of your free embroidery pricing. All the other guys had hidden charges and gimmicks. Thanks so much!\n<\/div><\/div><div class="tA_base">\nTom, Santa Clarita Lanes, California\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

var i = Math.floor(3*Math.random())

//-->

<!--
var t2_text = new Array ();
t2_text[0] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nAs a small business owner I appreciate when a company like LogoUp makes it easy to buy something. I have to say that setting up my logo for embroidery was really easy. Best of all, it didn\'t cost me a thing. THANK YOU!\n<\/div><\/div><div class="tB_base">\nDanny, Moloshok Photography, California\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

t2_text[1] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nWhen I needed just a couple shirts for my new staff member your \'no minimums policy\' worked out great. I was able to order two shirts easily and I didn\'t pay through the roof for it either. I like a company that is true to their word!!! Thanks LogoUp.com.\n<\/div><\/div><div class="tB_base">\nTiffany, Kawasaki, Michigan\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

t2_text[2] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nThe shirts and hats look fabulous!!  I couldn’t be happier.  I’ll get you on the favorite’s page of my website. :)\n<\/div><\/div><div class="tB_base">\nStacey, Panache Event Group, Texas\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

var i = Math.floor(3*Math.random())

//-->

<!--
var t3_text = new Array ();
t3_text[0] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nI received a confirmation that the order has been shipped. I would like to thank you all for making this an easy process and for working with us. Thank you again for your time and patience. We will definitely be doing business with you in the future.\n<\/div><\/div><div class="tA_base">\nLauren, Stevens Institute of Technology, New Jersey\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

t3_text[1] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nThe shirts arrived this week and they look GREAT!  Thanks for providing quick service and quality merchandise at an excellent price! I\'ll definitely recommend LogoUp and will use your services again in the future.\n<\/div><\/div><div class="tA_base">\nPaul, The Travel Guru, Florida\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

t3_text[2] = ('<div class="tA_top"><div class="tA_mid"><div class="tA_fill">\nAs an owner of a small business, we look for price and quality in our purchases. We have been a satisfied customer at your competition. We saw a special and decided to order from you. We were very pleased with the shirt and it was obvious that your embroidery quality was much better.\n<\/div><\/div><div class="tA_base">\nKen, DAB Exterior Cleaning Solution, Pennsylvania\n<\/div><\/div><div style="margin:10px 0;"><img src="assets\/images\/testimonial_div.jpg" \/><\/div>');

var i = Math.floor(3*Math.random())

//-->






<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
