<!--

/* Written by Warren Ernst (http://www.warrenernst.com/, warren@warrenernst.com)
Portions of the Random Javascript code are inspired by the following three sources:

The JavaScript Kit (http://javascriptkit.com)
This credit MUST stay intact for use
     and
Mike New, with special thanks to Jeff Phillips of classadrivers.com
Visit http://www.mikenew.net for more scripts. 
     and
http://www.codelifter.com
Free for all users, but leave in this header */

//Enter the size of the popup window below, in pixels

var width  = 520;
var height = 600;

//Enter the random links below. Add more or remove some as desired.

var randomlink=new Array()

randomlink[0]="../entry/apc.htm"
randomlink[1]="../entry/3com.htm"
randomlink[2]="../entry/netgear.htm"
randomlink[3]="../entry/usr.htm"
randomlink[4]="../entry/intel.htm"
randomlink[5]="../entry/seagate.htm"
randomlink[6]="../entry/software602.htm"
randomlink[7]="../entry/mclink.htm"
randomlink[8]="../entry/microsoft.htm"
randomlink[9]="../entry/others.htm"
randomlink[10]="../entry/motto.htm"
randomlink[11]="../entry/mission.htm"
randomlink[12]="../entry/offerta.htm"

// Add the popup window attributes below, changing no to yes where desired
// Make sure the line starting with "newWindow" does not break, or the
// script won't work.

function popupWindow() {
newWindow = window.open(randomlink[Math.floor(Math.random()*randomlink.length)],'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width='+width+',height='+height);
}

// Create popup window once per browser session? (1=yes, 0=no)
// Entering 0 below will cause popup window to load every time page is loaded
// Entering 1 below will cause the popup window to appear only once per session

var once_per_browser_session=1

// The next bit of code generates/updates the cookie file, if necessary.

function get_cookie(Name) {
  var exists = Name + "="
  var goback = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(exists)
    if (offset != -1) {
      offset += exists.length
      end = document.cookie.indexOf(";", offset);
      if (end == -1)
         end = document.cookie.length;
      goback=unescape(document.cookie.substring(offset, end))
      }
   }
  return goback;
}


// This code checks if the cookie was just created during this session
// and generates the popup window if the cookie is old.

function check_cookie(){
  if (get_cookie('randomlink')==''){
    popupWindow()
    document.cookie="randomlink=yes"
    }
  }


// This is the first trigger. It always "shoots" if once_per_browser_session=0,
// otherwise, it passes "firing control" to the check_cookie function, above.

if (once_per_browser_session==0)
  popupWindow()
else
  check_cookie()
//-->