var popCtimer = 0;

function showCpop(){
  if (document.getElementById) {
    var popcer=document.getElementById("msg_pop");
    popcer.style.display = 'block';
		var startX = 0, startY = 0;
  	var d = document;
  	function ml(id)
  	{
  		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
  		if(d.layers)el.style=el;
  		el.sP=function(x){ this.style.left=x; };
  		el.x = startX;
  		return el;
  	}
  	window.stayTopLeft=function()
  	{
  	  var pX = showCCwinsize("w");
  	  ftlObj.x += (pX/2 - startX - ftlObj.x -235);
  		ftlObj.sP(ftlObj.x);
  		popCtimer = setTimeout("stayTopLeft()", 10);
  	}
  	ftlObj = ml("window_message_form");
  	stayTopLeft();
	}
}

function showCCwinsize(ret) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  if (ret=="w") return myWidth;
  else if (ret=="h") return myHeight;
}


function hideCpop(){
  if (document.getElementById) {
    var cell = document.getElementById("window_message_form");
    if ( cell.hasChildNodes() )
    {
        while ( cell.childNodes.length >= 1 )
        {
            cell.removeChild( cell.firstChild );       
        } 
    }
		document.getElementById("msg_pop").style.display = 'none';
		clearTimeout (popCtimer);
	}
}

function mReplyCleanAtt(){
  if (document.getElementById) {
    var cell = document.getElementById("fatt_list");
    cell.innerHTML='';
    return;
    if ( cell.hasChildNodes() )
    {
        while ( cell.childNodes.length >= 1 )
        {
            cell.removeChild( cell.firstChild );       
        } 
    }
	}
}

