var cookie1=getCookie('pathAuth');
function checkLoginStatus(){if (cookie1==null){document.getElementById("Button1").disabled = true;}}

/***** Start of Active Content JavaScript (V 3.0) For JsEnhanced ******
 *  PT_AC_ prefixing on variables and functions to minimize namespace conflicts
 *  Note that function PT_AC_Write auto-appends fmt=JsEnhanced
 */
// the following variable can be set to control the AC behavior for older or rarer browsers
var PT_AC_OldBrowserSupport = 1;	// For browsers that don't support innerHTML
							// 0=only show defaultHTML, 1=Show AC except during maintenance windows
							// 2=always show AC

// the remaining code should be left as-is
var PT_AC_SupportLevel = -1;	// -1 none (default), 0 document.write, 1 innerHTML, 2 getElementById.innerHtml 
var PT_AC_SrcArray = new Array();
var PT_AC_Total = 0;

if (document.getElementsByTagName) {
	if (document.getElementsByTagName("HEAD")[0].innerHTML) {
		if (document.getElementById)
			PT_AC_SupportLevel = 2;
		else
			PT_AC_SupportLevel = 1;
	}
}
else if (document.all) {
	if (document.all[0].innerHTML) {
		if (document.getElementById)
			PT_AC_SupportLevel = 2;
		else
			PT_AC_SupportLevel = 1;
	}
}

function PT_AC_CheckMaintWindow() {	
	PT_AC_SupportLevel = 0;
	if (PT_AC_OldBrowserSupport == 1) {
		var PT_AC_Now = new Date();
		PT_AC_Now.setHours(PT_AC_Now.getHours() + (PT_AC_Now.getTimezoneOffset()/60) - 5);
		var PT_AC_Day = PT_AC_Now.getDay();
		var PT_AC_Month = PT_AC_Now.getMonth();
		var PT_AC_Date = PT_AC_Now.getDate();
		if (PT_AC_Day == 3 || PT_AC_Day == 6) {
			if ((PT_AC_Month > 4 || (PT_AC_Month == 4 && ((PT_AC_Day == 3 && PT_AC_Date > 3) || (PT_AC_Day == 6 && PT_AC_Date > 6)))) &&
				(PT_AC_Month < 10 || (PT_AC_Month == 10 && ((PT_AC_Day == 3 && PT_AC_Date < 28) || (PT_AC_Day == 6 && PT_AC_Date < 31)))))
				PT_AC_Now.setHours(PT_AC_Now.getHours() + 1);
			if (PT_AC_Now.getHours() >= 5 && PT_AC_Now.getHours() <= 6)
				PT_AC_SupportLevel = -1;
		}
	}
}

function PT_AC_Write(PT_AC_Src, PT_AC_DefaultHTML) {
	PT_AC_Total++;
	PT_AC_SrcArray[PT_AC_Total] = PT_AC_Src + '&fmt=JsEnhanced&DivId=' + PT_AC_Total;
	if (PT_AC_SupportLevel > 0)
		document.write ('<div id="PT_AC_DivId'+PT_AC_Total+'">'+PT_AC_DefaultHTML+'<\/div>');
	else if (PT_AC_SupportLevel == 0)
		document.write ('<script src="' + PT_AC_SrcArray[PT_AC_Total] + '"><\/script>');
	else
		document.write (PT_AC_DefaultHTML);
}

function PT_AC_Rewrite(PT_AC_DivId, PT_AC_NewHTML) {
	if (PT_AC_SupportLevel == 2)
		document.getElementById(PT_AC_DivId).innerHTML=PT_AC_NewHTML + "\n";
	else if (PT_AC_SupportLevel == 1)
		eval ('document.all.' + PT_AC_DivId + '.innerHTML =PT_AC_NewHTML + "\n";');
	else
		document.write (PT_AC_NewHTML);
}

function PT_AC_Iterate() {
	if (PT_AC_SupportLevel > 0 && PT_AC_Total > 0) {
		var PT_AC_Ctr;
		for (PT_AC_Ctr = 1; PT_AC_Ctr <= PT_AC_Total; PT_AC_Ctr++) {
			document.write ('<script src="' + PT_AC_SrcArray[PT_AC_Ctr] + '"><\/script>');
		}
	}
}

if (PT_AC_SupportLevel == -1 && PT_AC_OldBrowserSupport > 0)
		PT_AC_CheckMaintWindow();

function PTAC_SubmitTalkback()
{
  var domain = document.getElementById("PTAC_domain").value;
  var newUrl = "http://" + domain + "/dir-app/acx/ACPost.aspx?toUserId=0";
  newUrl += PTAC_AddUrlParam("webtag");
  newUrl += PTAC_AddUrlParam("folderId");
  newUrl += PTAC_AddUrlParam("tid");
  newUrl += PTAC_AddUrlParam("subject");
  newUrl += PTAC_AddUrlParam("contentId");
  newUrl += PTAC_AddUrlParam("returnUrl");
  newUrl += PTAC_AddUrlParam("contentUrl");
  newUrl += PTAC_AddUrlParam("signature");
  newUrl += PTAC_AddUrlParam("body");
  window.location = newUrl;
}

function PTAC_AddUrlParam(elmId)
{
  var ctl = document.getElementById("PTAC_" + elmId);
  if (ctl) {
    return "&" + elmId + "=" + ctl.value;
      } else {
    return "";
        }
}



//******** End of Active Content JavaScript ****

