// THIS IS THE WINDOW POSITION CODE //

var oldEvt_windows = window.onload; window.onload = function() {
if (oldEvt_windows) { oldEvt_windows(); }
checkVisit(); }


function setCookie(name, value, expires, path, domain, secure) {
  document.cookie= name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else {
    begin += 2;
  }
  var end = document.cookie.indexOf(";", begin);
  if (end == -1) {
    end = dc.length;
  }
  return unescape(dc.substring(begin + prefix.length, end));
}

// END WINDOW POSITION CODE //

function checkVisit() {
//
// THIS IS THE WELCOME MESSAGE WINDOW //
//
var cookie = getCookie("null");
var cookie = getCookie("welcomeWin");
if (cookie == null || parseFloat(cookie) < 0.90) {
//
//    Dialog.alert($('welcome_message').innerHTML,  {windowParameters: {className: "sketchy", width:500, draggable:false}, okLabel:"Close"});
//
date=new Date;
date.setMonth(date.getMonth()+3);
setCookie("welcomeWin", "tswl50", date);
}

// END WELCOME MESSAGE CODE //

}