  
function isset(e) {
	if(typeof e =="undefined") return false;
	else return typeof e;
}

function redirect(url){
	if(!url) return;
	document.location.href = url;
}

var status = 'hidden';

function hideIt(e,obj, maxH){
	if(status=='shown'){
		obj.start({
					'height': [maxH, 0],
					'opacity': [1,0]
				});
				
		status='hidden';
	}
}

function showIt(e,obj, maxH){
	if(status=='hidden'){
		obj.start({
							'height': [0, maxH],
							'opacity': [0,1]
						});
		status='shown';
	}
}

function doUpdateVerify( url ) {
	new Request({
		method:'post',
		url:url,
		evalScripts:true,
		data:$('orderForm').toQueryString()
	}).send()
}

function attachCatMenu(id, maxH) {	
	if($("toggler-cat-" + id)){
		var catFX = new Fx.Morph("cat-" + id, {duration: 'short', transition: Fx.Transitions.Sine.easeOut});
		 $("toggler-cat-" + id).addEvent("mouseenter",function(e) {
	     	catFX.cancel();
		 	showIt(e,catFX, maxH);
	     });
	     $("toggler-cat-" + id).addEvent("mouseleave",function(e) {
	     	catFX.cancel();
			hideIt(e,catFX, maxH);
	     });
	}
}

