// JavaScript Document
function delete_item(item_id){
	document.location.href='index.php?option=basket&action=remove&basket_item_id='+item_id;		
}

function delete_checkout_item(item_id){
	if(confirm("Do you really want to delete this item from shopping basket?")){
		document.location.href='index.php?option=checkout1&action=remove&basket_item_id='+item_id;		
	}
}

function empty_basket(){
	if(confirm("Do you really want to delete this shopping basket?")){
		document.location.href='index.php?option=basket&action=clear';		
	} 
}

function warranty_more_info(){
	if(document.getElementById('warranty_more_info').style.display == "block"){
		document.getElementById('warranty_more_info').style.display = "none";
	} else {
		document.getElementById('warranty_more_info').style.display = "block";
	}
	
	return;
}


// JavaScript Document
var t=0;
var time;
function move_up(div,amm) {
	var divTop = document.getElementById(div).style.top;
	if (t>-550){
		document.getElementById(div).style.top = t + "px";
		t=t-amm;
		time = window.setTimeout("move_up('scroller','2')",50);
	} else {
		window.clearTimeout(time);
	}
}
function move_down(div,amm) {
	var divTop = document.getElementById(div).style.top;
	if (t<0){
		document.getElementById(div).style.top = t + "px";
		k = amm;
		k = Number(k);
		t = t+k;
		time = window.setTimeout("move_down('scroller','2')",50);
	} else {
		window.clearTimeout(time);
	}
}

function stopani(ex) {
	if(ex=='exit'){
		window.clearTimeout(time);
	}
}
