function clearInput(id,defaultVal){
	var id;
	var defaultVal;
	if ($(id).value == defaultVal) {
		$(id).value = '';
	};
}

function checkInput(id,defaultVal,errMsg){
	var id;
	var defaultVal;
	var errMsg;
	if ($(id).value == defaultVal || $(id).value == '') {
		window.alert(errMsg);
		$(id).value = '';
		return false;
	};
	return true;
}

function showPopup(){
	var popPosleft = (window.innerWidth - 567) / 2;
	var newHeight = window.innerHeight + 100;
	$('popup').style.left = "" + popPosleft + "px";
	$('popup').style.zIndex = "10000";
	$('shadow').style.height = "100%";
	$('shadow').style.zIndex = "9999";
	$('player1').hide();
	new Effect.Parallel([
		new Effect.Appear('shadow',{sync:true,from:0.0,to:0.8}),
		new Effect.Appear('popup',{sync:true}),
	], {
	});
}

function hidePop(){
	$('player1').show();
	$('shadow').hide();
	$('popup').hide();
}

function quickUpdate(target,url,loader){
	var target;
	var url;
	var loader;
	new Ajax.Updater(
		target,
		url, 
		{
			asynchronous:true, 
			evalScripts:true, 
			onComplete:function(request, json) {
				if (loader != '') {
					$(loader).hide();
				};
				Effect.Appear(target);
				},
			onLoading:function(request) {
				if (loader != '') {
					$(loader).show();
				};
				$(target).hide();
				}, 
			requestHeaders:['X-Update', target]
		}
	);
}
