function popUp(url) 
{
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=400,height=250,left=0,top=0');
self.name = "mainWin"; 
}
function popUpSwatch(url) 
{
sealWin=window.open(url,"win2",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=400,height=250,left=200,top=0');
self.name = "swatchWin"; 
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+300+',width='+500+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

    var submitcount=0;
    function submitOnce() 
    {
        if (submitcount == 0)
        {
            submitcount++;
            return true;
        }
        else 
        {
            alert("This form has already been submitted. Please be patient.");
            return false;
        }
    }
    
function targetopener(mylink, closeme, closeonly)
{
window.opener.location.href=mylink.href;
window.opener.focus();
window.close();
return false;
}