//Loads modal popup for 800x600 users

function jumper()
{
var w = screen.width;
if (w<1024)
{
setTimeout("tb_show('', '/modal/800.asp?keepThis=true&TB_iframe=true&height=264&width=430', null);",3000);
}
}

function get_cookie(NameOfCookie) {
  var search = NameOfCookie + "=";
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1) { // if cookie exists
      offset += search.length;
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end));
      }
   }0
  return returnvalue;
}


function addLoadEventForModalBox(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function')
		window.onload = func;
	else
	{
		window.onload = function() {
			if (oldonload)
				oldonload();
			func();
		}
	}
}

function SetCookie(NameOfCookie,value) {
var today = new Date();
var expire = new Date();
expire.setTime(today.getTime() + 365 * 24 * 3600 * 1000);
document.cookie = NameOfCookie+"="+escape(value)+ ";expires="+expire.toGMTString() +";path=/;";
}


addLoadEventForModalBox(function() {loadornot()});

function loadornot(){

if (get_cookie('800pop')!='no'){
SetCookie('800pop','yes');
jumper();
}
}
