function onDOMReady(x) {
	YAHOO.util.Event.onDOMReady(x);
}
function createDialog(name, args) {
	return new YAHOO.widget.Dialog(name, args);
}
function addListener(n, e, m) {
	YAHOO.util.Event.addListener(n, e, m);
}

function checkCookie()
{
	if(GetCookie("localized").length == 0)
	{
		location.href = './default.aspx';
	}
} 

function GetCookie(sName)
{
  // cookies are separated by semicolons
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    // a name/value pair (a crumb) is separated by an equal sign
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }
  // a cookie with the requested name does not exist
  return null;
}

function setCookie(c_name, value, expiredays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + expiredays);
    document.cookie = c_name + "=" + escape(value) +
((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
}
