function whitePaperPopup(theDoc, winName) {

                        if (document.all)
                                var xMax = screen.width, yMax = screen.height;
                        else
                        if (document.layers)
                                var xMax = window.outerWidth, yMax = window.outerHeight;
                        else
                                var xMax = 640, yMax=480;
                                var w = (xMax/3*2), h = (yMax-150);
                                var xOffset = (xMax - w)/3*2, yOffset = (yMax - h)/2;

                        winName = window.open(theDoc,winName,'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Gets value of cookie named "NameOfCookie"
//
function getCookie(NameOfCookie)
{
        if (document.cookie.length > 0)
        {
                begin = document.cookie.indexOf(NameOfCookie+"=");
                if (begin != -1) // Note: != means "is not equal to"
                {
                        begin += NameOfCookie.length+1;
                        end = document.cookie.indexOf(";", begin);
                        if (end == -1) end = document.cookie.length;
                        return unescape(document.cookie.substring(begin, end));
                }
        }
        return null;
}

// Sets cookie values. Expiration date is optional
//
function setCookie(NameOfCookie, value, expiredays)
{

// Three variables are used to set the new cookie.
// The name of the cookie, the value to be stored,
// and finally the number of days until the cookie expires.
// The first lines in the function convert
// the number of days to a valid date.

        var ExpireDate = new Date ();
        ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

        document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function register(name,value) {
         setCookie(name, value, 30);
}

function printHistory(history_array) {
         var temp_cookie = '';
         document.write('<table width=100% cellpadding=1 bgcolor="#B33817" cellspacing=0 border=0><tr><td><table width=100% cellpadding=3 cellspacing=0 border=0 bgcolor="#F4E587"><tr><td colspan=2 bgcolor="#F9EDCC">'
         + '<font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">&nbsp; Where You' + "'" + 've Been    </font></td></tr>');
         for (var i=0; i<=3; i++)
         {
              if (history_array[i] != null)
              {
                  temp_cookie = history_array[i];
                  temp_info = temp_cookie.split(',');
				  temp_main = temp_info[0].indexOf(' :: ');
				  titles = temp_info[0].split(' :: ');
                  if ((temp_info[0] != 'null') && (temp_info[0] != null))
                  {
                        if (temp_main > -1)
                        {
                               document.write('<tr><td width=8 valign=top align=center><font face="Arial, sans-serif" size=2 color="#B33817"><b>-</b></td><td width=*><a href="' +
                               temp_info[1] + '"><font face="Arial, sans-serif" size=1 color="#B33817"> ' + titles[0]
                               + ' <br><font size=2> ' + titles[1] + '</font></font></a></td></tr>');
                        }
                        else
                        {
                               document.write('<tr><td width=8 valign=top align=center><font face="Arial, sans-serif" size=2 color="#B33817"><b>-</b></td><td width=*><a href="' +
                               temp_info[1] + '"><font face="Arial, sans-serif" size=2 color="#B33817"> ' + titles[0]
                               + ' <br></font></a></td></tr>');
                        }
                  }
              }
         }
         document.write('</table></td></tr></table>');
}