function go_to_store(link){
	if (link)
		//var string ='https://secure.element5.com/esales/cart.html?PRODUCT['+link+']=1&languageid=1&cookies=1&currencies=Lt';
		var string ='http://store.digitalriver.com/store/defender/en_US/AddItemToRequisition/productID.'+link+'/quantity.1/Currency.Lt/ThemeID.516300';
		
	else
		var string ='#';
	return string;
}

function addOption(object) {
	if (object.options.length != 3) {
		object.options.length = 0;
		object.options[0] = new Option("1 year",1);
		object.options[1] = new Option("2 year",2);
		object.options[2] = new Option("3 year",3);
	}
}

function dochangeprice(product){
	var add = true;
	var i = product;

	var users = document.getElementById('users'+product);
	var licence = document.getElementById('licence'+product);

	var j = users.value;

	if (j == 1){

		var index = licence.selectedIndex;
		licence.options.length = 0;
		licence.options[0] = new Option("1 year ",1);
		licence.options[1] = new Option("2 year ",2);
		licence.options[2] = new Option("3 year ",3);
		licence.selectedIndex = index;

		add = false;
	}

	if (j == 2){

		var index = licence.selectedIndex;
		licence.options.length = 0;
		licence.options[0] = new Option("2 year ",2);
		licence.options[1] = new Option("3 year ",3);
		licence.selectedIndex = index;

		add = false;
	}

	if (add){
		addOption(licence);
	}

	var k = licence.options[licence.selectedIndex].value;


	var price = document.getElementById('price' + product);
	if (pricelist[i][j][k]!=0)
		price.innerHTML = pricelist[i][j][k];
	else
		price.innerHTML = "Product not available";

	var buy_link = 'https://secure.avangate.com/order/checkout.php?PRODS='+i+'&OPTIONS'+i+'=h-'+j+'u-'+k+'y&QTY=1&LANG=EN&CURR=EUR&CART=1&REF=SEM';
	document.getElementById('buy_link').href = buy_link;

}


var pricelist = new Array();
var store_id = new Array();

pricelist[1734240]  = new Array();
pricelist[1734358]  = new Array();
pricelist[1734551]  = new Array();

//AV
pricelist[1734240][1] = new Array(0,'84,06 Lt','134,60 Lt','201,99 Lt');
pricelist[1734240][3] = new Array(0,'100,91 Lt','168,30 Lt','269,38 Lt');
pricelist[1734240][5] = new Array(0,'168,30 Lt','269,38 Lt','471,53 Lt');


//IS
pricelist[1734358][1] = new Array(0,'134,60 Lt','201,99 Lt','303,07 Lt');
pricelist[1734358][3] = new Array(0,'168,30 Lt','303,07 Lt','404,15 Lt');
pricelist[1734358][5] = new Array(0,'269,38 Lt','437,84 Lt','639,99 Lt');


//TS
pricelist[1734551][1] = new Array(0,'201,99 Lt','303,07 Lt','437,84 Lt');
pricelist[1734551][3] = new Array(0,'235,68 Lt','404,15 Lt','572,60 Lt');
pricelist[1734551][5] = new Array(0,'404,15 Lt','673,68 Lt','875,84 Lt');

