function check_email(xx)
{
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
		
		if ( !filter.test(xx) )
		{
			alert( "Invalid email address" );
			return false;
		}

		return true;
}

function View(form,txt) {
msg=open("","DisplayWindow","width=500,height=300,status=1,scrollbars=1");
msg.document.write("<html><head>");
msg.document.write("<title>UAP Admin - Text preview </title>");
msg.document.write("<link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\">");
msg.document.write("<style>");
msg.document.write(" p {  text-align: justify} ")
msg.document.write("</style>");
msg.document.write("</head><body >");
msg.document.write("<table border=0><tr><td >");
msg.document.write("<p>");
msg.document.write(txt.value);
msg.document.write("</td></tr></table>");
msg.document.write("</body></html>");
}

function ViewTiny(form,txt) {
msg=open("","DisplayWindow","width=500,height=300,status=1,scrollbars=1");
msg.document.write("<html><head>");
msg.document.write("<title>UAP Admin - Text preview </title>");
msg.document.write("<link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\">");
msg.document.write("<style>");
msg.document.write(" p {  text-align: justify} ")
msg.document.write("</style>");
msg.document.write("</head><body >");
msg.document.write("<table border=1 cellpadding=0 cellspacing=0 width=\"162\"><tr><td >");
msg.document.write(txt.value);
msg.document.write("</td></tr></table>");
msg.document.write("</body></html>");
}


function AddText(form, Action, txtelem){
var AddTxt="";
var txt="";
if(Action==1){  
txt=prompt("Enter text for HEADER1.","Text");      
if(txt!=null)           
AddTxt="<h1>"+txt+"</h1>\r\n";  
}
if(Action==2){  
txt=prompt("Enter text for HEADER2.","Text");      
if(txt!=null)           
AddTxt="<h2>"+txt+"</h2>\r\n";  
}
if(Action==3) AddTxt="&nbsp;";  
if(Action==4) {  
txt=prompt("Enter text for BOLD","Text");     
if(txt!=null)           
AddTxt="<b>"+txt+"</b>";        
}
if(Action==5) {  
txt=prompt("Enter text for ITALIC","Text");     
if(txt!=null)           
AddTxt="<i>"+txt+"</i>";        
}
if(Action==6) AddTxt="\r\n<p>";
if(Action==7) AddTxt="<BR>\r\n";
if(Action==8) AddTxt="<hr>\r\n";
if(Action==9) {  
txt=prompt("URL for link","http://");      
if(txt!=null){          
AddTxt="<a href="+txt+">";              
txt=prompt("Text for link","Text");              
AddTxt+=txt+"</a>\r\n";         
   }
}
if(Action==10) { 
txt=prompt("Image URL","URL");    
if(txt!=null)           
AddTxt="<img src="+txt+">\r\n"; 
}

txtelem.value+=AddTxt;
}

function OpenWin(address) {    
	var op_tool  =  0;    
	var op_loc_box  =  0;    
	var op_dir  =  0;    
	var op_stat  =  0;    
	var op_menu  =  0;    
	var op_scroll  =  1;    
	var op_resize  =  0;    
	var op_wid  = 600;   
	var op_heigh = 580;                 
	var option = "toolbar="+ op_tool +",location="+ op_loc_box +",directories=" 
+ op_dir +",status="+ op_stat +",menubar="+ op_menu +",scrollbars="  
+ op_scroll +",resizable="  + op_resize +",width=" + op_wid +",height="+ op_heigh +",left=200,top=80";
	var win3 = window.open(address, "what_I_want", option);  
	//var win4 = window.open(address, "what_I_want");
}


function CategoriiPassText1(valoare) {
  document.forms[0].c_img.value = valoare;
}

function ProdusePassText1(valoare) {
  document.forms[0].p_img.value = valoare;
}

function ProdusePassText2(valoare) {
  document.forms[0].p_img1.value = valoare;
}

function NoutatiPassText1(valoare) {
  document.forms[0].n_img.value = valoare;
}

function NoutatiPassText2(valoare) {
  document.forms[0].n_img1.value = valoare;
}
function usure ( message, url ) {
	arethey = confirm(message)
	if (arethey) {location.href=url}
}