

function show_alert(msg,close){

	//create canvas that is dimmed out
	show_blankout();

	//create the alert
	w = 450;
	h = 151;
	uid = 'alertmsg-xaetad'; 
        mCreateDiv(uid);
	mDivBackgroundColor(uid,'#ffffff');
	mDivSize(uid,w,h);

	x = getScreenCenterX() - parseInt((w/2));
	y = getScreenCenterY() - parseInt((h/2));
	mDivPos(uid,y,x,'absolute');	

	if(close == 0){	
	closebtn = '<a style="text-decoration:none;font-size:20px;" href="javascript:close_alert();"><img src="/gfx/spacer.gif" height="20" width="50" border="0" /></a>';
	bgimg = 'alert-box.jpg';
	} else {
	closebtn = '';
	bgimg = 'alert-box-noclose.jpg';
	}

	mDivInnerHTML(uid,'<style>#alrtmsg-122 a {color:#94560c}</style><div style="background:url(/gfx/'+bgimg+');width:450px;height:151px"><div id="alrtmsg-122" style="color:#94560c;text-align:left;display:block;padding-left:65px;padding-top:70px;width:320px;height:70px;font-size:12px;font-weight:bold">'+msg+'</div><div style="position:absolute;top:0px;right:0px;width:50px;height:20px;">'+closebtn+'</div></div>');	


}



function close_alert(){
	uid = 'alertmsg-xaetad';


	mRemoveDiv(uid);
	close_blankout();
	
}

function show_blankout(){
        //create canvas that is dimmed out
        uid = 'blankout-xaetad'; // creates div we will use
        mCreateDiv(uid);
        mDivBackgroundColor(uid,'#ffffff');
        mDivOpacity(uid,50);
        mDivPos(uid,0,0,'fixed');
        mDivSizePercent(uid,100,100);
}

function close_blankout(){
        //create canvas that is dimmed out
        uid = 'blankout-xaetad'; 
        mRemoveDiv(uid);
}

function show_loader(msg){

        //create canvas that is dimmed out
        show_blankout();

        //create the alert
        w = 450;
        h = 151;
        uid = 'loader-xaetad';
        mCreateDiv(uid);
        mDivBackgroundColor(uid,'#ffffff');
        mDivSize(uid,w,h);

        x = getScreenCenterX() - parseInt((w/2));
        y = getScreenCenterY() - parseInt((h/2));
        mDivPos(uid,y,x,'absolute');


        mDivInnerHTML(uid,'<div style="border:1px solid #cccccc;width:450px;height:151px;"><div style="margin-top:55px;margin-left:60px;width:320px;height:40px;border-top:1px solid #cccccc;border-bottom:1px solid #cccccc"><div style="float:left;margin-top:12px;margin-left:5px;font-weight:bold;font-family:arial,helvetica,sans;font-size:14px;text-transform:upper">'+msg+'</div><div style="margin-top:12px;margin-right:5px;float:right;"><img src="/gfx/ajax-loader.gif"></div></div></div>');

}

function close_loader(){
        uid = 'loader-xaetad';
        mRemoveDiv(uid);
        close_blankout();
}


function show_searching(){

	show_loader('SEARCHING...');

}



function close_searching(){
	close_loader();
}






