
function procEmail()
{

  if (!document.addForm.email.value)
  {
    alert('Please, enter your E-Mail address!');
    document.addForm.email.focus();
    return false;
  }
  else
  {
    a = document.addForm.email.value.indexOf('@');
    b = document.addForm.email.value.indexOf('@', a+1);
    c = document.addForm.email.value.lastIndexOf('.');
    if (c < a+1) { c = -1; }
    if (a == -1 || b != -1 || c <= a + 2 || a < 1 || c + 2 >= document.addForm.email.value.length || c + 4 < document.addForm.email.value.length)
    {
      alert('Please enter a valid E-Mail Address');
      document.addForm.email.focus();
      return false;
    }
  }

  return true;
}


//function open_csi_wnd(path,pic,w,h)

function OpenImage(path,pic,w,h)
{
var windowName='picw';
var scw=w;
var sch=parseInt(h)+55;
var nWindow = window.open("",windowName,"fullscreen=no,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no, screenX=0,screenY=0,Width="+scw+",Height="+sch);
nWindow.document.write('<HTML> <HEAD><TITLE>'+pic+'</TITLE> <STYLE> { box-sizing: border-box; moz-box-sizing: border-box } HTML { BACKGROUND: black; HEIGHT: 100% } BODY { BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; OVERFLOW: auto; COLOR: blue; MARGIN: 0px; PADDING-TOP: 0px; BORDER-RIGHT-WIDTH: 0px } </STYLE> </HEAD> <BODY bgcolor="#222222" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onLoad="this.focus()"> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"> <tr> <td valign="middle" align="center"> <img src="data/'+path+pic+'" width="'+w+'" height="'+h+'" border="0"> </td> </tr> </table> </BODY> </HTML>');
nWindow.document.close();
nWindow.resizeTo(scw,sch);
nWindow.focus();
}

function OpenVideo(id)
{
var windowName='vidw';
var scw=425;
var sch=350+47;
var nWindow = window.open("?page=video&id="+id,windowName,"fullscreen=no,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no, screenX=0,screenY=0,Width="+scw+",Height="+sch);
//nWindow.document.write('<HTML> <HEAD><TITLE>'+pic+'</TITLE> <STYLE> { box-sizing: border-box; moz-box-sizing: border-box } HTML { BACKGROUND: black; HEIGHT: 100% } BODY { BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; OVERFLOW: auto; COLOR: blue; MARGIN: 0px; PADDING-TOP: 0px; BORDER-RIGHT-WIDTH: 0px } </STYLE> </HEAD> <BODY bgcolor="#222222" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onLoad="this.focus()"> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"> <tr> <td valign="middle" align="center"> <img src="data/'+path+pic+'" width="'+w+'" height="'+h+'" border="0"> </td> </tr> </table> </BODY> </HTML>');
//nWindow.document.close();
nWindow.resizeTo(scw,sch);
nWindow.focus();
}


function OpenPrintPage(src)
{
var windowName='printpage';
var scw=600;
var sch=700;
var nWindow = window.open(src,windowName,"fullscreen=no,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=no, screenX=0,screenY=0,Width="+scw+",Height="+sch);
//nWindow.document.write('<HTML> <HEAD><TITLE>'+pic+'</TITLE> <STYLE> { box-sizing: border-box; moz-box-sizing: border-box } HTML { BACKGROUND: black; HEIGHT: 100% } BODY { BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; OVERFLOW: auto; COLOR: blue; MARGIN: 0px; PADDING-TOP: 0px; BORDER-RIGHT-WIDTH: 0px } </STYLE> </HEAD> <BODY bgcolor="#222222" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onLoad="this.focus()"> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"> <tr> <td valign="middle" align="center"> <img src="data/'+path+pic+'" width="'+w+'" height="'+h+'" border="0"> </td> </tr> </table> </BODY> </HTML>');
//nWindow.document.close();
nWindow.resizeTo(scw,sch);
nWindow.focus();
}

function OpenFacturaPage(src)
{
var windowName='facturapage';
var scw=800;
var sch=610;
var nWindow = window.open(src,windowName,"fullscreen=no,directories=no,location=no,menubar=no,scrollbars=no,status=yes,toolbar=no,resizable=no, screenX=0,screenY=0,Width="+scw+",Height="+sch);
//nWindow.document.write('<HTML> <HEAD><TITLE>'+pic+'</TITLE> <STYLE> { box-sizing: border-box; moz-box-sizing: border-box } HTML { BACKGROUND: black; HEIGHT: 100% } BODY { BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; OVERFLOW: auto; COLOR: blue; MARGIN: 0px; PADDING-TOP: 0px; BORDER-RIGHT-WIDTH: 0px } </STYLE> </HEAD> <BODY bgcolor="#222222" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onLoad="this.focus()"> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"> <tr> <td valign="middle" align="center"> <img src="data/'+path+pic+'" width="'+w+'" height="'+h+'" border="0"> </td> </tr> </table> </BODY> </HTML>');
//nWindow.document.close();
nWindow.resizeTo(scw,sch);
nWindow.focus();
}


function smenu(num)
{
 if(document.getElementById('smenu'+num).style.display=='') document.getElementById('smenu'+num).style.display='none'; else document.getElementById('smenu'+num).style.display='';
}

