function emailvalidation(entered, alertbox)
{
// E-mail Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
    with (entered)
    {
        apos=value.indexOf("@"); 
        dotpos=value.lastIndexOf(".");
        lastpos=value.length-1;
        if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
        { if (alertbox) {alert(alertbox);} return false;}
        else {return true;}
    }
} 

function formvalidation(thisform) {
    with (thisform)
    {
        if (emailvalidation(email,"invalid E-mail")==false) {email.focus(); return false;};
    }
} 


function doPic(imgName,text1) {
    imgOn = ("" + imgName);
    document.mainpic.src = imgOn;
    
    var name = text1;
    document.description.write(name);
}

function DocumentOnLoad() {

    function HideRolloverImage() {
        if (document.originalImages != null)
            for(var i=0;i < (document.originalImages.length-1);i+=2)
                document.originalImages[i].src = document.originalImages[i+1];
    }

    function ShowRolloverImage() {
        var i,j=0,objStr,obj,imgList=new Array,oldList=document.originalImages;
        for (i=0;i < (ShowRolloverImage.arguments.length-2);i+=3) {
            objStr = ShowRolloverImage.arguments[(navigator.appName=='Netscape')?i:i+1];
            if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
                (objStr.indexOf('document.all[')==0 && document.all==null))
                objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
            obj = eval(objStr);
            if (obj != null) {
                imgList[j++] = obj;
                imgList[j++] = (oldList==null || oldList[j-1]!=obj)?obj.src:oldList[j];
                obj.src = ShowRolloverImage.arguments[i+2];
            }
        }
        document.originalImages = imgList;
    }
    
}
