
function getCookie(NameOfCookie)

   {

    if (document.cookie.length > 0) {

    begin = document.cookie.indexOf(NameOfCookie+"=");

         if (begin != -1) {

         begin += NameOfCookie.length+1;

         end = document.cookie.indexOf(";", begin);

              if (end == -1) end = document.cookie.length;

              return unescape(document.cookie.substring(begin, end));

             }

         }

    return null;

    }

function setCookie(NameOfCookie, value, expiredays) {

         var ExpireDate = new Date ();

         ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

         document.cookie = NameOfCookie + "=" + escape(value) +

         ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

         }

function delCookie (NameOfCookie) {

         if (getCookie(NameOfCookie)) {

         document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";

         }

         }

function openWin(URL) {

	visited=getCookie('2002welcome');

	if (visited==null)

		{

		setCookie('2002welcome','yes',365)

	    mapWindow = window.open(URL,"mapWin","width=375,height=425,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,left=10,top=10");

		}

	}

var caught = 0;

  if (top.frames.length != 0)

  {

  caught++;

  if (caught != 0)

  {

  top.location=self.document.location;

  }

 }

function MM_openBrWindow(theURL,winName,features) { //v2.0

window.open(theURL,winName,features);

}

