// JavaScript Document

//fire this function after the DOM has loaded
/*document.observe("dom:loaded", function() {
  var url="xml/homeImages.xml";

  //load an xml document
  new Ajax.Request (url, {  
    method: 'get',  
    onSuccess: function (request) {
	  var xmlObj = request.responseXML; 
	  //alert(xmlObj.firstChild.childNodes[1].getAttribute("url"));
	  var imgID = Math.floor(Math.random()*xmlObj.getElementsByTagName("slide").length);
	  var imgURL = xmlObj.getElementsByTagName("slide")[imgID].getAttribute("location");
	  var imgString = "<img src='" + imgURL + "' alt = 'photo' />";
	  $('rotatingImages').insert(imgString);
	},
	onFailure: function(){ alert('could not load an xml file')},  
    onException: function(){ alert('error loading or parsing an xml file')}  
  });  
});*/

function gotoPageFromHome(form){
	var url = "default.html?issues=" + form.issues.options[form.issues.selectedIndex].value + "&amp;countries=" + form.countries.options[form.countries.selectedIndex].value;
	window.parent.location.replace(url);
	window.parent.Lightview.hide();
}