

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');	
	document.getElementById(uid).style.zIndex=6000;

	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_searching(){

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

        //create the alert
        w = 450;
        h = 151;
        uid = 'searchmsg-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');
	document.getElementById(uid).style.zIndex=5000;

        mDivInnerHTML(uid,'<img src="/gfx/searching.gif" alt="searching...">');


}



function close_searching(){
        uid = 'searchmsg-xaetad';
        mRemoveDiv(uid);
        close_blankout();

}




