function init() {
	$('province').onchange = function () {
		if ($('province').selectedIndex < 14)
		{
			$('country').selectedIndex = 0;	
		}
		else
		{
			$('country').selectedIndex = 1;
		}
	}
	
	$('billtoprovince').onchange = function () {
		if ($('billtoprovince').selectedIndex < 14)
		{
			$('billtocountry').selectedIndex = 0;	
		}
		else
		{
			$('billtocountry').selectedIndex = 1;
		}
	}
	

	var billtoslide = new Fx.Slide('billtoinfo');
	billtoslide.hide();

	$('billtofalse').addEvent('click', function(){
		billtoslide.toggle('vertical');
		});


	$('billtotrue').addEvent('click', function(){
		billtoslide.hide();
		});

	var additional_subscribers = new Fx.Slide('additional_subscribers');
	additional_subscribers.hide();

	$('cgpr').addEvent('click', function(){
		additional_subscribers.toggle('vertical');
		});

doPopups();
}

function doPopups() {
  if (!document.getElementsByTagName) return false;
  var links=document.getElementsByTagName("a");
  for (var i=0; i < links.length; i++) {
    if (links[i].className.match("popup")) {
      links[i].onclick=function() {
        window.open(this.href, "", "");
        return false;
      }
    }
  }
}

window.onload = function () {
	init();	
}

