	var loc=document.location.toString();
	var spot=loc.indexOf("/",8);
	var base=loc.substr(0,spot);
	
function popitup(url)
{
	var Tmp=url;
	if (url.indexOf("FileNm")>0){
		Tmp=Tmp.replace("FileNm=/","FileNm="+base+"/");
	} else {
			Tmp=base+Tmp;
	}
	Tmp=Tmp.replace("EPSTORE//view","EPSTORE/view");
	
    newwindow=window.open(Tmp,'name','height=600,width=800');
    if (window.focus)
	{
	newwindow.focus();
	}
    return false;
}

function onclose()
{
//window.opener.location.reload();
self.close();
}

function checkSubmit()
{
    for(i=0;i<document.frmBid.elements.length;i++)
    {
        if(document.frmBid.elements[i].type == 'file' || document.frmBid.elements[i].type == 'text')
        {
            if(document.frmBid.elements[i].value == '')
            {
                alert('No Fields may be blank!');
                return false;
                break;
            }
            else if (document.frmBid.elements[i].type == 'file' && fileType(document.frmBid.elements[i].value) != '.PDF')
            {
                    alert('Please select a PDF to Upload!');
                    return false;
                    break;
            }
        }
    }
}

function checkSubmit2()
{
    for(i=0;i<document.frmMain.elements.length;i++)
    {
        if(document.frmMain.elements[i].type == 'text' || document.frmMain.elements[i].type == 'password')
        {
            if(document.frmMain.elements[i].value == '')
            {
                alert('No Fields may be blank!');
                return false;
                break;
            }
        }
    }
}

function checkSubmit3()
{
if(checkSubmit2() != false)
	{
	document.frmMain.submit();
	}
	else
	{
	return false;
	}
}

function delRequest(intParent,intChild,strFileNm)
{
document.bidmain.txtParent.value = intParent;
document.bidmain.txtChild.value = intChild;
document.bidmain.txtFileNm.value = strFileNm;
document.bidmain.submit();
}
function delSupp(intParent,intChild,strFileNm)
{
document.bidmain.txtParent.value = intParent;
document.bidmain.txtChild.value = intChild;
document.bidmain.txtFileNm.value = strFileNm;
document.bidmain.submit();
}

function fileType(iPath)
{
    var rfileType;
    rfileType = iPath.substring(iPath.length - 4);
    return rfileType.toUpperCase();
}

function sendadden(strDISPLAY,strPARENT,strSPECNR)
{
    document.frmadden.display.value = strDISPLAY;
    document.frmadden.parent.value = strPARENT;
    document.frmadden.SpecNr.value = strSPECNR;
    document.frmadden.submit();
}