// ======= FUNCTIE CONVERSIE PRETURI IN EURO  ====================================================
function Convert (strPret, strMoneda)
{
	conversie = 36510/27818;

	if (strMoneda == "EURO" )
	{strPret = strPret * conversie;}

document.write('<input type=hidden name=PRICE value=' + strPret + '>');

}
// ================================================================================================



// ======= FUNCTIE PENTRU FEREASTRA POP-UP CU URL SI DIMENSIUNI SETABILE  =========================
function exec1(purl,w,h)
{
test=window.open(purl, "win","toolbar=no,scrollbars=no,resize=no,location=no,width="+w+",height="+h+",left=10,top=10");
test.focus();
//javascript:window.close()
}
// ================================================================================================




// ======= FUNCTIE INSERT CONTOR TRAFIC ===========================================================
function InsertFooterBanners()
{
document.write('<script type="text/javascript">trfc_cat="COMPUTERE";</script>');
document.write('<script type="text/javascript" src="http://omnitechro.l.t3.ro/log.js"></script>');

document.write('<script>t_rid="omnitechro";</script>');
document.write('<script src="http://storage.trafic.ro/js/trafic.js"></script>');
document.write('<noscript><a href="http://www.trafic.ro/top/?rid=omnitechro">');
document.write('<img src="http://log.trafic.ro/cgi-bin/pl.dll?rid=omnitechro"');
document.write(' border=0 alt="trafic ranking"></a></noscript>');
}
// ================================================================================================




// ======= FUNCTIE INSERT NEWSLETTER FORM ==========================================================
function InsertNewsForm()
{
document.write('<div class="roundedbox"><div class="boxtop"><div class="boxnw"></div><div class="boxne"></div></div><div align="center" class="boxcontent"><form name="NEWS_Form" action="http://www.cronosoft.com/cgi-bin/elist/ennyfrms.cgi" method="POST" onSubmit="return emailCheck(this)&&!(SUB_YET++)"><input type="hidden" name="frmNEWS" value="Comanda"><input type="hidden" name="thnx" value="http://www.omnitech.ro"><input type="hidden" name="opts" value="XT"><input type="hidden" name="mailto" value="office@omnitech.ro"><input type="hidden" name="A0Subject_h" value="Abonare Oferte">Inscrie-te pentru a primi prin e-mail noutatile si ofertele noastre de preturi:<br><br><input type="text" name="B2Email_h" size="20" maxlength="50">&nbsp;<input type="submit" value="ok" name="D2trimite_h"></form></div><div class="boxbottom"><div class="boxsw"></div><div class="boxse"></div></div></div>');
}
// ================================================================================================






// ======= FUNCTIE PENTRU VERIFICARE EMAIL ========================================================
function doupper(obj) 
{ 
obj.value=(((obj.value.substr(0,1)).toUpperCase())+obj.value.substr(1,obj.value.length)) 
} 

function emailCheck (_form) { 
emailObj=_form.B2Email_h;
emailStr = emailObj.value; 
if(emailStr == "") 
{ 
    alert ( "Va rugam introduceti adresa Dvs de email!" ); 
    return false; 
} 
var checkTLD=0; 
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/; 
var emailPat=/^(.+)@(.+)$/; 
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]"; 
var validChars="\[^\\s" + specialChars + "\]"; 
var quotedUser="(\"[^\"]*\")"; 
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/; 
var atom=validChars + '+'; 
var word="(" + atom + "|" + quotedUser + ")"; 
var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); 
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$"); 
var matchArray=emailStr.match(emailPat); 
if (matchArray==null) { 
alert("Adresa de email nu este corecta!"); 
return false; 
} 
var user=matchArray[1]; 
var domain=matchArray[2]; 
for (i=0; i<user.length; i++) { 
if (user.charCodeAt(i)>127) { 
alert("The Username Contains Invalid Characters."); 
return false; 
} 
} 
for (i=0; i<domain.length; i++) { 
if (domain.charCodeAt(i)>127) { 
alert("Adresa de email contine caractere invalide!"); 
return false; 
} 
} 
if (user.match(userPat)==null) { 
alert("The Username Is Invalid."); 
return false; 
} 
var IPArray=domain.match(ipDomainPat); 
if (IPArray!=null) { 
for (var i=1;i<=4;i++) { 
if (IPArray[i]>255) { 
alert("The Destination IP Address Is Invalid."); 
return false; 
} 
} 
return true; 
} 
var atomPat=new RegExp("^" + atom + "$"); 
var domArr=domain.split("."); 
var len=domArr.length; 
for (i=0;i<len;i++) { 
if (domArr[i].search(atomPat)==-1) { 
alert("The Domain Name Is Invalid."); 
return false; 
} 
} 
if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) { 
alert("The Domain Name Extension Is Invalid"); 
return false; 
} 
if (len<2) { 
alert("Adresa de email nu contine domeniul!"); 
return false; 
} 
} 
var SUB_YET=0; /* this keeps it from ever submitting after the first time*/
// ================================================================================================
