defaultStatus = "ELPENOR - Home of the Greek Word";

var title = document.title
var loc = document.location
function sendit(){
document.write ('<a href="mailto:?subject=' + title + '&body=' + loc + '">Mail a friend</a>')
}
function bmark(){
document.write ('<a rel="follow" title="Share and Enjoy" href="http://www.ellopos.net/elpenor/social.asp?doctitle=' + title + '&docurl=' + loc + '">Digg, StumbleUpon etc</a>')
}
function adfav() {
document.write ('<a title="Firefox users press Ctrl + D" href="javascript:window.external.AddFavorite(\'' + loc + '\',\'' + title + '\')"><img src="http://www.elpenor.org/elpbmrk.gif" border="0">Bookmark this page to read later</a>')
}
function emailCheck (emailStr) {
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("Email address seems incorrect. Please check your spelling")
	return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null) {
    alert("The username doesn't seem to be valid.")
    return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
	        alert("Destination IP address is invalid!")
		return false
	    }
    }
    return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
	alert("The domain name doesn't seem to be valid.")
    return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>4) {
   alert("The address must end in a four-letter domain, or two letter country.")
   return false
}
if (len<2) {
   var errStr="This address is missing a hostname!"
   alert(errStr)
   return false
}
}

   var cookie = "Elpenor";
function popup(){
if (getcookie(cookie)==""){
openpopup();
setcookie();
}
}
function openpopup() {
window.open("http://www.ellopos.net/elpenor/koinonia/policy.asp","Elpforum","toolbar=yes,menubar=yes,location=No,scrollbars=yes,resizable=Yes,status=yes,width=530,height=280,left=250,top=200").blur(); window.focus();
}
function getcookie(cookieName) {
var id = cookieName + "=";
var cookievalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(id);
if (offset != -1) {
cookievalue = "x";
}
}
return cookievalue;
}

function setcookie () {
document.cookie = cookie
+ "="
+ escape ("done");
}

