var prices = new Array();
function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  return myHeight;
}

function set_page_height(){
	new_height = alertSize()-275;
	document.getElementById('page_height').height = new_height;
}

function go_back(){
history.go(-1);
}

function put_price(sel,disc){
	
	ind = (sel.options.selectedIndex);
	id = (sel.options[ind].value); 
	sub_total = parseFloat(document.getElementById('subtotal_price').innerHTML.substr(7)).toFixed(2);
	
	document.getElementById('transport_cost').innerHTML = '&euro;&nbsp;'+prices[id].toFixed(2);
	if(disc==-1){
	total_price1 = (parseFloat(sub_total)+parseFloat(prices[id])).toFixed(2);
	
	}else{
	discount = parseFloat(prices[id])-parseFloat(disc);
	if(discount<0)
		discount=0;
	document.getElementById('transport_discount').innerHTML = '-&nbsp;&euro;&nbsp;'+discount.toFixed(2);
	total_price1 = (parseFloat(sub_total)+parseFloat(prices[id])).toFixed(2)-parseFloat(discount).toFixed(2);
	}
	document.getElementById('total_price').innerHTML = '&euro;&nbsp;'+total_price1;
	
}