function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}
//simplePreload( '/sarin/images/topNav/btn-booking-on.png', '/sarin/images/topNav/btn-charges-on.png', '/sarin/images/topNav/btn-gallery-on.png', '/sarin/images/topNav/btn-gettinghere-on.png', '/sarin/images/topNav/btn-home-on.png' );

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height, other) {
  if(popUpWin) {
	  if(!popUpWin.closed) popUpWin.close();
  }
  var winleft = (screen.width - width) / 2;
  var winUp = (screen.height - height) / 2;
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,'+other+',resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+winleft+', top='+winUp+',screenX='+winleft+',screenY='+winUp+'');
}

var prevClass
function mouseColours(id, action, classname) {
	if (action == "over") {
			prevClass = classname;
			document.getElementById(id).className = "mouseover";
		}else{
			document.getElementById(id).className = prevClass;
	}
}

function clientAction(clientId,action) {
	document.location.href='admin_clients.asp?pageAction='+action+'&clientId='+clientId;
}

function uploadWin(wkType,wkId) {
	popUpWindow('Upload-Base.asp?wkType='+wkType+'&wkId='+wkId, 0, 0, 370, 320,'scrollbars=yes');
}

function utilityWin(action,id) {
	popUpWindow('admin_utility.asp?action='+action+'&id='+id, 0, 0, 100, 100,'scrollbars=no');
}

function jumpTo(id) {
	if (document.getElementById(id).value > "") {
		document.location.href = document.getElementById(id).value;
	}
}

function reloadURL(id,value) {
	var url=document.location;
	alert(url.search)
	if (url.search.length > 2) {
		url = url.replace(url.search,'dc');
	alert(url)
	}
	var checked=document.getElementById(id).checked;
	//document.location.href = url+"?"+id+"="+checked;
}

//function jumpTo(id) {
//	if (document.getElementById(id).value > "") {
//		popUpWindow(document.getElementById(id).value, 0, 0, 600, 650);
//	}
//}

function deleteBooking(id) {
	var answer = confirm("Delete Booking now?");
	if (answer) {
		bookingAction(id,'','delete');
	} else {
		return false;
	} 
}


function unHide(id) {
	document.getElementById(id).style.display = "inline";
}

function reHide(id) {
	document.getElementById(id).style.display = "none";
}

function chandelier(src) {
	document.getElementById('chandelierImg').src = src;
}



window.addEvent('domready', function(){
	var list = $$('#clientList li a');
	list.each(function(element) {
		
		var fx = new Fx.Styles(element, {duration:200, wait:false});
		
		element.addEvent('mouseover', function(){
			fx.start({
				'margin-left': 5,
				'color': '#E97F24'
			});
		});
		
		element.addEvent('mouseout', function(){
			fx.start({
				'margin-left': 0,
				'color': '#fff'
			});
		});
		
	});

window.addEvent('load', function() {
	document.getElementById('galleryGlass').style.display = "";
});

/*	var myGallery = new gallery($('myGallery'), {
	timed: true
	});
*/
//setTimeout('chandelier("images/chandelier-on.png")', 700); 

}); 

