// JavaScript Document

var selectedDiv=0;
var totalDivs=0;

var all_links=new Array();

function getElementbyClass(){
	var classname = "thumb";
	
	var inc=0;
	var alltags=document.all? document.all.tags("A") : document.getElementsByTagName("*");
	for (i=0; i<alltags.length; i++){
		if (alltags[i].className==classname)
			all_links[inc++]=alltags[i];
	}
	totalDivs=all_links.length;
}

function showPic (whichpic) { 

	for(i=0; i<all_links.length; i++){
		if( all_links[i] == whichpic){
			selectedDiv=i;
		}
	}

	if (document.getElementById) { 
		document.getElementById('placeholder').src = whichpic.href; 
		if (whichpic.title) { 
			document.getElementById('desc').childNodes[0].nodeValue = whichpic.title; 
		} else { 
			document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue; 
		} 
		return false; 
	} else { 
		return true; 
	} 
}

/*
function selectPic( whichpic ){
	for(i=0; i<all_links.length; i++){
		if( all_links[i] == whichpic){
			selectedDiv=all_links[i];
		}
	}
	showPic( whichpic );
}*/


function selectProduct($thumb)
{	
	
	/* use script below for image change on click*/
	if(document.getElementById("thumb_over_01")){
		document.getElementById("thumb_over_01").className="none";
	}
	if(document.getElementById("thumb_over_02")){	
		document.getElementById("thumb_over_02").className="none";
	}
	if(document.getElementById("thumb_over_03")){	
		document.getElementById("thumb_over_03").className="none";
	}
	document.getElementById($thumb).className="overthumb";
	
	
}

if (window.addEventListener)
	window.addEventListener("load", getElementbyClass, false);
else if (window.attachEvent)
	window.attachEvent("onload", getElementbyClass);
else if (document.getElementById)
	window.onload=getElementbyClass;