function ShowPicture(id,Source) { 
if (Source=="1"){ 
if (document.layers) document.layers[''+id+''].visibility = "show" 
else if (document.all) document.all[''+id+''].style.visibility = "visible" 
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible" 
} 
else 
if (Source=="0"){ 
if (document.layers) document.layers[''+id+''].visibility = "hide" 
else if (document.all) document.all[''+id+''].style.visibility = "hidden" 
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" 
} 
} 

function over_effect(e,state)
{
	if (document.all)
		source4=event.srcElement
	else if (document.getElementById)
		source4=e.target
	if (source4.className=="menulines")		
		source4.style.borderStyle=state
	else{
		while(source4.tagName!="TABLE"){
		source4=document.getElementById? source4.parentNode : source4.parentElement
		if (source4.className=="menulines")
			source4.style.borderStyle=state
		}
	}
}

function ScreenPrint()
{
	window.print();
	window.close();
}


function SetChecked(val, intFrom, intTo, frmName) 
{
	strForm=document.forms[frmName];
	var i=intFrom;
	for( i=intFrom ; i<=intTo ; i++) 
	{	
		strForm.elements[i].checked=val;		
	}
}
function OpenPage(MenuId, ProducentId)
{
if (ProducentId > 0)
	{
	window.location=('/moduler/produkter/frontend/?id='+MenuId+'&lv='+ProducentId);
	}
}
function SetSize(MenuId, ProducentId, skostr)
{
if (skostr > 0)
	{
		window.location=('/moduler/produkter/frontend/?id='+MenuId+'&lv='+ProducentId+'&SkoStr='+skostr);
	}
}
function fnFindSkoByStorrelse(MenuId, ProducentId, strSkostorrelse)
{
if (ProducentId > 0)
	{
		window.location=('/moduler/produkter/frontend/?id='+MenuId+'&lv='+ProducentId+'&strEU='+strSkostorrelse);
	}
}
function fnFindSkoByStorrelseAndSerach(MenuId, ProducentId, strSkostorrelse)
{
if (strSkostorrelse != '')
	{
		window.location=('/moduler/produkter/frontend/?id='+MenuId+'&ProductSearch=1&strEU='+strSkostorrelse);
	}
}

function fnFindSkoByStorrelseAndSearch(MenuId, strSkostorrelse)
{
if (strSkostorrelse != '')
	{
		window.location=('/moduler/produkter/frontend/SaveSearch.asp?id='+MenuId+'&ProductSearch=1&strEU='+strSkostorrelse);
	}
}
function fnFindSkoByProducentAndSearch(MenuId, strProducent)
{
if (strProducent != '')
	{
		window.location=('/moduler/produkter/frontend/SaveSearch.asp?id='+MenuId+'&ProductSearch=1&strProducent='+strProducent);
	}
}

// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

// set the radio button with the given value as being checked
// do nothing if there are no radio buttons
// if the given value does not exist, all the radio buttons
// are reset to unchecked
function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}