function echeck(str) {
    var at = "@";
    var dot = ".";
    var lat = str.indexOf(at);
    var lstr = str.length;
    var ldot = str.indexOf(dot);
    if (str.indexOf(at) == -1) {
	return false;
    }
    if ((str.indexOf(at) == -1) || (str.indexOf(at) == 0) || (str.indexOf(at) == lstr)) {
	return false;
    }
    if ((str.indexOf(dot) == -1) || (str.indexOf(dot) == 0) || (str.indexOf(dot) == lstr)) {
	return false;
    }
    if (str.indexOf(at,(lat+1)) != -1) {
	return false;
    }
    if ((str.substring(lat-1,lat) == dot) || (str.substring(lat+1,lat+2) == dot)) {
	return false;
    }
    if (str.indexOf(dot,(lat+2)) == -1) {
	return false;
    }
    if (str.indexOf(" ") != -1) {
	return false;
    }
    return true;			
}

function right(e) {
    if ((navigator.appName == "Netscape" && e.which == 3) || (navigator.appName=='Microsoft Internet Explorer' && event.button == 2)) {
	alert('No Copying from this Web Page.\nAll Rights Reserved\n\251 NETSYS Limited');
	return false;
    }
    else {
	return true;
    }
}

function rightSilent(e) {
    return false;
}

function trap() {
    if (document.images) {
	for (i = 0; i < document.images.length; i++) {
	    document.images[i].onmousedown = right;
	    document.images[i].oncontextmenu = rightSilent;
	}
    }
}

function pop_image(src,pid,w,h,ct,fsize,caption) {
    pop_photo = window.open('/resources/pop_image.php?src=' + src + '&id=' + pid + '&w=' + w + '&h=' + h + '&ct=' + ct + '&size=' + fsize + '&caption=' + caption,'pop_photo','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=' + w + ',height=' + h);
    pop_photo.focus();
}

function pop_window(a,w,h,v) {
    if (a == 1) {
	whois = window.open('/netsys/whois.php?type=employee&userid=' + v + '&w=' + w + '&h=' + h,'whois','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=' + w + ',height=' + h);
    }
    else if (a == 2) {
	whois = window.open('/netsys/whois.php?type=companies&contractno=' + v + '&w=' + w + '&h=' + h,'whois','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=' + w + ',height=' + h);
    }
    else {
	alert('There appears to be an issue with this link.');
    }
}
