// (c) 2004 Ron Jourard

function findObj(n,d){var p=null;var i=null;var x=null;;if(!d){d=document}if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p)}if(!(x=d[n])&&d.all){x=d.all[n]}if(!(x=d[n])&&d.getElementById){x=d.getElementById(n)}for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n]}for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=findObj(n,d.layers[i].document)}return x};function popupMsg(msg){alert(msg)};function openWindow(sURL,sTarget,sFeatures){if(!sFeatures){alert("No popup window features.\nOpening default window.")}var objPopUpWindow=window.open(sURL,sTarget,sFeatures);if((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==2)){objPopUpWindow=window.open(sURL,sTarget,features)}if(document.images){objPopUpWindow.focus()}return false};function openDrinkTable(){var sFeatures="width=600,height=400,resizable=yes,scrollbars=yes";openWindow("table.htm","BAC2",sFeatures)};function FormatMessage(){if(arguments.length==0){alert("FormatMessage Error:no arguments.")}var retMessage=arguments[0];var replacementValues=null;if(arguments[1]!=null&&arguments[1] instanceof Array){replacementValues=arguments[1]}else{replacementValues=Array.prototype.slice.apply(arguments,[1])}for(var i=0;i<replacementValues.length;i++){retMessage=retMessage.replace(new RegExp("%"+(i+1),"gm"),(replacementValues[i]+""))}return retMessage};IE4=document.all;function newAlert(title,mess,icon,mods){(IE4)?makeMsgBox(title,mess,icon,0,0,mods):alert(mess)};function newConfirm(title,mess,icon,defbut,mods){if(IE4){icon=(icon==0)?0:2;defbut=(defbut==0)?0:1;retVal=makeMsgBox(title,mess,icon,4,defbut,mods);retVal=(retVal==6)}else{retVal=confirm(mess)}return retVal};function newPrompt(title,mess,def){retVal=(IE4)?makeInputBox(title,mess,def):prompt(mess,def);return retVal};function IEBox(title,mess,icon,buts,defbut,mods){retVal=(IE4)?makeMsgBox(title,mess,icon,buts,defbut,mods):null;return retVal};