
function Generate(Range) {
   NewNumber=Math.round(Range*Math.random()); NewNumber -= 1; 
   while(NewNumber < 1 ) { 
      NewNumber = Math.round(Range * Math.random());
      NewNumber -= 1 
   } 
   return NewNumber; 
}

function topBanner() {

   LinkTo = new Array();
   Location = new Array();
   Width = new Array();
   Height = new Array(); Border = new Array();
   Description1 = new Array(); alt = new Array();
   LinkTo[0] = ""; Location[0] = "";
   Width[0] = ""; Height[0] = "";
   Border[0] = ""; Description1[0] = ""; 
   BrowserWindow = "NEW";
   Descriptions = "Yes";
   LinksUnderlined = "YES";
   LinkColor = "#0000FF";
   BorderSize = 0;
   BorderColor = "#0000FF";
   LinkTo[1] = "http://www.cruelworld.com";
   Location[1] = "http://affiliates.cruelworld.com/g/dev_banner1.gif";
   Width[1] = "468";
   Height[1] = "60";
   Description1[1] = "Put your resume on this site!";

   LinkTo[2] = "../Registr/registr.html";
   Location[2] = "../Images/star.gif";
   Width[2] = "468";
   Height[2] = "60";
   Description1[2] = "If descriptions are turned on, the description for the site that the second banner will link to goes here.";

   Banner = Generate(Location.length); 
   document.write( (BrowserWindow == "SAME") 
 		? "<CENTER><A HREF=\"" + LinkTo[Banner] + "\"><FONT COLOR=\"" + BorderColor + "\"><IMG SRC=\"" + Location[Banner] + "\" WIDTH=\"" + Width[Banner] + "\" HEIGHT=\"" + Height[Banner] + "\" BORDER=\"" + BorderSize + "\" NAME=\"RandomBanner\"></A></CENTER>" 
                : "<CENTER><A HREF=\"" + LinkTo[Banner] + "\" TARGET=\"_blank\"><FONT COLOR=\"" + BorderColor + "\"><IMG SRC=\"" + Location[Banner] + "\" WIDTH=\"" + Width[Banner] + "\" HEIGHT=\"" + Height[Banner] + "\" BORDER=\"" + BorderSize + "\" NAME=\"RandomBanner\"></FONT></A></CENTER>");
   if ( Descriptions == "YES" ) {
   if ( LinksUnderlined == "YES") { document.write((BrowserWindow == "SAME") ? "<CENTER><A HREF=\"" + LinkTo[Banner] + "\"><FONT COLOR=\"" + LinkColor + "\">" + Description1[Banner] + "</FONT></A></CENTER>" : "<CENTER><A HREF=\"" + LinkTo[Banner] + "\" TARGET=\"_blank\"><FONT COLOR=\"" + LinkColor + "\">" + Description1[Banner] + "</FONT></A>"); }
   else { document.write((BrowserWindow == "SAME") ? "<CENTER><A HREF=\"" + LinkTo[Banner] + "\" STYLE=\"text-decoration: none\"><FONT COLOR=\"" + LinkColor + "\">" + Description1[Banner] + "</FONT></A>" : "<CENTER><A HREF=\"" + LinkTo[Banner] + "\" TARGET=\"_blank\" STYLE=\"text-decoration: none\"><FONT COLOR=\"" + LinkColor + "\">" + Description1[Banner] +  "</FONT></A>"); } }
}

function printGreeting() {

   var h = (new Date()).getHours();var m=(new Date()).getMinutes(); var s =(new Date()).getSeconds();
   //if ((h>23) OR (h<7)) document.write('Good night! '); 
   //if (h>6 && h<12) document.write('Good morning! ');
   //if (h>11 && h<19) document.write('Good afternoon! ');
   //if (h>18 && h<24) document.write('Good evening! ');
   if (eval(h) <10) {h="0"+h}
   if (eval(m) < 10) {m="0"+m}
   if (s < 10) {s="0"+s};
 document.write(h + ':' +  m  + ':' + s);  
}

function printGreeting1() {

   var h = (new Date()).getHours();var m=(new Date()).getMinutes(); var s =(new Date()).getSeconds();
   //if ((h>23) OR (h<7)) document.write('Good night! '); 
    //if (h>6 && h<12) document.write('Good morning! ');
   // if (h>11 && h<19) document.write('Good afternoon! ');
   // if (h>18 && h<24) document.write('Good evening! ');
   var h = (new Date()).getHours(); var m = (new Date()).getMinutes(); var s = (new Date()).getSeconds();
   if (eval(h) <10) {h="0"+h}
	if (eval(m) < 10) {m="0"+m}
	if (s < 10) {s="0"+s}; document.write(h + ':' +  m  + ':' + s);  
}



