<!--

//printPage
function printPage() 
{
window.print()
}

//closeWindow
function closeWindow() 
{
window.close()
}

// popupWindow with width & height
function openWindowXWH (url,w,h)
{
dimension="width="+w+",height="+h;
window.open(url, "my_new_window", dimension);
}

//gdSpringWarning
function openWarning() 
{
window.open("http://aaaremotes.com/garagedoorspringwarning1.html","my_new_window","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=500, height=450")
}

//openWindow
function openWindow() 
{
window.open("http://www.aaaremotes.com/garagedoorinstallation.html","my_new_window","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=800, height=600")
}

//showHideRightNav
function showHide(divId)
{
	if(document.getElementById(divId).style.display == 'block'){
		document.getElementById(divId).style.display ='none';
		}
	else{
		document.getElementById(divId).style.display ='block';
	}
}

//invertImg
function getFilter()
{
document.getElementById('myImage').style.filter="invert()"
}

function noFilter()
{
document.getElementById('myImage').style.filter=false
}

//beginImgSwap
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];}
}
//endImgSwap

//beginScrollText
var timerID;
var Location;
/* starts and stops scrolling */
function scroll(type)
{
if (type == 'start') {
run(450, 1, 10);
}
if (type == 'stop') {
var stopLocation = document.getElementById('scrollText');
Location = stopLocation.style.left
if (timerID != null) clearTimeout(timerID);
}
if (type == 'restart') {
rerun(Location, 1, 10);
}
}
/* creates scrolling */
function run(Left, dx, speed)
{
var text = document.getElementById('scrollText');
Left -= dx;
text.style.left = Left + "px";
if (Left > -1500)
timerID = setTimeout("run(" + Left + ", " + dx + ", " + speed + ")", speed);
if (Left <= -1500)
clearText();
}
/* restarts scrolling after pause */
function rerun(Left, dx, speed)
{
var strlength;
strlength = Left.length;
var pixel = Left.substring(0,strlength-2);
var text = document.getElementById('scrollText');
pixel -= dx;
text.style.left = pixel;
if (pixel > -1500)
timerID = setTimeout("run(" + pixel + ", " + dx + ", " + speed + ")", speed);
}
/* reset the text layer for next scroll */
function clearText()
{
var el = document.getElementById('scrollText');
/* repositions the scrolling text */
el.style.left = 450 + "px";
scroll('start');
}
//endScrollText

// MAP Pricing (Too Low To Show)
function openWindowMap(ww, wh) {
//ww=ww+25; wh=wh+50;
w1=window.open('','w1','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
w1.document.open();
w1.document.write("<font size=\"2\" face=\"Arial, Helvetica, sans-serif\"><b>Price \"Too Low to Show\" Explained<\/b><br> Throughout our website you will find \"MAP\" or minimum-advertised-pricing. This allows us to receive the best possible support from our manufacturers and distributors and we abide by their policies. You will be able to see the price by selecting the Order button on the given item page. <br><br>Adding items to the shopping cart does not mean you have to buy the items. You will be able to remove an item from the cart if you so choose.<p align=\"center\"><a href=\"javascript:window.close();\">Close Window</a></p></font>");
w1.document.focus();
}

// MAP Call for Pricing (show MSRP)
function openWindowMapCall(ww, wh) {
//ww=ww+25; wh=wh+50;
w1=window.open('','w1','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
w1.document.open();
w1.document.write("<font size=\"2\" face=\"Arial, Helvetica, sans-serif\"><b>Price \"Too Low to Show\" Explained<\/b><br> Throughout our website you will find \"MAP\" or minimum-advertised-pricing. This allows us to receive the best possible support from our manufacturers and distributors and we abide by their policies. Give us a call if you would like a price quote.<p align=\"center\"><a href=\"javascript:window.close();\">Close Window</a></p></font>");
w1.document.focus();
}

// MAP Pricing (No Pricing)
function openWindowMapNoPrice(ww, wh) {
//ww=ww+25; wh=wh+50;
w1=window.open('','w1','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
w1.document.open();
w1.document.write("<font size=\"2\" face=\"Arial, Helvetica, sans-serif\"><b>\"MAP Pricing\" Explained<\/b><br> Throughout our website you will find \"MAP\" or minimum-advertised-pricing. This allows us to receive the best possible support from our manufacturers and distributors and we abide by their policies. You will be able to see the price by selecting the Add To Cart button on the given item page. <br><br>Adding items to the shopping cart does not mean you have to buy the items. You will be able to remove an item from the cart if you so choose.<p align=\"center\"><a href=\"javascript:window.close();\">Close Window</a></p></font>");
w1.document.focus();
}

// Forced Option Selection
function forceOpt(form){
for(var i=0;i<form.elements.length;i++){
if((form.elements[i].selectedIndex>-1)){
if(form.elements[i].selectedIndex==0){
alert('Please choose a '+form.elements[i].name.toLowerCase());
return false;
}
}
}
return true;
}


// Random Product Display #1
var ar = new Array(
"<div id=cImg><a href=pali97segaor.html><img src=/lib/aaaremotes/patriotic970s.jpg id=p970 alt='Sears Craftsman LiftMaster Chamberlain Patriotic USA/Mexico Designer Security+® Three-Button Mini Remote Control'></a></div><div id=cDesc><a href=pali97segaor.html title='Sears Craftsman LiftMaster Chamberlain Patriotic USA/Mexico Designer Security+® Three-Button Mini Remote Control'>Sears Craftsman LiftMaster Chamberlain Patriotic USA/Mexico Designer Security+® Three-Button Mini Remote Control</a><br>competitors price : $40.00<br>our price : <b>$22.00</b><br>view <a href=liftmaster.html title='all LiftMaster products'>all LiftMaster products</a></div>",
"<div id=cImg><a href=secrlispdese.html><img src=/lib/aaaremotes/970SPsport970CFcamo.jpg id=s970 alt='Sears Craftsman LiftMaster Chamberlain Sport Designs Security+® Three-Button Mini Remote Control'></a></div><div id=cDesc><a href=secrlispdese.html title='Sears Craftsman LiftMaster Chamberlain Sport Designs Security+® Three-Button Mini Remote Control'>Sears Craftsman LiftMaster Chamberlain Sport Designs Security+® Three-Button Mini Remote Control</a><br>competitors price : $40.00<br>our price : <b>$28.00</b><br>view <a href=liftmaster.html title='all LiftMaster products'>all LiftMaster products</a></div>",
"<div id=cImg><a href=kepiforipwif.html><img src=/lib/aaaremotes/35-K33159sm.gif id=35-K33159  alt='Kensington iPod FM Transmitter/Auto Charger 35-K33159 - Listen to your iTunes while you drive!'></a></div><div id=cDesc><a href=kepiforipwif.html title='Kensington iPod FM Transmitter/Auto Charger 35-K33159 - Listen to your iTunes while you drive!'>Kensington iPod FM Transmitter/Auto Charger 35-K33159 - Listen to your iTunes while you drive!</a><br>competitors price : $59.99<br>our price : <b>$54.99</b><br>view <a href=newproducts.html title='all Hot New Products'>all Hot New Products</a></div>",
"<div id=cImg><a href=skmtunmogado.html><img src=/lib/aaaremotes/mt18.jpg id=mt18 alt='SkyLink MT-18 Universal Motorcycle Garage Door Opener Remote and Receiver Kit'></a></div><div id=cDesc><a href=skmtunmogado.html title='SkyLink MT-18 Universal Motorcycle Garage Door Opener Remote and Receiver Kit'>SkyLink MT-18 Universal Motorcycle Garage Door Opener Remote and Receiver Kit</a><br>competitors price : $59.99<br>our price : <b>$34.99</b><br>view <a href=skylink.html title='all SkyLink products'>all SkyLink products</a></div>",
"<div id=cImg><a href=ijwirfrefori.html><img src=/lib/aaaremotes/ijetsm.gif id=iJet alt='ABT iJet Wireless RF Remote for iPods'></a></div><div id=cDesc><a href=ijwirfrefori.html title='ABT iJet Wireless RF Remote for iPods'>ABT iJet Wireless RF Remote for iPods</a><br>competitors price : $39.99<br>our price : <b>$29.99</b><br>view <a href=abtadbrtein.html title='all ABT products'>all ABT products</a><br>compatible <a href=ijwirfrefori.html#upsell title='iJet accessories'>iJet accessories</a><br>view <a href=javascript:openWindowXWH('/lib/aaaremotes/ijetmovie.swf',590,335)>iJet movie</a></div>"
);
var num = Math.floor(Math.random() * ar.length);

// Random Product Display #2
var ar2 = new Array(
"<div id=cImg><a href=kl6jostloplk.html><img src=/lib/aaaremotes/kt-j203-6.gif id=kt-j203-6 alt='Klein 6in. Journeyman Standard Long-Nose Pliers (Klein Tools J203-6)'></a></div><div id=cDesc><a href=kl6jostloplk.html title='Klein 6in. Journeyman Standard Long-Nose Pliers (Klein Tools J203-6)'>Klein 6in. Journeyman Standard Long-Nose Pliers (Klein Tools J203-6)</a><br>competitors price : $27.98<br>our price : <b>$25.88</b><br>view <a href=kleintools.html title='all Klein Tools products'>all Klein Tools products</a></div>",
"<div id=cImg><a href=skmo69nunket.html><img src=/lib/aaaremotes/sky69n-index.gif id=sky69n alt='Skylink Universal Garage Door Opener Keychain Remote Control SKY69N'></a></div><div id=cDesc><a href=skmo69nunket.html title='Skylink Universal Garage Door Opener Keychain Remote Control SKY69N'>Skylink Universal Garage Door Opener Keychain Remote Control SKY69N</a><br>our price : <b>$25.00</b><br>view <a href=skylink.html title='all SkyLink products'>all SkyLink products</a></div>"
);
var num2 = Math.floor(Math.random() * ar2.length);

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

// alternate table row color - multi-add
function alternate(id){
	if(document.getElementById){
		var table = document.getElementById(id);
		var rows = table.getElementsByTagName("tr");
		for(i = 0; i < rows.length; i++){		
			doAlternate(rows[i], i);
		}
	}
}
function doAlternate(row, i){
	if(i % 2 == 0){
		row.className = "bdeven";
	}else{
		row.className = "bdodd";
	}
}

//-->
