/*
 * Script library that defines common function
 * needed by the iChilli web site.
 *
 * Author: <a href="mailto:sirabyss@gmx.net">Daniel S. Haischt</a>
 * 
 * $Id: library.js,v 1.1 2002/10/06 20:54:24 cyberodin Exp $
 */
 
 var currentWindow = null;
 
 function openLocation(location)
 {
     this.currentWindow = window.open('about:blank', "_blank");

     this.currentWindow.document.write('<html>');
     this.currentWindow.document.write('<head>');
     this.currentWindow.document.write('<title>External Resource</title>');
     this.currentWindow.document.write('<meta http-equiv="refresh" content="1; URL=' + location + '">');
     this.currentWindow.document.write('<LINK REL="stylesheet" HREF="styles/main.css" TYPE="text/css">');
     this.currentWindow.document.write('</head>');
     this.currentWindow.document.write('<body class="white">');
     this.currentWindow.document.write('<div align="center" valign="middle">You are now leaving the iChilli web site<br>' +
                          'You will be redirected to the resource you just requested.<br>' +
                          'If you wont be redirected within five seconds, use the following link<br>' +
                          'to manually get there. ' +
                          '<a href="' + location + '">' + location + '</a></div>');
     this.currentWindow.document.write('</body>');
     this.currentWindow.document.write('</html>');

     this.currentWindow.location = location;
 }

 function closeLocation()
 {
     if (this.currentWindow != null)
     {
         this.currentWindow.close();
     }     
 }
