function donate()
	{
		var link_part1 = 'https://www.e-junkie.com/ecom/gb.php?c=cart&i=GPI';
		var link_part2 = '&cl=37009&ejc=2';
			
		var n = document.getElementById('ddl1'); 
		var ind = n.selectedIndex; 

		if (ind != 0 && n.options[ind].value != '0') 
		{ 
			var str = n.options[ind].value + ''; 
			
			window.open(link_part1 + str + link_part2);
		} 
		else 
		{ 
			if (ind == 0) 
				alert('Please select a donation amount'); 
			else  
				{
					var str = 'NYP';
					window.open(link_part1 + str + link_part2);
				} 
		}
	}
	
	function donate_physical()
	{
var link_part1 = 'https://www.paypal.com/cart/add=1&business=donations@ihcenter.org&item_number=Palast Investigates DVD&item_name=Palast Investigative Fund&amount='; 
		var link_part2 = '&currency_code=USD\',\'cart\',\'height=350,width=600,screenX=10,screenY=10,top=10,left=10,scrollbars=yes';
		
		var n = document.getElementById('ddl2'); 
		var ind = n.selectedIndex; 
		
		if (ind != 0 && n.options[ind].value != '0') 
		{ 
			var str = n.options[ind].value + '';
			window.open(link_part1 + str + link_part2); 
		} 
		else 
		{ 
			if (ind == 0) alert('Please select a donation amount!'); 
			else  
				{					
					var amountBox = document.getElementById('userAmount'); 
					
					var price = parseInt(amountBox.value);
					if(price < 50) 
					{
						alert('Because of high production costs, we ask for a minimum $50 donation!');
					}
					else 
					{
						window.open(link_part1 + price.toString() + link_part2);
					}						
					
				}
		}
	}
	
	function dll2_changed()
	{
		var n = document.getElementById('ddl2'); 
		var ind = n.selectedIndex; 
		
		var amountBox = document.getElementById('userAmount'); 
		
		if(ind != 0)
		{
			if (n.options[ind].value != '0') 
			{
				if(!amountBox.disabled) 
				{
					amountBox.disabled = true; 
				}		
				
				amountBox.value = n.options[ind].value;
			}
			else
			{		
				if(amountBox.disabled) 
				{
					amountBox.disabled = false; 
					amountBox.focus();
				}
			}
		}
		else 
		{
			amountBox.disabled = true; 
		}
		
	}	
	
	//---------------------------------------------
	
	function DefineDividorHeight(divID, leftItemID, rightItemID)
	{
		var dividor = document.getElementById(divID);
		var left = document.getElementById(leftItemID);
		var right = document.getElementById(rightItemID);
		
		//		alert(left.clientHeight + '   ' + right.clientHeight);
	
		if(left.clientHeight > right.clientHeight)
		{
			dividor.height = left.clientHeight;
		}
		else 
		{
			dividor.height = right.clientHeight;
		}
	}
	
	function DefineDividorHeightByElement(divID, ItemID)
	{
		var dividor = document.getElementById(divID);
		var item = document.getElementById(ItemID);
		//alert(item.clientHeight);
		if(dividor != null && item != null)
		{
			dividor.height = item.clientHeight;
		}	
	}

	//--------------------------------------- Menu Scripts ------------
	
	var widths = new Array();
	
	function defineWidths()
	{
		var i = 1; 
		
		while(document.getElementById('but' + i.toString()) != null)		
		{
			widths[i-1] = document.getElementById('but' + i.toString()).width;
		
			i++;
		}
	}	

	function ChangeButtonSizeY(buttonNum, incr)
	{
		var button = document.getElementById('but' + buttonNum.toString());		
		var width = widths[buttonNum -1];
		
		var size = incr + button.height;		
		button.height = size.toString();		

		button.style.width = width;		
	}	
	
	function GetBasicLocation(ext)
	{
		var loc = window.location.toString();
		
		var subLoc = "";
		
		if(loc.indexOf("?") != -1) 
		{
			var parts = loc.split("?");
			subLoc = parts[0];
		}
		else 
		{
			subLoc = loc; 
		}

		if(ext != "")
		{
			return subLoc + ext;
		}
		else
		{
			return subLoc;
		}
	}
	
	
	//------------------------------------- OnLoad ------
	
	window.onload = start;
	
	function start() 
	{
		DefineDividorHeightByElement('dividorBar', 'contentRow');
		defineWidths(); 
	}	
	


