function warning(url) {
  popupWin = window.open(url, 'Disclaimer', 'width=800,height=600,left=5,top=5')
}
function openWindow(url) {
  popupWin = window.open(url, 'Poll', 'width=300,height=300,left=100,top=100')
}

function OpenTrackback (c)
{window.open(c,'trackback','width=480,height=480,scrollbars=yes,status=yes');}

function OpenComments (c)
{ window.open('/cgi-bin/mt-comments.cgi?' + 'entry_id=' + c, 'comments','width=480,height=480,scrollbars=yes,status=yes');}

function customWindow( pageToLoad, winName, width, height, center, scroll) 
{   xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=1,"
//    + "scrollbars=0,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition + ","          //IE Only
    + "scrollbars=" + scroll;

    window.open( pageToLoad,winName,args );
}
// adrotator.js 
function AdRotator(imgTagNameAttribute, adURLs, adImageURLs, rotationTime,
  adRotatorVarName) {
 this.imgTagNameAttribute = imgTagNameAttribute
 this.adURLs = adURLs
 this.adImageURLs = adImageURLs
 this.rotationTime = rotationTime
 this.adRotatorVarName = adRotatorVarName
 this.index = 0
 this.adImages = new Array(adImageURLs.length)
 for(var i=0; i<adImageURLs.length; ++i) {
  this.adImages[i] = new Image()
  this.adImages[i].src = adImageURLs[i]
 }
 this.writeHTML = AdRotator_writeHTML
 this.start = AdRotator_start
 this.rotate = AdRotator_rotate
 this.handleClick = AdRotator_handleClick
}

function AdRotator_writeHTML() {
 document.write('<p align="center">')
 document.write('<a href="javascript:void(0)" ')
 document.write('onclick="'+this.adRotatorVarName+'.handleClick()" ')
 document.write('onmouseover="window.status=\'view the webcam\'; return true;" onmouseout="window.status=\' \'; return true;">')
 document.write('<img name="'+this.imgTagNameAttribute+'" border="0" ')
 document.write('src="'+this.adImageURLs[0]+'">')
 document.write('</a></p>')
}

function AdRotator_start() {
 window.setInterval(this.adRotatorVarName + '.rotate()', this.rotationTime)
}

function AdRotator_rotate() {
 ++this.index
 this.index %= this.adImageURLs.length
 document.images[this.imgTagNameAttribute].src = this.adImages[this.index].src
}

function AdRotator_handleClick() {
 setTimeout("window.location.href = '"+this.adURLs[this.index]+"'",500)
}