

function roll_over(img_name, img_src)
   {
   document[img_name].src = img_src;
   }
   
function confirmation_cat(mit,hova,url) {
	var answer = confirm('Törli a(z) '+mit+' kategóriát és az összes terméket a kategórián belül?');
	if (answer){
		document.location.href = "delete-category.php?id="+hova+"&url="+url;
	}
}

function confirmation_pic(mit,hova,url) {
	var answer = confirm('Törli a(z) '+mit+' képet?');
	if (answer){
		document.location.href = "delete-picture.php?id="+hova+"&url="+url;
	}
}

function confirmation(mit,hova,url) {
	var answer = confirm('Törli a(z) '+mit+' terméket?');
	if (answer){
		document.location.href = "delete-product.php?id="+hova+"&url="+url;
	}
}

function confirmation_no_url(mit,hova) {
	var answer = confirm('Törli a(z) '+mit+' terméket?');
	if (answer){
		document.location.href = "delete-product.php?id="+hova;
	}
}


function confirmation_half(mit,hova) {
	var answer = confirm('Törli a(z) '+mit+' félkész terméket?');
	if (answer){
		document.location.href = "delete-half-product.php?id="+hova;
	}
}

function search(){
	var search_for = document.getElementById('search_for').value;
	var myNewString = search_for.replace(' ','+');
	var myNewString = search_for.replace(' ','+');
	var myNewString = search_for.replace(' ','+');
	var myNewString = search_for.replace(' ','+');
	var myNewString = search_for.replace(' ','+');
	document.location.href = "search-results.php?terms="+myNewString;
}


