
function MM_preloadImages() { 
  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_swapImgRestore() { 
  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_findObj(n, d) { 
  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() {
  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];}
}

function hitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   myfield.form.submit();
   return false;
   }
else
   return true;
}

function buynow(qaid,qaqty)
{
	document.quickbuy.itemid.value=qaid;
	document.quickbuy.qty.value=qaqty;
	document.quickbuy.submit()
} 



var tickercontent=new Array()
tickercontent[0]='<table cellpadding="0" cellspacing="0" border="0" width="180" height=250><tr><td align="center" bgcolor="#D3C6A4"><B><font color="#C6160E">Testimonials</font></B></td></tr><tr><td><p align="left" class="r">I\'ve bought Sunglasses online before, but Ardy has the best prices and service I\'ve ever seen. The website is very easy to navigate...my order was placed in minutes and the Sunglasses were delivered straight to my door a few days later. I\'ll definitely be a repeat customer.</p></td></tr><tr><td align="right" width="100%"><B>Randy F. &nbsp;</B></td></tr><tr><td align="right" width="100%">Detroit MI &nbsp;</td></tr></table>'
tickercontent[1]='<table cellpadding="0" cellspacing="0" border="0" width="180" height=250><tr><td align="center" bgcolor="#D3C6A4"><B><font color="#C6160E">Testimonials</font></B></td></tr><tr><td><p align="left" class="r">Thank you, Ardy, for making my life so much easier. I don\'t have to fight the mall traffic anymore. I can just buy my Sunglasses from the comfort of my own home and have them brought to me. Plus, the selection is amazing and the prices are great.</p></td></tr><tr><td align="right" width="100%"><B>Irene S. &nbsp;</B></td></tr><tr><td align="right" width="100%">Callahan FL &nbsp;</td></tr></table>'
tickercontent[2]='<table cellpadding="0" cellspacing="0" border="0" width="180" height=250><tr><td align="center" bgcolor="#D3C6A4"><B><font color="#C6160E">Testimonials</font></B></td></tr><tr><td><p align="left" class="r">It\'s so hard to find authentic Sunglasses online. However, my search is over. I never thought I\'d buy Sunglasses online, but now I\'m glad I do. Besides your great prices, Ardy has a very friendly staff that makes the entire process a breeze.</p></td></tr><tr><td align="right" width="100%"><B>Ray P. &nbsp;</B></td></tr><tr><td align="right" width="100%">Waycross GA &nbsp;</td></tr></table>'


function domticker(content, divId, divClass, delay, fadeornot){
this.content=content
this.tickerid=divId 
this.delay=delay 
this.mouseoverBol=0 
this.pointer=1
this.opacitystring=(typeof fadeornot!="undefined")? "width: 100%; filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); -moz-opacity: 1" : ""
if (this.opacitystring!="") this.delay+=500 
this.opacitysetting=0.2 
document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">'+content[0]+'</div></div>')
var instanceOfTicker=this
setTimeout(function(){instanceOfTicker.initialize()}, delay)
}

domticker.prototype.initialize=function(){
var instanceOfTicker=this
this.contentdiv=document.getElementById(this.tickerid).firstChild 
document.getElementById(this.tickerid).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
this.rotatemsg()
}

domticker.prototype.rotatemsg=function(){
var instanceOfTicker=this
if (this.mouseoverBol==1) 
setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
else{
this.fadetransition("reset") 
this.contentdiv.innerHTML=this.content[this.pointer]
this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer1')}, 100) 
this.pointer=(this.pointer<this.content.length-1)? this.pointer+1 : 0
setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay) 
}
}

domticker.prototype.fadetransition=function(fadetype, timerid){
var contentdiv=this.contentdiv
if (fadetype=="reset")
this.opacitysetting=0.2
if (contentdiv.filters && contentdiv.filters[0]){
if (typeof contentdiv.filters[0].opacity=="number") 
contentdiv.filters[0].opacity=this.opacitysetting*100
else 
contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"
}
else if (typeof contentdiv.style.MozOpacity!="undefined" && this.opacitystring!=""){
contentdiv.style.MozOpacity=this.opacitysetting
}
else
this.opacitysetting=1
if (fadetype=="up")
this.opacitysetting+=0.2
if (fadetype=="up" && this.opacitysetting>=1)
clearInterval(this[timerid])
}

function pcf_lnks(u,t,w,h)
	    {
		    window.open(u,t,'left=200,top=50,resizable=yes,scrollbars=yes,width='+w+',height='+h);
	    }

stdBrowser = (document.getElementById) ? true : false
 
function popUp(currElem,x,y) {
			  
			popUpWin = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem)			
			if (document.all) {
				popUpWin.pixelTop = y
				popUpWin.pixelLeft =x
				
			}
			else {
				if (stdBrowser) {
					popUpWin.top = y+"px"
					popUpWin.left =x+"px"
					
				}
				else {
					popUpWin.top = y
					popUpWin.left = x
						
				}
			}
			
			popUpWin.visibility = "visible"
			
					
		}
function popDown(currElem) {
			popUpWin = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem)
			popUpWin.visibility = "hidden"
}




