	/*<![CDATA[*/
function IEHoverPseudo() {

	var navItems = document.getElementById("top-nav").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className.search("menuparent") != -1) {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = this.className.replace(" over",""); }
		}
	}
	/*
	if (document.getElementById("left-nav2")) {
		var navItems = document.getElementById("left-nav2").getElementsByTagName("li");
		
		for (var i=0; i<navItems.length; i++) {
			if(navItems[i].className.search("menuparent") != -1) {
				navItems[i].onmouseover=function() { this.className += " over"; }
				navItems[i].onmouseout=function() { this.className = this.className.replace(" over",""); }
			}
		}
	}
	*/
}
	window.onload = IEHoverPseudo;
	/*]]>*/

function ClearValue(field, strCheck)
{
	if(field.value == strCheck)
	field.value = "";				
}
function Repopulate(field, strCheck)
{
	if(field.value == "")
	field.value = strCheck;
}
	
	function changestyle(objRow,className) {
		document.getElementById(objRow).className=className;
	}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


	var hasDom=true;
	var hasAll=document.all;
	var hasNSDom=document.layers;

	function disguise() {
			var ary=disguise.arguments;
			for(a=0;a<ary.length;a++) {
					var name=ary[a];
					if (hasDom) {
							var lyrStyle=document.getElementById("lyr_"+name).style;
							lyrStyle.display="none";
					}
			}
	}

	function reveal() {
		var ary=reveal.arguments;
			for(a=0;a<ary.length;a++) {
			var name=ary[a];
					if (hasDom) {
						var lyrStyle=document.getElementById("lyr_"+name).style;
						lyrStyle.display="block";
					}

			}
	}
	
	var set_name
	
	function show(name) {
		if ( set_name ) {
			disguise(set_name)
		}
		reveal(name)
		set_name=name
	}

	function hide(name) {
		disguise(name)
		set_name=null
	}
	
var curNum = 1;	
function nextResult	( num ) {
	disguise('result_'+curNum)
	reveal('result_'+num)
	curNum=num
}
	
	
setActiveStyleSheet('');
function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}
function getActiveStyleSheet() {
var i, a;
 for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
  if(a.getAttribute("rel").indexOf("style") != -1
  && a.getAttribute("title")
  && !a.disabled) return a.getAttribute("title");
  }
  return null;
}
	
var preloadFlag = true;

function updateBasket(id){
	
	if ( window.confirm("Do you want to add this item to your shopping basket?") ) {
	
	//var searchstring=document.getElementById('search').value;
	var xmlhttp=false; //Clear our fetching variable
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = '/shopping_basket_contents.php?id='+id; //This is the path to the file we just finished making *
	    xmlhttp.open('GET', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                      document.getElementById('shopping_basket').innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
                }
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
return;
	}
}


function open_flash(url, targetId) {
	var xmlhttp=false; //Clear our fetching variable
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = '/elements/swf/main.php'; //This is the path to the file we just finished making *
	    xmlhttp.open('GET', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                      document.getElementById('flashBox').innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
                }
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
return;
}