function getItem(str){
 document.location.href = str;
 return;
}

function getimage(afbeelding){
	a = document.getElementById('img_big');
	a.src = afbeelding;
	
	if (a.width > 200) a.width = 200;
	if (a.Height > 200) a.Height = 200;
}

function numbersonly(){
 if (event.keyCode<48||event.keyCode>57)
  return false
}

function checkSearch(){
 zoekwoord = document.search.SValue.value;
 zoekwoord = zoekwoord.replace('"','')
 zoekwoord = zoekwoord.replace('\'','')
 if (zoekwoord == ''){
  alert('U dient een geldig zoekwoord op te geven');
  return;
 }
 
 document.location.href = 'index.asp?search=true&SValue=' + zoekwoord;
}

function checkSearch2(){
 min_getal = document.search2.zoek_min.value;
 max_getal = document.search2.zoek_max.value; 
 
 if (min_getal == '' && max_getal == '' ){
  alert('Ongeldige getallen range');
  return;
 }
 
 document.location.href = 'index.asp?numsearch=true&zoek_min=' + min_getal + '&zoek_max=' + max_getal;
}


function getInfo(title, content){
 info_div = document.getElementById('div_symbol_info');
 if (title == '' && content == ''){
 	info_div.innerHTML = '';
	info_div.style.display = 'none';
 }else{
	info_div.style.display = '';
	info_div.innerHTML = '<div class="symbol_info_title">' + title + '</div><div class="symbol_info_text">' + content + '</div>';
 }
}

function changeClass(id, klasse){
 document.getElementById(id).className = klasse;
}

function setLocation(url){
 window.self.location.href = url;
}

function getVergelijking(id){
 window.open('/sis/front/vergelijk/item_select.asp?id=' + id,'Vergelijking','width=800, height=800, scrollbars=yes');
 return;
}

function changeSearchFieldIke(status){
 field = document.getElementById('input_searchfield_ike');
 if (status == 'focus'){
  field.value = '';
 }
}

function calculateLease(id){
	var url = '/get_lease.asp';
	new Ajax.Request(url, {
		method: 'post',
		parameters: { q: id },
		onSuccess: function(transport) {
			if (transport.responseText != "500") {
				textStr = transport.responseText.split(";")
				document.getElementById('factor').innerHTML = textStr[1];
				document.getElementById('totaal').innerHTML = textStr[2];
			}
		},
		onFailure: function(transport) {
			//alert("Foutmelding!");
			//alert(transport.responseText);
		}
	});
}

function priceonly(){
	if ((event.keyCode<48&&event.keyCode!=44&&event.keyCode!=45)||event.keyCode>57)
	return false
}


function getMachineFilter(){
	document.forms['frmFilter'].submit();
}


function showFilterInfo(id){
	if ($(id)) {
		$(id).show();
	}
}

function hideFilterInfo(id){
	if ($(id)){
		$(id).hide();
	}
}


