function fitWindowSize() {
    width = document.images[0].width + 50;
    height = document.images[0].height + 125;
    window.resizeTo(width, height);
    window.moveTo(10,10);
    window.focus();
}
function jumppage(sel)
{
  var i = sel.selectedIndex
  self.location.href = sel.options[i].value
}
function openGalleryWindow(url) {
    if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 800, yMax=600;

    var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
    var xOffset = 100, yOffset = 100;
    popupWin = window.open(url,'new_page','width=700,height=535,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=auto,toolbars=no,menubar=no,resizable=yes')
}
function validateForm(thisform)
{
    if (thisform.email.value.length>0)
    {
        i=thisform.email.value.indexOf("@");
        j=thisform.email.value.indexOf(".",i);
        k=thisform.email.value.indexOf(",");
        kk=thisform.email.value.indexOf(" ");
        jj=thisform.email.value.lastIndexOf(".")+1;
        len=thisform.email.value.length;
        if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) && (len-jj >=2) && (len-jj<=3))
        {
            return true;
        }
        else
        {
            alert("Please enter a valid email address.");
            thisform.email.focus();
            return false;
        }
    }
    else
    {
        alert("Please enter a valid email address.");
        thisform.email.focus();
        return false;
    }
}
function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart >opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart< opacEnd) {
        for(i = opacStart; i<= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}
//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}

function glowit(which){
if (document.all.glowtext[which].filters[0].strength==3)
document.all.glowtext[which].filters[0].strength=2
else
document.all.glowtext[which].filters[0].strength=3
}

function glowit2(which){
if (document.all.glowtext.filters[0].strength==3)
document.all.glowtext.filters[0].strength=2
else
document.all.glowtext.filters[0].strength=3
}

function startglowing(){
if (document.all.glowtext){
	if (document.all.glowtext&&glowtext.length){
	for (i=0;i<glowtext.length;i++)
	eval('setInterval("glowit('+i+')",150)')
	}
	else if (glowtext)
	setInterval("glowit2(0)",150)
	}
}

if (document.all)
window.onload=startglowing
