function pcs_getCookie(strName) {
	var rgCookies= document.cookie.split("; ");
	for (var i= 0; i < rgCookies.length; i++) {
		var aCrumb= rgCookies[i].split("=");
		if (aCrumb[0] == strName) {
			return unescape(aCrumb[1]);
		}
	}
	return "";
}

function pcs_setCookie(strName, strValue) {
	document.cookie= strName + "=" + escape(strValue) + ";expires=" + pcs_getExpiredDateString() + ";";
}

function pcs_getExpiredDateString() {
	var cur_date= new Date();
	var year= cur_date.getFullYear()
	var month= cur_date.getMonth() + 1;
	var day= cur_date.getDate();
	var exp_date= new Date(year, month, day);
	return exp_date.toUTCString();
}

function pcs_ToggleZone(strZoneID, strImgID, strDashID, bFlag) {
	var oZone= document.all[strZoneID];
	var oImg= document.all[strImgID];
	if (oZone == null || oImg == null) return;
	var strDisplay= pcs_getCookie("ZoneDisplay_" + strDashID);
	if (strDisplay == "") strDisplay= "block";
		
	if (bFlag == null) {
		if (strDisplay == "block") strDisplay= "none";
		else strDisplay= "block";
	}
		
	oZone.style.display= strDisplay;
	pcs_setCookie("ZoneDisplay_" + strDashID, strDisplay);
		
	if (strDisplay == "block") oImg.src = '~/Images/Kernel/Colapse_Left.gif';
	else oImg.src = '~/Images/Kernel/Expand_Left.gif';
}

function pcs_Start() {
	try {
		var vs= document.all["__VIEWSTATE"];
		window.status= "ViewState: ";
	} catch (e) {}
}

function axp_OnFrameLoad() {
	var frame= window.frameElement;
	if (frame == null) return;
	var w= document.body.scrollWidth + parseInt(document.body.leftMargin) + parseInt(document.body.rightMargin);
	var h= document.body.scrollHeight + parseInt(document.body.topMargin) + parseInt(document.body.bottomMargin);
	var elem= frame.parentElement;
	window.status= w + "x" + h;
	frame.style.width= w;
	frame.style.height= h;
}