/*

Version checking notes

  Netscape
    Layers were not introduced until version 4

  Microsoft
    the all collection was not introduced until version 4



*/

var isNav4up = false;
var isIE4up = false;

var isGood = false;

if ( document ) {
  // Only navigator supports layers
  isNav4up = (document.layers) ? true : false ;

  // Only ie has the all object

  isIE4up = (document.all) ? true : false ;

  if ( isNav4up || isIE4up ) {
    isGood = true;
  }
}


//
// Stop script errors
//
// Change bSuppressScriptErrors to false to Debug
//
//
   var bSuppressScriptErrors = false;


   function stopError() {
     return bSuppressScriptErrors;
   }

// if ( window ) {
//   window.onerror = stopError;
// }


function changeover ( image, source ) {
//alert ( 'over: ' + source );
  image.src=source;
}

function changeout ( image, source ) {
//alert ( 'out: ' + source );
  image.src=source;
}


function generateMenu( disableItemName ) {


 // prologue
 document.write ('');
 document.write ('<td width="110" >');
 document.write ('<a href="default.htm" ><img border="0" src="images/yellowandwhite_icon.gif" alt="SCC Icon" width="104" height="68" ></a>');
 document.write ('<table border="0" width="110" cellpadding="0" cellspacing="0">');

// Duplicated because of netscape timing bug
var menuGifRoots = new Array ( 'about',
                               'auditions',
                               'calendar',
                               'events',
                               'festivals',
                               'forsakeoflife',
                               'gallery',
                               'guestbook',
                    //         'members',
                               'messages',
                               'personnel',
                               'recordings',
                               'resources',
                               'supporters',
                               'thankyou' );

var menuItems = new Array ( 'About',
                            'Auditions',
                            'Calendar',
                            'Events',
                            'Festivals',
                            'For Sake of Life',
                            'Gallery',
                            'Guest Book',
                  //        'Members',
                            'Messages',
                            'Personnel',
                            'Recordings',
                            'Resources',
                            'Supporters',
                            'Thank you' );

var menuItemFunctions = new Array ( 'menuItemAbout(this)',
                                    'menuItemAuditions(this)',
                                    'menuItemCalendar(this)',
                                    'menuItemEvents(this)',
                                    'menuItemFestivals(this)',
                                    'menuItemForSakeofLife(this)',
                                    'menuItemGallery(this)',
                                    'menuItemGuestBook(this)',
                    //              'menuItemMembers(this)',
                                    'menuItemMessages(this)',
                                    'menuItemPersonnel(this)',
                                    'menuItemRecordings(this)',
                                    'menuItemResources(this)',
                                    'menuItemSupporters(this)',
                                    'menuItemThankYou(this)' );
// Duplicated because of netscape timing bug

 // menu items
 for ( var i=0; i < menuItems.length; i++ ) {
   document.write ('<tr>');
   document.write ('<td>');

   if ( disableItemName != menuItems[i] ) {
     if (menuGifRoots[i] == 'members') {
       document.write ( '<a href="' + menuGifRoots[i] + '.asp" onmouseout="changeout(document.'+ menuGifRoots[i]+',\'buttons/' + menuGifRoots[i] + '.gif\')"  onmouseover="changeover(document.'+ menuGifRoots[i] + ',\'buttons/' + menuGifRoots[i] + 'over.gif\')" onclick="return ' + menuItemFunctions[i] + ';">' );
     } else {
       document.write ( '<a href="' + menuGifRoots[i] + '.html" onmouseout="changeout(document.'+ menuGifRoots[i]+',\'buttons/' + menuGifRoots[i] + '.gif\')"  onmouseover="changeover(document.'+ menuGifRoots[i] + ',\'buttons/' + menuGifRoots[i] + 'over.gif\')" onclick="return ' + menuItemFunctions[i] + ';">' );
     }
     document.write ('<img  name="' + menuGifRoots[i] + '" hspace="0" vspace="0" border="0" src="buttons/' + menuGifRoots[i] + '.gif" height="25" width="96" alt="" >' );
     document.write ('</a>');
   } else {
     document.write ('<img hspace="0" vspace="0" border="0" src="buttons/' + menuGifRoots[i] + 'selected.gif" alt=""  height="25" width="96" >' );
   }

   document.write ('</td>');
   document.write ('</tr>');

 }

   // HERE - experiment
   document.write ('<tr align="left">');
   document.write ('<td>');
   document.write('<br>');

   document.write ( '<a href="contacts.html"   onmouseout="changeout(document.contactus,\'buttons/contactus.gif\')"  onmouseover="changeover(document.contactus,\'buttons/contactusover.gif\')">' );
   document.write ('<img  name="contactus" hspace="0" vspace="0" border="0" src="buttons/contactus.gif" height="16" width="64" alt="contact us" >' );
   document.write ( '</a>' );

   document.write('<br>');

   document.write ( '<a href="p3p/policy.html"  onclick="showPolicy(\'p3p/policy.html\'); return false;" onmouseout="changeout(document.privacy,\'buttons/privacy.gif\')"  onmouseover="changeover(document.privacy,\'buttons/privacyover.gif\')" >' );
   document.write ('<img  name="privacy"space="0" vspace="0" border="0" src="buttons/privacy.gif" height="16" width="64" alt="privacy" >' );
   document.write ( '</a>' );

   document.write ('</td>');
   document.write ('</tr>');

 // epilogue
 document.write ('</table>');
 document.write ('</td>');

}

// IMPORTANT VARIABLES!
var               days = 8;
var NumberofActiveDays = 8;

function generateIFKMenu( disableday ) {


 // 0 adjust
 disableday -=1;

 // prologue
 document.write ('');
//  document.write ('<td align="right" >');
 document.write ('<table border="1">');
 document.write ('<tr>');


 // menu items
 for ( var i=0; i < days; i++ ) {
   document.write ('<td align="center">');

   if ( (i != disableday) && ( i < NumberofActiveDays )) {
     document.write ( '<font face="verdana" size="-2" color="#000000">' );
     document.write ('<a href="ifkjuly' + (i+2)  +'.html">July<br>'+ (i+2) + '</a>' );
     document.write ('</font>');
   } else {
     document.write ( '<font face="verdana" size="-2" color="#000049">' );
     document.write ('July<br>'+ (i+2) );
     document.write ('</font>');
   }

   document.write ('</td>');

 }

   // thank you
   /*
   if ( 9 != disableday) {
     document.write ('<td align="center">');
     document.write ( '<font face="verdana" size="-2" color="#000000">' );
     document.write ('<a href="ifkthankyou.html">Thank<br>you</a>' );
     document.write ('</font>');
     document.write ('</td>');
   } else {
     document.write ('<td align="center">');
     document.write ( '<font face="verdana" size="-2" color="#000000">' );
     document.write ('Thank<br>you' );
     document.write ('</font>');
     document.write ('</td>');
   }
   */

 // epilogue
 document.write ('</tr>');
 document.write ('</table>');
 // document.write ('</td>');

}

function selectShow ( goodShow, simpleShow ) {

  if ( isGood == true ) {
    top.location.href= goodShow;
  } else {
    top.location.href= simpleShow;
  }

  return false;

}


function menuItemAbout() {
   top.location.href= 'about.html';
   return false;
}

function menuItemAuditions() {
   top.location.href= 'auditions.html';
   return false;
}

function menuItemCalendar() {

   var year = parseInt ( getYear() );


   // Force calendar to stay in range we have pages for

   if ( ( year >= 0 ) && ( year <= 11 ) ) {

     // top.location.href= getMonthShort() + getYear() + '.html';
     top.location.href= getMonthLong() + getYearLong() + 'Calendar.html';


   } else {
     top.location.href= 'yearview.html';
   }


   return false;
}

function menuItemCantare() {
   top.location.href= 'cantare.html';
   return false;
}
function menuItemForSakeofLife() {
   top.location.href= 'forsakeoflife.html';
   return false;
}

function menuItemRecordings() {
   top.location.href= 'recordings.html';
   return false;
}
function menuItemProjects() {
   top.location.href= 'projects.html';
   return false;
}

function menuItemSupporters() {
   top.location.href= 'supporters.html';
   return false;
}

function menuItemEvents() {
   top.location.href= 'events.html';
   return false;
}

function menuItemGallery() {
   top.location.href= 'gallery.html';
   return false;
}
function menuItemFestivals() {
   top.location.href= 'festivals.html';
   return false;
}

function menuItemGuestBook() {
   // top.location.href= 'guestbook.html';
   top.location.href= 'http://www.saskatoonchildrenschoir.org/1stAVE_guestbook/';
   return false;
}

function menuItemMembers() {
   top.location.href= 'members.asp';
   return false;
}

function menuItemMessages() {
   top.location.href= 'messages.html';
   return false;
}

function menuItemPersonnel() {
   top.location.href= 'personnel.html';
   return false;
}

function menuItemResources(image) {
   top.location.href= 'resources.html';

   return false;
}

function menuItemThankYou() {
   top.location.href= 'thankyou.html';
   return false;
}
//
// Time and Date Support
//
var monthShort = new Array ( 'jan','feb','mar','apr',
                             'may','jun','jul','aug',
                             'sep','oct','nov','dec' );

var monthLong  = new Array ( 'January','February','March','April',
                             'May','June','July','August',
                             'September','October','November','December' );


function getYear() {

  var year = getYearLong();

  return year.substring(2,4);

}

function getYearLong() {

  d=new Date();

  var year= null

  if ( d.getFullYear )
    year = new String ( d.getFullYear() );
  else
    year = new String ( d.getYear() );

  return year;

}


function getMonth() {

  d=new Date();

  var month = new String ( d.getMonth() );

  // month = ( month.length == 1 ) ? "0" + month : month;

  return month;

}

function getMonthShort() {

 var i = parseInt ( getMonth() );

 return monthShort[i];
}

function getMonthLong() {

 var i = parseInt ( getMonth() );

 return monthLong[i];

}
//
// SlideShow Support
//
var slideShowReady = false;

var advanceTime = 5000;

var timer = null;

// call init routine to set these
var checkbox = null;
var selectTime = null
var slideShow = null;
var imageTagA = null;
var imageTagB = null;
var currentLayer='layer0';

var currentIndex = 0;

function Slide ( image, caption ) {
this.image = image;
this.caption = caption;
this.readyState = false;
}

function loadSlides ( photos, sindex ) {

  slideShow = photos;

  if ( preLoad == null ) {
    preLoad = new PreLoadSession();
  }

  for ( i= sindex; i < photos.length; i++ ) {
     preLoad.addImage ( photos[i], "high" );
  }

  // start the process
  preLoad.nextImage();

}



function slideShowInit ( photoArray, image1, image2, autoCheck, delaySelect ) {
  slideShow = photoArray;
  checkbox = autoCheck;
  selectTime = delaySelect;
  imageTagA = image1;
  imageTagB = image2;

  // Start the timer
  advanceTime = parseInt ( selectTime.options[selectTime.selectedIndex].value );
  timer = window.setTimeout ('AutoAdvance();', advanceTime );

  slideShowReady = true;
  window.status = "SlideShow ready";
}

function AutoAdvance( ) {
  clearTimeout ( timer );

  var bAutoAdvance = checkbox.checked;

  advanceTime = parseInt ( selectTime.options[selectTime.selectedIndex].value );
  advanceTime += ( isNav4up ) ? 3000 : 5000;

  if ( bAutoAdvance == true ) {
   nextSlide();

   timer = window.setTimeout ('AutoAdvance();', advanceTime );
  }
}

var timerID;
var topDimension;
var bottomDimension;
var leftDimension;
var rightDimension;

var inTransistion = false;

function doTransition(objectTransition, xinc, fadeStyle) {

  inTransistion = true;
  window.status = slideShow[currentIndex].image + " transistion";

  // ok switch did not exist at NN3 time
  // switch (fadeStyle) {

  if ( fadeStyle == 0 ) {
    // top to bottom
    objectTransition.clip.top += 2*xinc;
  }

  if ( fadeStyle == 1 ) {
    // bottom to top
    objectTransition.clip.bottom -=2*xinc;
  }

  if ( fadeStyle == 2 ) {
    // left to right
    objectTransition.clip.left += 2*xinc;
  }

  if ( fadeStyle == 3 ) {
    // right to left
    objectTransition.clip.right -= 2*xinc;
  }


  if ( fadeStyle == 4 ) {
    // top and bottom to middle
    objectTransition.clip.top +=xinc;
    objectTransition.clip.bottom -=xinc;
  }

  if ( fadeStyle == 5 ) {
    // left and right to middle
    objectTransition.clip.left +=xinc;
    objectTransition.clip.right -=xinc;
  }

  if ( fadeStyle == 6 ) {
    // all edges in
    objectTransition.clip.left +=xinc;
    objectTransition.clip.top +=xinc;
    objectTransition.clip.bottom -=xinc;
    objectTransition.clip.right -=xinc;
  }


  if ( fadeStyle == 7 ) {
    // left top in
    objectTransition.clip.left +=xinc;
    objectTransition.clip.top +=xinc;
  }

  if ( fadeStyle == 8 ) {
    // bottom right in
    objectTransition.clip.bottom -=xinc;
    objectTransition.clip.right -=xinc;
  }

  if ( fadeStyle == 9 ) {
    // left bottom in
    objectTransition.clip.left +=xinc;
    objectTransition.clip.bottom -=xinc;
  }

  if ( fadeStyle == 10 ) {
    // top right  in
    objectTransition.clip.top +=xinc;
    objectTransition.clip.right -=xinc;
  }

  if ( fadeStyle == 11 ) {
    // left top right in
    objectTransition.clip.left +=xinc;
    objectTransition.clip.top +=xinc;
    objectTransition.clip.right -=xinc;
  }

  if ( fadeStyle == 12 ) {
    // left bottom right in
    objectTransition.clip.left +=xinc;
    objectTransition.clip.bottom -=xinc;
    objectTransition.clip.right -=xinc;
  }

  if ( fadeStyle == 13 ) {
    // top bottom right in
    objectTransition.clip.top +=xinc;
    objectTransition.clip.bottom -=xinc;
    objectTransition.clip.right -=xinc;
  }

  if ( fadeStyle == 14 ) {
    // top bottom left  in
    objectTransition.clip.top +=xinc;
    objectTransition.clip.bottom -=xinc;
    objectTransition.clip.left +=xinc;
  }


  if ( (fadeStyle < 0) || (fadeStyle > 14) ) {
    objectTransition.clip.left +=xinc;
    objectTransition.clip.top +=xinc;
    objectTransition.clip.bottom -=xinc;
    objectTransition.clip.right -=xinc;
  }


  if (objectTransition.clip.height <=0 || objectTransition.clip.width <=0) {
    clearInterval(timerID);
    resetDimensions(objectTransition);
    inTransistion = false;
  }


}

function resetDimensions(objectTransition)
{
        objectTransition.clip.top    = topDimension;
        objectTransition.clip.bottom = bottomDimension;
        objectTransition.clip.left   = leftDimension;
        objectTransition.clip.right  = rightDimension;
        objectTransition.visibility  = "hide";

        window.status = slideShow[currentIndex].image + " done";

}


function switchSlides(newSlide, oldSlide) {
  currentLayer = newSlide;
  var NextOne = 0;

  if (isNav4up) {

    // fifteen possible transistions beginning with 0
    nextOne = Math.round(Math.random()*15);

    document.layers[newSlide].visibility="show";
    document.layers[oldSlide].zIndex=5;
    document.layers[newSlide].zIndex=1;

    topDimension    = document.layers[oldSlide].clip.top;
    bottomDimension = document.layers[oldSlide].clip.bottom;
    leftDimension   = document.layers[oldSlide].clip.left;
    rightDimension  = document.layers[oldSlide].clip.right;

    timerID = setInterval("doTransition(document.layers['"+oldSlide+"'],6,"+ nextOne+")",100);

  }

  if (isIE4up) {
    inTransistion = true;

    // 23 possible transistions beginning with 1
    nextOne = Math.round(Math.random()*22) + 1;

    document.all[oldSlide].style.filter = "revealTrans(duration=5, transition=" + nextOne +")";

    document.all[oldSlide].style.zIndex=5;
    document.all[newSlide].style.zIndex=1;
    document.all[newSlide].style.visibility="visible";
    document.all[oldSlide].filters.revealTrans.Apply();
    document.all[oldSlide].style.visibility="hidden";
    document.all[oldSlide].filters.revealTrans.Play();
    inTransistion = false;
  }
}

function nextSlide() {
  var tryIndex, previousIndex;

  // dont advance if show not completely loaded
  if ( slideShowReady == false ) {
    window.status = "SlideShow not ready";
    return false;

  }

  // dont advance if this image is not ready
  if ( slideShow[currentIndex].readyState == false ) {

    window.status = slideShow[currentIndex].image + " not ready";
    return false;
  }

  // dont advance if this image is in transistion
  if ( inTransistion == true ) {
    window.status = slideShow[currentIndex].image + " in transistion";
    return false;
  }

  previousIndex = currentIndex;
  tryIndex = currentIndex + 1;

  if ( tryIndex >= slideShow.length ) {
    tryIndex = 0;
  }

  // dont advance if next image is not ready
  if ( slideShow[tryIndex].readyState == false ) {
    window.status = slideShow[tryIndex].image + " not ready";
    return false;
  }

  currentIndex = tryIndex;

  displayCaption ( "caption", slideShow[currentIndex].caption );

  window.status = slideShow[currentIndex].image;

  if ( currentLayer == 'layer0' ) {
    imageTagB.src = slideShow[currentIndex].image;
    switchSlides('layer1', 'layer0');
  } else {
    imageTagA.src = slideShow[currentIndex].image;
    switchSlides('layer0', 'layer1');
  }


  return false;
}

function previousSlide() {
  var tryIndex, previousIndex;

  // dont advance if show not completely loaded
  if ( slideShowReady == false ) {
    window.status = "SlideShow not ready";
    return false;

  }

  // dont advance if this image is not ready
  if ( slideShow[currentIndex].readyState == false ) {

//  alert ( slideShow[currentIndex].image + " not ready" );
    window.status = slideShow[currentIndex].image + " not ready";
    return false;
  }

  // dont advance if this image is in transistion
  if ( inTransistion == true ) {
  //alert ( slideShow[currentIndex].image + " in transistion" );
    window.status = slideShow[currentIndex].image + " in transistion";
    return false;
  }

  previousIndex = currentIndex;
  tryIndex = currentIndex - 1;

  if ( tryIndex < 0 ) {
   tryIndex = slideShow.length - 1;
  }

  // dont advance if next image is not ready
  if ( slideShow[tryIndex].readyState == false ) {
//  alert ( slideShow[tryIndex].image + " not ready" );
    window.status = slideShow[tryIndex].image + " not ready";
    return false;
  }

  currentIndex = tryIndex;

  displayCaption ( "caption", slideShow[currentIndex].caption );

  window.status = slideShow[currentIndex].image;

  if ( currentLayer == 'layer0' ) {
    imageTagB.src = slideShow[currentIndex].image;
    switchSlides('layer1', 'layer0');
  } else {
    imageTagA.src = slideShow[currentIndex].image;
    switchSlides('layer0', 'layer1');
  }

  return false;

}



//
// New Array Methods
//


// Prototype was not supported until NN4
function _push ( value ) {

this[this.length] = value;

}

function _pop ( ) {
  if ( this.length > 0 ) {
    var returnObject = this[this.length - 1 ];
    delete this[this.length-1]
    this.length -=1;
    return returnObject;
  } else {
   alert ( "array underflow!" );
  }
  return null;
}

function _shift ( ) {

  if ( this.length > 0 ) {
    var returnObject = this[0];

    for (i=0; i < this.length-1; i++ ) {
     this[i] = this[i+1]
    }
    delete this[i];
    this.length -=1;
    return returnObject;
  } else {
   alert ( "array underflow!" );
  }
  return null;
}

function _flush ( ) {
  if ( this.length > 0 ) {
    for (i=0; i < this.length; i++ ) {
      delete this[i];
    }
    this.length = 0;
  }
}

// Not introduced until NN 4 - not needed
// PreLoadSession.prototype = new Object();

function _nextImage() {

//alert ('next image' );

  this.finished = false;

  if ( this.imageQueue["high"].length > 0 ) {
    this.currentSlide = this.imageQueue["high"].shift();
  } else {
    if ( this.imageQueue["medium"].length > 0 ) {
      this.currentSlide = this.imageQueue["medium"].shift();
    } else {
      if ( this.imageQueue["low"].length > 0 ) {
        this.currentSlide = this.imageQueue["low"].shift();
      } else {
        this.finished = true;
      }
    }
  }

  if ( this.finished == false ) {
//  alert ( "Next Image " + this.currentSlide.image );
    this.currentImage.src = this.currentSlide.image;
  }

}


function _imageError () {

  alert ( "error preloading image" );

  this.preLoadSession.nextImage();

};

function _imageReady() {

  if ( this.readyState == "complete" ) {
//  alert ('image ready' );
    this.preLoadSession.currentSlide.readyState = true;
    this.preLoadSession.nextImage();
  }

};

function _imageLoad() {

//  alert ('image load' );
    this.preLoadSession.currentSlide.readyState = true;
    this.preLoadSession.nextImage();

};

function _addImage( photoObject, priority ) {

// remove test to make NN3 happy
//  if (this.imageQueue[priority]) {
    this.imageQueue[priority].push(photoObject);

//  } else {
//    alert ( "addImage: no queue for priority " + priority);
//  }

};

function _deleteImages ( priority ) {

  if (this.imageQueue[priority]) {
    this.imageQueue[priority].flush();
  } else {
    alert ( "deleteImages: no queue for priority " + priority);
  }

};


//
// Preload Object
//

function PreLoadSession () {
  this.nextImage    = _nextImage;
  this.imageReady   = _imageReady;
  this.imageError   = _imageError;
  this.imageLoad    = _imageLoad;
  this.addImage     = _addImage;
  this.deleteImages = _deleteImages;

  this.finished = true;

  this.currentSlide = null;
  this.currentImage = new Image ();

  // this one for navigator
  this.currentImage.onLoad=this.imageLoad;

  // this one for ie
  this.currentImage.onreadystatechange=this.imageReady;

  // this one for both
  this.currentImage.onError=this.imageError;

  this.currentImage.preLoadSession = this;

  this.imageQueue = new Array();
  var ar = this.imageQueue["high"] = new Array();
  ar.push  = _push;
  ar.pop   = _pop;
  ar.shift = _shift;
  ar.flush = _flush;

  ar = this.imageQueue["medium"] = new Array();
  ar.push  = _push;
  ar.pop   = _pop;
  ar.shift = _shift;
  ar.flush = _flush;

  ar = this.imageQueue["low"] = new Array();
  ar.push  = _push;
  ar.pop   = _pop;
  ar.shift = _shift;
  ar.flush = _flush;

  return;
}

//
// Application preload code
//
//




var preLoad = null;

function loadMenu( bBase, bOver, bSelected ) {

  bBase     = ( bBase == null ) ? false : bBase;
  bOver     = ( bOver == null ) ? false : bOver;
  bSelected = ( bSelected == null ) ? false : bSelected;

  if ( preLoad == null ) {
    preLoad = new PreLoadSession();
  }

// Duplicated because of netscape timing bug
var menuGifRoots = new Array ( 'about',
                               'auditions',
                               'calendar',
                               'events',
                               'forsakeoflife',
                               'gallery',
                               'guestbook',
                               'members',
                               'messages',
                               'personnel',
                               'recordings',
                               'resources',
                               'supporters',
                               'thankyou' );

var menuItems = new Array ( 'About',
                            'Auditions',
                            'Calendar',
                            'Events',
                            'For Sake of Life',
                            'Gallery',
                            'Guest Book',
                            'Members',
                            'Messages',
                            'Personnel',
                            'Recordings',
                            'Resources',
                            'Supporters',
                            'Thank you' );

// Duplicated because of netscape timing bug

 for ( var i=0; i < menuItems.length; i++ ) {

   if ( bBase == true ) {
     preLoad.addImage ( new Slide ('buttons/' + menuGifRoots[i] + '.gif',""), "high" );
   }

   if ( bOver == true ) {
     preLoad.addImage ( new Slide( 'buttons/' + menuGifRoots[i] + 'over.gif',""), "high" );
   }

   if ( bSelected == true ) {
     preLoad.addImage ( new Slide ('buttons/' + menuGifRoots[i] + 'selected.gif',""), "high" );
   }

   // start the process
   preLoad.nextImage();

 }

}


function displayCaption(id, str) {

  if (isNav4up) {
    if ( document[id] ) {

      with (document[id].document) {
        open();
        write(str);
        close();
      }

    }
  } else {
    if ( document.all[id] ) {
      document.all[id].innerHTML = str;
    }
  }

}


//  Privacy Policy Display
var policyWindow = null;

function closePolicy() {

  if ( policyWindow != null ) {
    if ( policyWindow.closed != true ) {
    policyWindow.close();
    }
  }

}

function showPolicy ( policyHTML ) {

  closePolicy();

  policyWindow = window.open ( policyHTML, "Privacy","resizable,scrollbars");

  return false;
}

