<!--//

//var dateNow;
//dateNow = new Date();
//window.status = '(C) 2001-200' + dateNow.year() + ' Cyber-GATE.nl'
window.status = '(C) 2007 Cyber-GATE.nl' //$CUSTOMIZE_THIS$

function ZoomImage(strURL, sWindowName)
{
strURL = strURL.toUpperCase();
//strURL = strURL.replace('.JPG','_l.jpg')
//strURL = strURL.replace(' ','%20')
window.open(strURL,sWindowName,'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,left=30,top=30,width=700,height=500');
}

function ShowFlash(strFlashName, sWindowName)
{
window.open('../_xsl/scripts/showflash.asp?flashfile=' + strFlashName,sWindowName,'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,left=30,top=30,width=500,height=320');
}


function OpenWindow(strURL, sWindowName, iWidth, iHeight, iTop, iLeft)
{
window.open(strURL,sWindowName,'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,left=' + iLeft + ',top=' + iTop + ',width=' + iWidth + ',height=' + iHeight);
}

function toggleCheckboxes()
{
  for (var i = 0; i < document.report.elements.length; i++) {
    if(document.report.elements[i].type == 'checkbox'){
      document.report.elements[i].checked =         !(document.report.elements[i].checked);
    }
  }
}

function CGT_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.CGT_p) d.CGT_p=new Array();
    var i,j=d.CGT_p.length,a=CGT_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.CGT_p[j]=new Image; d.CGT_p[j++].src=a[i];}}
}

function CGT_swapImgRestore() { //v3.0
  var i,x,a=document.CGT_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function CGT_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=CGT_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function CGT_swapImage() { //v3.0
  var i,j=0,x,a=CGT_swapImage.arguments; document.CGT_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=CGT_findObj(a[i]))!=null){document.CGT_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function CGT_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function CGT_displayStatusMsg(msgStr)  { //v3.0
	//if (msgStr==''){msgStr='(C) 2001-200' + dateNow.Year() + ' Cyber-GATE.nl';}
	status=(msgStr); document.CGT_returnValue = true;
}
function checkEmail(field)
{
   var sEmail = field;
   var iEmaillength = sEmail.length;
   var txtReturn = '';

   if ( iEmaillength > 0 )
			   
   {
      var iAtpos = sEmail.indexOf('@');

      if (iAtpos < 1)
      {
         // a.b of @a.bc
         //txtReturn = '\nFormaat emailadres is onjuist. Er staat niets voor het "@" teken of het  "@" teken ontbreekt. Correct: "x@x.x"'
         return false;
      } else
      {
         var iLastdotpos = sEmail.lastIndexOf('.');
			         
         if (sEmail.lastIndexOf('@') != iAtpos)
         {
            // a@@b.c
           // txtReturn = '\nFormaat emailadres is onjuist. Er komen meerdere "@" tekens in voor. Correct: "x@x.x"'
           return false;
         } else if ( (iLastdotpos < iAtpos) || (iLastdotpos == (iEmaillength - 1)) )
         {
            // a.b@c, a@b of a@b.c.
            //txtReturn = '\nFormaat emailadres is onjuist. Verkeerde lokaties van "." tekens. Correct: "x@x.x"'
            return false;
         } else if (sEmail.indexOf('.',iAtpos) <= iAtpos+1)
         {
            // a@.b.c
            //txtReturn = '\nFormaat emailadres is onjuist. Verkeerde lokaties van "." tekenst. Correct: "x@x.x"'
            return false;
         }
      }
   }
			   
   //return txtReturn;
   return true;
}
			
			
function trimSpaces(field)		
{
   while (''+field.value.charAt(field.value.length-1)==' ')
      field.value=field.value.substring(0,field.value.length-1);
   while (''+field.value.charAt(0)==' ')
      field.value=field.value.substring(1,field.value.length);
}




//-->

