
var _dialogPromptID=null;
var _blackoutPromptID=null;
var page_ = '';
///////////////////////////////////////////////////////////

function promp(page_,FONC) {

that=this;

   var _isIE7=true;

   this.wrapupPrompt = function (cancled) {
    if (_isIE7) {
         _dialogPromptID.style.display='none';
         _blackoutPromptID.style.display='none';
      }
      return false;
   }

var myWidth = 0, myHeight = 0;
									  if( typeof( window.innerWidth ) == 'number' ) {
										//Non-IE
										myWidth = window.innerWidth;
										myHeight = window.innerHeight;
									  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
										//IE 6+ in 'standards compliant mode'
										myWidth = document.documentElement.clientWidth;
										myHeight = document.documentElement.clientHeight;
									  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
										//IE 4 compatible
										myWidth = document.body.clientWidth;
										myHeight = document.body.clientHeight;
									  }


   if (_isIE7) {
      // If this is MSIE 7.0 then...
      if (_dialogPromptID==null) {
         // Check to see if we've created the dialog divisions.
         // This block sets up the divisons
         // Get the body tag in the dom
         var tbody = document.getElementsByTagName("body")[0];
         // create a new division
         tnode = document.createElement('div');
         // name it
         tnode.id='IEPromptBox';
         // attach the new division to the body tag
         tbody.appendChild(tnode);
         // and save the element reference in a global variable
         _dialogPromptID=document.getElementById('IEPromptBox');
         // Create a new division (blackout)
         tnode = document.createElement('div');
         // name it.
         tnode.id='_blackoutPromptID';
         // attach it to body.
         tbody.appendChild(tnode);
         // And get the element reference
         _blackoutPromptID=document.getElementById('_blackoutPromptID');
         // assign the styles to the blackout division.
		 _blackoutPromptID.name = '_blackoutPromptID';
         _blackoutPromptID.style.opacity='.9';
         _blackoutPromptID.style.position='absolute';
         _blackoutPromptID.style.top='0px';
         _blackoutPromptID.style.left='0px';
         _blackoutPromptID.style.backgroundColor='#555555';
         _blackoutPromptID.style.filter='alpha(opacity=50)';
         _blackoutPromptID.style.zIndex='50';
         // assign the styles to the dialog box
      }
     _dialogPromptID.style.border='1px solid #FFFFFF';
				_dialogPromptID.style.paddingTop='15px';
				//_dialogPromptID.style.borderTop='10px solid #FFFFFF';
				_dialogPromptID.style.backgroundColor='#DDDDDD';
				_dialogPromptID.style.position='absolute';
				_dialogPromptID.style.zIndex='100';
		 		_dialogPromptID.style.top='20px';
     			_dialogPromptID.style.left='40px';
				var myHeight = myHeight -80;
				_dialogPromptID.style.height= myHeight + 'px';
				var width = myWidth -80;
				_dialogPromptID.style.width=width+'px';
	 			_dialogPromptID.style.display='block';
      _blackoutPromptID.style.width='120%';
	  _blackoutPromptID.style.height= '120%';/*(document.body.offsetHeight<screen.height) ? screen.height+'px' : document.body.offsetHeight+20+'px'; */		
	  _blackoutPromptID.style.display='block';
      // Insert the tmp HTML string into the dialog box.
      // Then position the dialog box on the screen and make it visible.
	  
	  content = document.createElement('div');
	  content.id = 'content';
	  content.style.backgroundColor='#DDDDDD';
         // name it.
         // attach it to body.
		 	divcroix = document.createElement('div'); 
			divcroix.style.backgroundColor='#DDDDDD';
		 	divcroix.className = 'divcroix';
		 	croix=document.createElement('img'); 
			croix.id = 'prompimgclose';
		 	croix.src='images/close.png';
			croix.onclick = function(){that.wrapupPrompt(true);_dialogPromptID.innerHTML='';rafraich();}
		 	divcroix.appendChild(croix);
			_dialogPromptID.innerHTML='';
		 	_dialogPromptID.appendChild(divcroix);
         	_dialogPromptID.appendChild(content);
		
	  ajax(page_+'&promp=ok&myHeight='+myHeight,content,''); 
      // Give the dialog box's input field the focus.
      //document.getElementById('iepromptfield').focus();
   } 
   
   if(FONC){eval(FONC)}
}