function in_alert (text){
	
	over1=document.createElement('div');
	over1.id="overlay";
	overbg=document.createElement('div');
	overbg.id="overlay_bg";
	
	over1.style.position='absolute';
	over1.style.top='0px';
	over1.style.left='0px';
	over1.style.width='100%';
	over1.style.height='100%';
	over1.style.zIndex='100';
	overbg.style.width='100%';
	overbg.style.height='200%';
	overbg.style.zIndex='201';
	overbg.style.background='#000000';
	
	/*if(navigator.appName.substring(0,4) == "Micr"){
		document.getElementById('page').appendChild(over1);
	}else{*/
		document.body.appendChild(over1);
	//}
	over1.appendChild(overbg);
	
	popupi=document.createElement('div');
	popupi.id="Alert";
	popupi.style.opacity='0';
	over1.appendChild(popupi);
	popupi.style.position='absolute';
	popupi.style.width='300px';
	popupi.style.height='130px';
	popupi.style.padding='10px';
	popupi.style.border='1px solid #a00000';
	popupi.style.background='#400000';
	popupi.style.textAlign='center';
	
	img=document.createElement('img');
	img.id="img_";
	img.src='app/themes/default/images/logo.png';
	img.alt="This is image";
	popupi.appendChild(img);
	
	div1=document.createElement('div');
	div1.style.width='280px';
	div1.style.height='80px';
	div1.style.paddingTop='10px';
	div1.innerHTML=text;
	popupi.appendChild(div1);
	
	a1=document.createElement('a');
	a1.href="#";
	a1.innerHTML="Close";
	a1.style.padding='5px 20px 5px 20px';
	a1.style.border='1px solid #a00000';
	a1.style.background='#800000';
	a1.style.color='fff';
	a1.style.fontSize='12px';
	a1.style.textDecoration='none';
	
	
	popupi.appendChild(a1);
	a1.onclick=closePopup;
	//br=document.createElement('br');
	//popupi.appendChild(br);	
	
	
	if(navigator.appName.substring(0,4) == "Micr"){ //alert('micr');
		pi=document.getElementById('Alert');
		pi.style.top="430px";
		pi.style.left=(document.body.clientWidth/2-pi.clientWidth/2-10)+"px";
		pi.style.filter="alpha(opacity=100)";		
		overbg.style.filter="alpha(opacity=60)";		
	}else if(navigator.appName.substring(0,4) == "Nets"){ //alert('nets');
		pi=document.getElementById('Alert');
		//pi.style.top=(window.innerHeight/2-pi.clientHeight/2-10)+"px";
		pi.style.top="430px";
		pi.style.left=(document.body.clientWidth/2-pi.clientWidth/2-10)+"px";
		overbg.style.opacity='0.6';
		pi.style.opacity='1';
	}else{ //alert('oper');
		pi=document.getElementById('Alert'); 
		//pi.style.top=(window.outerHeight/2-pi.clientHeight/2-10)+"px";
		pi.style.top="430px";
		pi.style.left=(document.body.clientWidth/2-pi.clientWidth/2-10)+"px";
		overbg.style.opacity='0.6';
		pi.style.opacity='1';
	}
	return false;
}
/*function ffFix(e){ 
	im=document.getElementById('img_');
	if(im.clientHeight==0 || im.clientHeight==0){
		to=setTimeout("ffFix()",10);
		return;
	}
	if(navigator.appName.substring(0,4) == "Micr"){// alert(1);
		pi=document.getElementById('Alert');
		pi.style.top="50px";
		pi.style.left=(document.body.clientWidth/2-im.clientHeight/2-10)+"px";
		pi.style.width=im.clientWidth+10+"px";
		pi.style.filter="alpha(opacity=100)";
		
	}else if(navigator.appName.substring(0,4) == "Nets"){
		pi=document.getElementById('Alert');
		pi.style.top=(window.innerHeight/2-im.clientHeight/2-10)+"px";
		pi.style.left=(document.body.clientWidth/2-im.clientWidth/2-10)+"px";
		pi.style.opacity='1';
	}else{
		popupi.style.top=(window.outerHeight/2-im.clientHeight/2-10)+"px";
		popupi.style.left=(document.body.clientWidth/2-im.clientWidth/2-10)+"px";
		popupi.style.opacity='1';
	}
}
*/
function closePopup(){
	o=document.getElementById('overlay');
	if(o!=null){
		document.body.removeChild(o);
	}
	return false;
}