<!--

function openWin(file){
desktop =window.open(file,"name","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=700,height=500,resizable=no,top=5,left=50");
}

function msgStatus() {
var txt="Welcome To The Australian Carriage Driving Society";
window.status=txt;
}

function showResult(file){
var strFile="pub/"+file;
desktop =window.open(strFile,"name","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=700,height=500,resizable=yes,top=5,left=50");
}

function PrintArticle(file){
var strFile="article.aspx?article="+file;
desktop =window.open(strFile,"name","toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,width=700,height=500,resizable=yes,top=5,left=50");
}

function PrintCalendar(){
var strFile="calprint.aspx";
desktop =window.open(strFile,"name","toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,width=700,height=500,resizable=yes,top=5,left=50");
}

function OpenMailForm(j){
var strFile="mailform.aspx?id="+j;
desktop =window.open(strFile,"MailForm","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=700,height=600,resizable=no");
}

function DisableButton() {
    document.forms[0].submit();
    window.setTimeout("disableButton('" + 
        window.event.srcElement.id + "')", 0);
}

function disableButton(buttonID) {
    document.getElementById(buttonID).disabled=true;
}

function GoImage(url,w,h){
  url = "pub/" + url
  if (w > screen.width || h > screen.width)
  {
    if (w > screen.width && h <= screen.height)
    {
      var nw = screen.width - 70;
      var nh = parseInt(h) + 36
    }
    if (h > screen.height && w <= screen.width)
    {
      var nh = screen.height - 70;
      var nw = parseInt(w) + 36
    }
    if (w > screen.width && h > screen.height)
    {
      var nh = screen.height - 70;
      var nw = screen.width - 70;
    }

    window.open(url,"_blank","width=" + nw + ",height=" + nh + ",left=0,top=0,scrollbars=yes,resizable=yes");

  }
  else
  {
    var nh = parseInt(h) + 25;
    var nw = parseInt(w) + 25;
    window.open(url,"_blank","width=" + nw + ",height=" + nh + ",scrollbars=no,resizable=no");
  }
}

function DisableButton() {
	document.forms[0].submit();
	window.setTimeout("disableButton('" + window.event.srcElement.id + "')", 0);
}

function disableButton(buttonID) {
	document.getElementById(buttonID).disabled=true;
}

function ViewImage(url, w, h) 
{
  url = "LibraryImage.aspx?img=" + url + "&w=" + w + "&h=" + h + ""
  if (w > screen.width || h > screen.width)
  {
    if (w > screen.width && h <= screen.height)
    {
      var nw = screen.width - 70;
      var nh = parseInt(h) + 36
    }
    if (h > screen.height && w <= screen.width)
    {
      var nh = screen.height - 70;
      var nw = parseInt(w) + 36
    }
    if (w > screen.width && h > screen.height)
    {
      var nh = screen.height - 70;
      var nw = screen.width - 70;
    }

    window.open(url,"_blank","width=" + nw + ",height=" + nh + ",left=0,top=0,scrollbars=yes,resizable=yes");

  }
  else
  {
    var nh = parseInt(h) + 25;
    var nw = parseInt(w) + 25;
    window.open(url,"_blank","width=" + nw + ",height=" + nh + ",scrollbars=no,resizable=no");
  }
}


// -->
