function clear_box()
{
	document.searchform.search.value='';
	document.searchform.search.focus();
}

function hover_on(arrow)
{
	document.getElementById(arrow).src='images/' + arrow + '_active.gif';
}
function hover_off(arrow)
{
	document.getElementById(arrow).src='images/' + arrow + '.gif';
}

function return_oswidth()
{
	var iTotalWidth = document.getElementById("frame").offsetWidth;
	//alert(iTotalWidth);
	return iTotalWidth;
}
function increase(amount)
{
	var sWidth = document.getElementById("progressbar").style.width;
	var iWidth = 0;
	iWidth = Math.round((iWidth + parseInt(sWidth)+amount));
	//alert(iWidth);
	sWidth = iWidth.toString() + '%';
	//alert(sWidth);
	return sWidth;
}
function amount(count)
{
	var width = return_oswidth();
	//alert(width);
	var increase = Math.ceil((100/count));
	//alert(increase);
	return increase;
}
function pricetag(link)
{
	window.open (link,"Prislapp","status=0,toolbar=0,width=1024,height=768,left=100px,top=100px"); 
}


function menu_open(link)
{
	//var ul_level2 = document.getElementsByName(link);
	//var display = ul_level2[0].style.display;
	//alert(display);
	
	
	//var ul_level2 = document.getElementsByName(link);
	//var display = ul_level2[0].style.display;
	//alert(display);
	
	var id = link;
	var ul_level2 = document.getElementById(id);
	var display = ul_level2.style.display;
	
	if(display == 'none')
	{
		ul_level2.style.display='block';
	}
	if(display == 'block')
	{
		ul_level2.style.display='none';
	}

}

function content_height()
{
	var container = 0;
	var total = 0;
	var header = 0;
	var bottom = 0;
	var left = 0;
	
	if(document.body.clientHeight!=null) {
		container = document.body.clientHeight;
	}
	if(document.body.clientHeight!=null) {
		total = document.body.clientHeight;
	}				
	if(document.getElementById('bottom')!=null) {
		header = document.getElementById('header').offsetHeight;
	}
	if(document.getElementById('bottom')!=null) {
		bottom = document.getElementById('bottom').offsetHeight;
	}
	if(document.getElementById('left')!=null) {
		left =  document.getElementById('left').offsetHeight;
	}
									
	var w = 0;
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
		//strict mode
		if(!(document.documentElement.clientWidth == 0))
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		//quirks mode
		else
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
	}
	//w3c
	else
	{
		w = window.innerWidth;
		h = window.innerHeight;
	}

	var cStyle = document.getElementById("content");

	var contentHeight = cStyle.offsetHeight;
	if(contentHeight==0){
			var str = cStyle.currentStyle.height;
			if(str='auto')
				contentHeight = 900;
			else
				contentHeight = parseInt(str)
		}
		
	var customHeight = 0;
	var custom = 0;

	if(h>contentHeight && 1==2) {

		if(document.getElementById("customize")!=null) {
			custom = document.getElementById("customize").offsetHeight;
			if (custom!=null) {
				customHeight = custom;
				cStyle.style.height=(contentHeight+customHeight)+"px";
			}
		}else{
			cStyle.style.height=h-header-bottom+"px";
		}
	}else{

		if(document.getElementById("customize")!=null) {
			custom = document.getElementById("customize").offsetHeight;
			if (custom!=null) {
				customHeight = custom;
				cStyle.style.height=(contentHeight+customHeight)+"px";
			}
		}else{
			cStyle.style.height=(contentHeight+header+bottom)+"px";
		}				
	}
	
}	
