/*
$.post('aboutus_option.html',null,function(response){
	html = '<div id="aboutus_option">'+response+'</div>';
	$(subpage).append(html);
	$(containers).slideUp(500);
	$('.abouts_close').click(function(){
		aboutus.closeoption();
	});
});*/
var showloading = function(){
	//$.md({modal:"#loading"});
	$("#loading").show();
};
var closeloading = function(){
	$("#loading").hide();
};
var ajax = function(method,postdata,type,callback){
	$.ajax({type: "post",dataType : type,
		url: API,data:'method='+method+'&'+postdata,
		beforeSend: function(){
			showloading();
		},
		success: function (response) {
			closeloading();
			callback(response);
		}, 
		error:function(x,e){
			alert('Prosa Site Message:\n'+x+'\n'+e);
		}
	});
};
var scroll = function(obj,bgType){
	$(obj).jscroll({
	   W:"19px"
	  ,BgUrl:"url(user/images/s_bg"+bgType+".gif)"
	  ,Bg:"right 0 repeat-y"
	  ,Bar:{Pos:"up"
			,Bd:{Out:"#373737",Hover:"#373737"}
			,Bg:{Out:"-114px 0 repeat-y",Hover:"-132px 0 repeat-y",Focus:"-152px 0 repeat-y"}
			,Bg2:{Out:"-57px 0 repeat-y",Hover:"-76px 0 repeat-y",Focus:"-95px 0 repeat-y"}
			,Bg3:{Out:"-57px -8px repeat-y",Hover:"-76px -8px repeat-y",Focus:"-95px -8px repeat-y"}}
			,Btn:{btn:true
				  ,uBg:{Out:"0 0",Hover:"-19px 0",Focus:"-38px 0"}
				  ,dBg:{Out:"0 -19px",Hover:"-19px -19px",Focus:"-38px -19px"}}
	  ,Fn:function(){}
	 });
};

var sleep = function(n){
	var start=new Date().getTime();
	while(true) if(new Date().getTime()-start> n) break;
};
