// JavaScript Document

var browser=navigator.appName;
var oPopup = window.createPopup();
var divWidth=2;
var divColor='solid red';


//puts the image glow
function HighLightElement(ob,type,brwsr) {
	
    var total2Highlight;var divID;
    divID=ob.id;
	total2Highlight=(document.getElementsByName(ob.id).length);
	if (total2Highlight > 1) {
		if (brwsr == 'ie') {
			for(var mycount=0;mycount<total2Highlight;mycount++) {
				oldackgroung=document.getElementsByName(divID).item(mycount).style.background;
				oldfilter=document.getElementsByName(divID).item(mycount).style.filter;
				if (type == "art") {
					document.getElementsByName(divID).item(mycount).style.background="#ff0000";
				} else {
					document.getElementsByName(divID).item(mycount).style.background="red";
				}
				document.getElementsByName(divID).item(mycount).style.filter="progid:DXImageTransform.Microsoft.Alpha( Opacity=25 ,FinishOpacity=0, Style=0)";
			}
		} else {
			for(var mycount=0;mycount<total2Highlight;mycount++)
				document.getElementsByName(divID).item(mycount).style.border="solid violet 2px";
		}
	} else {
		if (brwsr == 'ie') {
			oldackgroung=document.getElementsByName(divID).item(mycount).style.background;
			oldfilter=document.getElementsByName(divID).item(mycount).style.filter;
			if (type =="art") 
				ob.style.background='#FF0000';
			else
				ob.style.background='blue';
			ob.style.filter="progid:DXImageTransform.Microsoft.Alpha( Opacity=25 ,FinishOpacity=0, Style=0)";
		} else {
				var mycount=0;
				if (type == "art") 
					document.getElementsByName(divID).item(mycount).style.border="solid violet 2px";
				else 
					document.getElementsByName(divID).item(mycount).style.border="solid blue 2px";
		}	
	}
}



function ClearElement(ob,brwsr) {
	var total2Highlight
	var divID
	divID=ob.id;
	total2Highlight=(document.getElementsByName(ob.id).length);
	if (total2Highlight > 1) {
		if (brwsr == 'ie') {
			for(var mycount=0;mycount<total2Highlight;mycount++) {
				document.getElementsByName(divID).item(mycount).style.background=oldackgroung;
				document.getElementsByName(divID).item(mycount).style.filter=oldfilter;
			}
		} else {
			for(var mycount=0;mycount<total2Highlight;mycount++) 
				document.getElementsByName(divID).item(mycount).style.border="solid white 0px";	
		}
	} else {
		if (brwsr == 'ie') {
			ob.style.background=oldackgroung;
			ob.style.filter=oldfilter;
		} else {
			document.getElementsByName(divID).item(mycount).style.border="solid white 0px";
		}
	}
}
