/* Create a new XMLHttpRequest object to talk to the Web server */
var xmlHttp = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
@end @*/

if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}
var toggleNav = 0;
function toggleNavigation(){
	if(toggleNav == 0){
		new Fx.Styles('h_nav_dropdown', {duration: 600, transition: Fx.Transitions.backInOut}).start({'opacity':[0,.90],'height':[300]});
		toggleNav=1;
	}else{
		new Fx.Styles('h_nav_dropdown', {duration: 600, transition: Fx.Transitions.backInOut}).start({'opacity':[.90,0],'height':[0]});
		toggleNav=0;
	}
}
function submitEnter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   myfield.form.submit();
   return false;
   }
else
   return true;
}

function rollover(id, action){
	if(action == 'on'){
		$(id).src="http://"+window.location.hostname+"/assets/public/images/template/buttons/"+id+"_over.gif";
	}else{
		$(id).src="http://"+window.location.hostname+"/assets/public/images/template/buttons/"+id+".gif";
	}
}

function rollover_gallery(id, action){
	if(action == 'on'){
		$(id).src="http://"+window.location.hostname+"/assets/public/images/gallery/categories/"+id+"_over.jpg";
	}else{
		$(id).src="http://"+window.location.hostname+"/assets/public/images/gallery/categories/"+id+".jpg";
	}
}