// JavaScript Document

function updateResponseDiv(req) 
{
  Spry.Utils.setInnerHTML('response', req.xhRequest.responseText);
}

function fadeIt(ele,url){
document.getElementById(ele).innerHTML = '<div id="throbber"><img align="middle" src="images/ajax-loader.gif"/></div>';
	//Spry.Effect.DoFade('content_',{ duration: 400, from: 100, to: 0, finish: function() {
		Spry.Utils.updateContent(ele, url, function() {
		$.piroBox_ext == null;
		$.piroBox_ext({
	piro_speed :500,
	bg_alpha : 0.8,
	piro_scroll : true,
	piro_drag : false,
	piro_nav_pos: 'bottom'
});
			//Spry.Effect.DoFade('content_',{ duration: 400, from: 0, to: 100 });
		});
 // }
 //});
}

// handle form submit & validate
function SendForm(form) {
   var theForm = typeof form != 'object' ? document.getElementById(form): form;
   var ret = Spry.Widget.Form.validate(theForm);
   if (ret) {
   Spry.Utils.updateContent('recaptcha_div', '<img src="images/ajax-loader.gif"/>')
      Spry.Utils.submitForm(theForm, updateResponseDiv);
	  Spry.Utils.setInnerHTML('recaptcha_div','<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" />');
   }
   return false;
   }


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

