/**
 * @author Samsung
 */

function DimBg(dim_id, view_id){
	this.dimObj = dim_id;
	this.viewObj = view_id
    this.flag_ShowState=false;
	
	this.SetBgRect();
	this.SetBgImage();
	this.hide();
 }

DimBg.prototype.show = function(){
     
	 alert("DimBg.prototype.show()");
	 $("#"+this.dimObj).css("display","block");
     this.flag_ShowState=true;
}

DimBg.prototype.hide = function(){
	alert("DimBg.prototype.hide()");
	  $("#"+this.dimObj).css("display","none");
     this.flag_ShowState=false;
}

DimBg.prototype.SetBgRect = function()
{
	alert("DimBg.prototype.SetBgRect()");
		
	var view_z_index = $("#"+ this.viewObj).css('z-index');
	view_z_index--;
	var c_z_index = String(view_z_index);
	alert("DimBg.prototype.SetBgRect() c_z_index -> " + c_z_index);
	$("#"+ this.dimObj).css('z-index', c_z_index);
}

DimBg.prototype.SetBgImage=function(){
	//alert("DimBg.prototype.SetBgImage()");
	if(WndMgr.Bg_Dim != null)
	{
		$("#"+ this.dimObj).css('background-image', 'url('+WndMgr.Bg_Dim.src+')');
	}
	else
	{		
		$("#"+ this.dimObj).css('background-image', 'url('+g_Image.IMAGE_POPUP_DIM_BG+')');
	}
    
}

