		var isNav, isIE, isMoz;
		var collStart = "";
		var collEnd = "";
		var styleObj = "";
	
		var in_str2
		
		//strings with bullits
		function ChangeContent2(layer,text,header,contentText) {
			var content = text;
			
			if (text == in_str2) {
				in_str2 = "<table cellpadding='0' cellspacing='0' border='0' width='155'>"
				in_str2 += "<tr>"
				in_str2 += "<td rowspan='100' width='6'><img src='files/images/dot_t.gif' width='6' height='1' border='0'></td>"
				in_str2 += "<td colspan='2'></td></tr><tr><td><img src='files/images/dot_t.gif' width='1' height='4' border=0></td>"
				in_str2 += "</tr>"
				in_str2 += "<tr><td class='fattype' colspan='2'>" + header + "</td></tr>"
				in_str2 += contentText
				in_str2 += "</table>"
				content = in_str2;
			}
			
			if (document.getElementById)
				document.getElementById(layer).innerHTML = content;	
			else if (document.all)
				document.all[layer].innerHTML = content;
			else if (document.layers) {
				var strNS = document.layers.container.document.layers[layer].document;
				strNS.open();
				strNS.write(content);
				strNS.close();
				}
			}



if (parseInt(navigator.appVersion) >= 4){
	if (navigator.appName == "Netscape"){
		if (parseInt(navigator.appVersion) >= 5){
			isMoz = true;
			collStart = "getElementById('";
			collEnd = "')";
			styleObj = ".style";
		}
		else{
			isNav = true;
			collStart = "layers.container.document.layers.con2.document."
		}
	}
	else{
		isIE = true;
		collStart = "all.";
		styleObj = ".style";
	}
}			
			
function getObject(obj){
	var theObj;
	if (typeof obj == "string"){
		theObj = eval("document." + collStart + obj + collEnd + styleObj);
	}
	else{
		theObj = obj;
	}
	return theObj;
}			
			
	
function shiftBy(obj, deltaX, deltaY){
	var theObj = getObject(obj);
	if (isNav){
		theObj.moveBy(deltaX, deltaY);
	}
	else if(isMoz){
		theObj.left = parseInt(theObj.left) + deltaX;
		theObj.top = parseInt(theObj.top) + deltaY;
	}
	else{
		theObj.pixelLeft += deltaX;
		theObj.pixelTop += deltaY;
	}
}


function clickBack(obj){
		var theObj = getObject(obj);
		if(ns4)
			int_left = theObj.left
		else
			int_left = theObj.pixelLeft
			
		if(countb <= 80){
		
			shiftBy('innerLay',10,0)
			setTimeout("clickBack('innerLay')",1)
			countb = countb+10
		}
		else
		{
			countb = 1
		}		
			
	if(int_left >= 0)	
		HideLayer('scroll_b','container',null)
	else
		ShowLayer('scroll_b','container',null)
	if(int_left <= sum)	
		HideLayer('scroll_ff','container',null)
	else
		ShowLayer('scroll_ff','container',null)
}			
			
function clickForward(obj){

	var theObj = getObject(obj);
		if(ns4)
			int_left = theObj.left
		else
			int_left = theObj.pixelLeft
		if(countff <= 80){
			
			shiftBy('innerLay',-10,0)
			setTimeout("clickForward('innerLay')",1)
			countff = countff+10
		}
		else
		{
			countff = 1
		}
			
	if(int_left >= 0)	
		HideLayer('scroll_b','container',null)
	else
		ShowLayer('scroll_b','container',null)
	
	if(int_left <= sum)	
		HideLayer('scroll_ff','container',null)
	else
		ShowLayer('scroll_ff','container',null)
}


function HideLayer(id, layer1, layer2){
	if (ns4){
		if (!layer2 && !layer1)
			document.layers[id].visibility = "hide"
		else if (!layer2)
			document[layer1].document.layers[id].visibility = "hide"
		else
			document[layer2].document[layer1].document.layers[id].visibility = "hide"
	}
	else document.all[id].style.visibility = "hidden"
}

function ShowLayer(id, layer1, layer2){	
	if (ns4){
		if (!layer2 && !layer1)
			document.layers[id].visibility = "show"
		else if (!layer2)
			document[layer1].document.layers[id].visibility = "show"
		else
			document[layer2].document[layer1].document.layers[id].visibility = "show"
	}
	else document.all[id].style.visibility = "visible"
}

function submitForm(whichForm) {
	
	
	var formElements = document.forms[whichForm].elements;
	
	var checked = 0;
		for (var j = 0; j < formElements.length ; j++){
			if (formElements[j].name != "CatID"){
				if (formElements[j].value != "") {
				checked++;
				}	
			}	
		}
	if (whichForm == 'browserForm' && checked < 2) {
			alert("You have to choose at least two products to make a compare between products");
		} else if (whichForm == 'browserForm'){
			document.forms['browserForm'].submit();	
			empty();
		}
	
	if (whichForm == 'showMeForm' && checked < 2) {
			alert("You have to select at least one answer to see the products");
		} else if (whichForm == 'showMeForm') { 
			document.forms['showMeForm'].submit();	
		}
}
