// JavaScript Document

// _mo preloader
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];}}
}

//Image Swapping
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];}
}

//rel = external links
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

//alternating row color
function alternate(id){ 
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 0; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "empty"; 
     }else{ 
       rows[i].className = "shaded"; 
     }       
   } 
 } 
}

// select box jumper
function jumper() {
	i = document.jumper_pulldown.url.selectedIndex;
	x = document.jumper_pulldown.url.options[i].value;
	if (x != "") {
		window.top.location.href = x;
	}
}

/* faq slider function
$(document).ready(function() {
	$('#faqs h3').each(function() {
		var tis = $(this), state = false, answer = tis.next('div').hide().css('height','auto').slideUp();
		tis.click(function() {
			state = !state;
			answer.slideToggle(state);
			tis.toggleClass('active',state);
		});
	});
});
*/ 


// thumbnail description
function movein(which,html){
	if (document.getElementById)
		document.getElementById("thumbsSmallName").innerHTML=html
	else
		boxdescription.innerHTML=html
}

function moveout(which){
	if (document.getElementById)
		document.getElementById("thumbsSmallName").innerHTML=' '
	else
		boxdescription.innerHTML=' '
}

// colors description
function moveinColors(which,html){
	if (document.getElementById)
		document.getElementById("thumbsColorsName").innerHTML=html
	else
		boxdescription.innerHTML=html
}

function moveoutColors(which){
	if (document.getElementById)
		document.getElementById("thumbsColorsName").innerHTML=' '
	else
		boxdescription.innerHTML=' '
}


