// tbtbx.js - icy - January 2000
// tbtbx.js - icy - June 2000

var tbtbxCapable = false;
var MSIEIndex = navigator.userAgent.indexOf("MSIE");

if (navigator.userAgent.indexOf("MSIE") != -1 &&
	navigator.userAgent.indexOf("Windows") != -1 && 
	navigator.userAgent.substring((MSIEIndex + 5),(MSIEIndex + 6)) > 3 &&
        navigator.cookieEnabled == true)
{
	tbtbxCapable = true;
	var newLineChar = String.fromCharCode(10);
	var char34      = String.fromCharCode(34);
	var LastPTBMenu = "";
	var CurCTBMenu  = "";
	var IsPTBMenu      = false;
	var frameSupported = false;
	var IsMenuDropDown = true;
	var htmlInProgress;
	var x  = 0;
	var y  = 0;
	var x2 = 0;
	var y2 = 0;
	var PTMenuWidth;
	var ToolbarMinWidth;
	var ToolbarMenu;
	var toolbarBackgroundColor = "white";
	var ToolbarLoaded = false;
	var PTBDefaultColorArray  = new Array(3);
	var CTBDefaultColorArray  = new Array(3);
	var PTBCurrentColorArray  = new Array(3);
	var CTBCurrentColorArray  = new Array(3);
	var PTBFont = "bold xx-small Verdana";
	var CTBFont = "bold 11px Arial";
	var BorderStr = "border-color:black;border-style:solid;border-width:0;";

	var SepChr = "|";
	var MaxMenu = 30;
	var TotalMenu = 0;
	var arrMenuInfo = new Array(30);

	document.write("<SPAN ID='StartMenu' STYLE='display:none;'></SPAN>");

	htmlInProgress = 
		"<DIV ID='toolbarArea' STYLE='border:0px solid #333333;width:100%;height=85;'>" +
			"<DIV ID='toolbarTopRow' STYLE='position:relative;height:0;left:0;width=100%;'>" +
				"<DIV ID='cbArea' STYLE='position:absolute;top:0;left:0;height:65;width:352;'><!--CBANNER_START_PLACEHOLDER--><!--CBANNER_END_PLACEHOLDER--></DIV>" +
				"<DIV ID='pbArea' STYLE='height:65px;width:350;vertical-align:bottom;text-align:right;position:absolute;top:0;right:0;'><!--PORTAL_BANNER_START_PLACEHOLDER--><!--PORTAL_BANNER_END_PLACEHOLDER--></DIV>" +
			"</DIV>" +
			"<DIV ID='toolbarBottomRow' STYLE='position:relative;top:61;height:22;width:100%;'>" +
				"<DIV ID='ctbArea' STYLE='position:absolute;top:0px;height:20;width:100%;padding-top:2px;' NOWRAP><!--CONTENT_TOOLBAR_PLACEHOLDER--></DIV>" +
			"</DIV>" + 
		"</DIV>" +
		"<SCRIPT TYPE='text/javascript'>" + 
		"   var ToolbarMenu = StartMenu;" + 
		"</SCRIPT>" + 
		"<DIV WIDTH=100%>";
	
	window.onresize  = resizeToolbar;	
	PTBDefaultColorArray[0]	= PTBCurrentColorArray[0] = "peachpuff";    // background color;
	PTBDefaultColorArray[1]	= PTBCurrentColorArray[1] = "black";	    // text font color
	PTBDefaultColorArray[2] = PTBCurrentColorArray[2] = "red";	    // mouseover font color
	CTBDefaultColorArray[0]	= CTBCurrentColorArray[0] = "peachpuff";    // background color;
	CTBDefaultColorArray[1] = CTBCurrentColorArray[1] = "black";	    // text font color
	CTBDefaultColorArray[2] = CTBCurrentColorArray[2] = "red";	    // mouseover font color

}

function generateToolbars()
{
	htmlInProgress += "</DIV>";
	document.write(htmlInProgress);
	ToolbarLoaded = true;
	//PTMenuWidth     = document.body.offsetWidth-30;
	PTMenuWidth     = Math.max(ctbArea.offsetWidth, document.body.clientWidth);
	ToolbarMinWidth = PTMenuWidth;
	toolbarArea.style.backgroundColor     = toolbarBackgroundColor;
	//ptbArea.style.backgroundColor         = PTBDefaultColorArray[0];
	ctbArea.style.backgroundColor         = CTBDefaultColorArray[0];
	resizeToolbar();
	for (i = 0; i < TotalMenu; i++) 
	{
		thisMenu = document.all(arrMenuInfo[i].IDStr);
		if (thisMenu != null)
		{
			if (arrMenuInfo[i].IDStr == LastPTBMenu && arrMenuInfo[i].type == "R")
			{
				arrMenuInfo[i].type = "A";
				arrMenuInfo[i].unit = 200;
			}
			
			if (arrMenuInfo[i].type == "A")
				thisMenu.style.width = arrMenuInfo[i].unit;
			else 
				thisMenu.style.width = Math.round(arrMenuInfo[i].width * arrMenuInfo[i].unit) + 'em';
		}
	}
}

function resizeToolbar()
{
	//w = Math.max(ToolbarMinWidth, document.body.clientWidth) - ToolbarMinWidth;
	w =  Math.max(document.body.clientWidth, document.body.offsetwidth);
	//ptbArea.style.left   = (250);
	//ptbArea.style.width  = PTMenuWidth;
	//ptbArea.style.width  = 10;
	//ptAdArea.style.left    = w;
	pbArea.style.right    = (0);
	pbArea.style.width   = (450);
	//ctbArea.style.width = ToolbarMinWidth;
	//ctbArea.style.width = document.body.clientWidth-5;
}

function setToolbarBackgroundColor(color)
{	
	toolbarBackgroundColor = color;
	if (ToolbarLoaded == true)
		toolbarArea.style.backgroundColor = toolbarBackgroundColor;
}	

function setDefaultPortalToolbarColor(bgColor, fontColor, mouseoverColor)
{	
	if (bgColor   != "")	  PTBDefaultColorArray[0] = bgColor;
	if (fontColor != "")	  PTBDefaultColorArray[1] = fontColor;
	if (mouseoverColor != "") PTBDefaultColorArray[2] = mouseoverColor;
}

function setDefaultContentToolbarColor(bgColor, fontColor, mouseoverColor)
{
	if (bgColor   != "")	  CTBDefaultColorArray[0] = bgColor;
	if (fontColor != "")	  CTBDefaultColorArray[1] = fontColor;
	if (mouseoverColor != "") CTBDefaultColorArray[2] = mouseoverColor;
}

function setCTBMenuColor(MenuIDStr, bgColor, fontColor, mouseoverColor)
{	
	if (ToolbarLoaded == false) return;
	if (CurCTBMenu != "")
	{
		PrevID = CurCTBMenu.substring(4);
		CurCTBMenu = "";
		setCTBMenuColor(PrevID, CTBDefaultColorArray[0], CTBDefaultColorArray[1], CTBDefaultColorArray[2]);
	}
	var id = "AM_" + "CTB_" + MenuIDStr;
	var thisMenu = document.all(id);
	if (thisMenu != null)
	{
		CurCTBMenu = "CTB_" + MenuIDStr;
		CTBCurrentColorArray[0] = bgColor;
		CTBCurrentColorArray[1] = fontColor;
		CTBCurrentColorArray[2] = mouseoverColor;
		if (bgColor != "")
			thisMenu.style.backgroundColor = bgColor;
		if (fontColor != "")
			thisMenu.style.color = fontColor;
		id = "CTB_" + MenuIDStr;
		thisMenu = document.all(id);
		if (thisMenu != null)
		{
			if (bgColor != "")
				thisMenu.style.backgroundColor = bgColor;
			if (fontColor != "")
			{
				i = 0;
				id = "AS_" + "CTB_" + MenuIDStr;
				thisMenu = document.all.item(id,i);
				while (thisMenu != null)
				{
					thisMenu.style.color = fontColor;
					i += 1;
					thisMenu = document.all.item(id,i);
				}
			}
		}
	}
}


function setPortalAdBanner(Gif,Url,AltStr,BanWidthStr,BanHeightStr)
{	
	setBanner(Gif,Url,AltStr,BanWidthStr,BanHeightStr,"<!--PORTAL_AD_START_PLACEHOLDER-->","<!--PORTAL_AD_END_PLACEHOLDER-->");
}

function setContentBanner(Gif,Url,AltStr,BanWidthStr,BanHeightStr)
{	
	setBanner(Gif,Url,AltStr,BanWidthStr,BanHeightStr,"<!--CBANNER_START_PLACEHOLDER-->","<!--CBANNER_END_PLACEHOLDER-->");
}

function setPortalBanner(Gif,Url,AltStr,BanWidthStr,BanHeightStr)
{	
	setBanner(Gif,Url,AltStr,BanWidthStr,BanHeightStr,"<!--PORTAL_BANNER_START_PLACEHOLDER-->","<!--PORTAL_BANNER_END_PLACEHOLDER-->");
}

function setPortalBannerContent(TextContent,BanWidthStr,BanHeightStr)
{
	//alert(TextContent);
	BanBegTag = "<!--PORTAL_BANNER_START_PLACEHOLDER-->";
	BanEndTag = "<!--PORTAL_BANNER_END_PLACEHOLDER-->";
	begPos = htmlInProgress.indexOf(BanBegTag);
	endPos = htmlInProgress.indexOf(BanEndTag) + BanEndTag.length;
	SubStr = htmlInProgress.substring(begPos, endPos);
	SrcStr = TextContent;
	SrcStr = BanBegTag + SrcStr + BanEndTag;
	htmlInProgress = htmlInProgress.replace(SubStr, SrcStr);	
}

function setBanner(BanGif, BanUrl, BanAltStr, BanWidthStr, BanHeightStr, BanBegTag, BanEndTag)
{
	begPos = htmlInProgress.indexOf(BanBegTag);
	endPos = htmlInProgress.indexOf(BanEndTag) + BanEndTag.length;
	SubStr = htmlInProgress.substring(begPos, endPos);
	SrcStr = "";
	if (BanUrl != "")
		SrcStr += "<A Target='_top' HREF='" + BanUrl + "'>";
	SrcStr += "<IMG SRC='" + BanGif + "' ALT='" + BanAltStr + "' BORDER=0 width='" + BanWidthStr + "' height ='" + BanHeightStr + "'>";
	if (BanUrl != "")
		SrcStr += "</A>";
	SrcStr = BanBegTag + SrcStr + BanEndTag;
	htmlInProgress = htmlInProgress.replace(SubStr, SrcStr);	
}

function setCTBSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{
	tempID = "CTB_" + MenuIDStr;
	setSubMenuWidth(tempID, WidthType, WidthUnit);
}

function setPTBSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{
	tempID = "PTB_" + MenuIDStr;
	setSubMenuWidth(tempID, WidthType, WidthUnit);
}

function setSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{
	var fFound = false;
	if (TotalMenu == MaxMenu)
	{
		alert("TBTBX: Unable to process menu. Maximum of " + MaxMenu + " reached.");
		return;
	}

	for (i = 0; i < TotalMenu; i++)
		if (arrMenuInfo[i].IDStr == MenuIDStr)
		{
			fFound = true;
			break;
		}

	if (!fFound)
	{
		arrMenuInfo[i] = new menuInfo(MenuIDStr);
		TotalMenu += 1;
	}

	if (!fFound && WidthType.toUpperCase().indexOf("DEFAULT") != -1)
	{
		arrMenuInfo[i].type = "A";
		arrMenuInfo[i].unit = 160;
	}
	else
	{
		arrMenuInfo[i].type = (WidthType.toUpperCase().indexOf("ABSOLUTE") != -1)? "A" : "R";
		arrMenuInfo[i].unit = WidthUnit;
	}
}

function menuInfo(MenuIDStr)
{
	this.IDStr = MenuIDStr;
	this.type  = "";
	this.unit  = 0;
	this.width = 0;
	this.count = 0;
}

function updateSubMenuWidth(MenuIDStr)
{
	for (i = 0; i < TotalMenu; i++)
		if (arrMenuInfo[i].IDStr == MenuIDStr)
		{
			if (arrMenuInfo[i].width < MenuIDStr.length) 
				arrMenuInfo[i].width = MenuIDStr.length;
			arrMenuInfo[i].count = arrMenuInfo[i].count + 1;
			break;
		}
}

function addContentMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{ 	
	if (addContentMenu.arguments.length > 4)
		TargetStr = addContentMenu.arguments[4];
	else
		TargetStr = "_top";
	tempID = "CTB_" + MenuIDStr;
	addMenu(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, true); 
}

function addPortalMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{
	TargetStr = "_top";
	tempID = "PTB_" + MenuIDStr;
	addMenu(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, false); 
	LastPTBMenu = tempID;
}

function addMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, ContentToolbarFlag)
{
	cFont   = ContentToolbarFlag ? CTBFont : PTBFont;
	cColor0 = ContentToolbarFlag ? CTBDefaultColorArray[0] : PTBDefaultColorArray[0];
	cColor1 = ContentToolbarFlag ? CTBDefaultColorArray[1] : PTBDefaultColorArray[1];
	cColor2 = ContentToolbarFlag ? CTBDefaultColorArray[2] : PTBDefaultColorArray[2];
	tagStr  = ContentToolbarFlag ? "<!--CONTENT_TOOLBAR_PLACEHOLDER-->" : "<!--PORTAL_TOOLBAR_PLACEHOLDER-->";
	MenuStr = newLineChar;
	if (ContentToolbarFlag == false && LastPTBMenu != "")
		MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>" + SepChr + "&nbsp;</SPAN>"; 
	  MenuStr += "<A TARGET='" + TargetStr + "' TITLE='" + MenuHelpStr + "'" +
			   "   ID='AM_" + MenuIDStr + "'" +
			   "   STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";background-color:" + cColor0 + ";color:" + cColor1 + ";'";
	if (MenuURLStr != "")
	{
		MenuStr += " HREF='" + MenuURLStr + "'";
	}
	else
		MenuStr += " HREF='' onclick='window.event.returnValue=false;'";

	MenuStr += " onmouseout="  + char34 + "mouseMenu('out' ,'" + MenuIDStr + "'); hideMenu();" + char34 + 
	           " onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "'); doMenu('"+ MenuIDStr + "');" + char34 + ">" +
			   "&nbsp;" + MenuDisplayStr + "&nbsp;</a>";
	if (ContentToolbarFlag)
		MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>&nbsp;" + SepChr + "</SPAN>";
	MenuStr += tagStr;
	htmlInProgress = htmlInProgress.replace(tagStr, MenuStr);	
	setSubMenuWidth(MenuIDStr,"default",0);
}

function addContentSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr)
{	
	if (addContentSubMenu.arguments.length > 3)
		TargetStr = addContentSubMenu.arguments[3];
	else
		TargetStr = "_top";
		
	tempID = "CTB_" + MenuIDStr;
	addSubMenu(tempID,SubMenuStr,SubMenuURLStr,TargetStr,true); 
}

function addPortalSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr)
{	
	TargetStr = "_top";
	tempID = "PTB_" + MenuIDStr;
	addSubMenu(tempID,SubMenuStr,SubMenuURLStr,TargetStr,false); 
}

function addSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr, TargetStr, ContentToolbarFlag)
{
	cFont   = ContentToolbarFlag ? CTBFont : PTBFont;
	cColor0 = ContentToolbarFlag ? CTBDefaultColorArray[0] : PTBDefaultColorArray[0];
	cColor1 = ContentToolbarFlag ? CTBDefaultColorArray[1] : PTBDefaultColorArray[1];
	cColor2 = ContentToolbarFlag ? CTBDefaultColorArray[2] : PTBDefaultColorArray[2];
	var MenuPos = MenuIDStr.toUpperCase().indexOf("MENU");
	if (MenuPos == -1) 
	{
		MenuPos = MenuIDStr.length;
	}
	URLStr = SubMenuURLStr
	var LookUpTag  = "<!--" + MenuIDStr + "-->";
	var sPos = htmlInProgress.indexOf(LookUpTag);
	if (sPos <= 0)
	{
		htmlInProgress += newLineChar + newLineChar +
				"<SPAN ID='" + MenuIDStr + "'" +
				" STYLE='filter:alpha (OPACITY=90);display:none;position:absolute;width:160;background-color:" + cColor0 + ";" + 
                                //BorderStr + "padding-top:0;padding-left:1;padding-bottom:13;z-index:9;'" +
                                BorderStr + "z-index:9;'" +
				" onmouseout='hideMenu();'>";
		if (frameSupported == false || ContentToolbarFlag == false)
			htmlInProgress += "<HR STYLE='position:absolute;left:0;top:0;color:" + cColor1 + "' SIZE=1>";
			
		htmlInProgress += "<DIV STYLE='position:relative;left:0;top:0;padding:3px;'>";
	}

	TempStr = newLineChar +
				"<A ID='AS_" + MenuIDStr + "'" +
				"   STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";color:" + cColor1 + "'" +
				"   HREF='" + URLStr + "' TARGET='" + TargetStr + "'" +
				" onmouseout="  + char34 + "mouseMenu('out' ,'" + MenuIDStr + "');" + char34 + 
				" onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "');" + char34 + ">" +
				"&nbsp;" + SubMenuStr + "</A><BR>" + LookUpTag;
	if (sPos <= 0)
		htmlInProgress += TempStr + "</DIV></SPAN>";
	else
		htmlInProgress = htmlInProgress.replace(LookUpTag, TempStr);	
	updateSubMenuWidth(MenuIDStr);	
}

function addContentSubMenuLine(MenuIDStr)
{	
	tempID = "CTB_" + MenuIDStr;
	addSubMenuLine(tempID,true);
}

function addPortalSubMenuLine(MenuIDStr)
{	
	tempID = "PTB_" + MenuIDStr;
	addSubMenuLine(tempID,false);
}

function addSubMenuLine(MenuIDStr, ContentToolbarFlag)
{
	var LookUpTag = "<!--" + MenuIDStr + "-->";
	var sPos = htmlInProgress.indexOf(LookUpTag);
	if (sPos > 0)
	{
		cColor  = ContentToolbarFlag? CTBDefaultColorArray[1] : PTBDefaultColorArray[1];
		TempStr = newLineChar + "<HR STYLE='color:" + cColor + "' SIZE=1>" + LookUpTag;
		htmlInProgress = htmlInProgress.replace(LookUpTag, TempStr);
	}
}

function mouseMenu(id, MenuIDStr) 
{
	IsPTBMenu   = (MenuIDStr.toUpperCase().indexOf("PTB_") != -1);
	IsMouseout  = (id.toUpperCase().indexOf("OUT") != -1);
	if (IsMouseout)
	{
		color = IsPTBMenu ? PTBDefaultColorArray[1] : CTBDefaultColorArray[1];
		if (MenuIDStr == CurCTBMenu && CTBCurrentColorArray[1] != "") 
			color = CTBCurrentColorArray[1];
	}
	else
	{
		color = IsPTBMenu ? PTBDefaultColorArray[2] : CTBDefaultColorArray[2];
		if (MenuIDStr == CurCTBMenu && CTBCurrentColorArray[2] != "") 
			color = CTBCurrentColorArray[2];
	}
	window.event.srcElement.style.color = color;
}

function doMenu(MenuIDStr) 
{
	var thisMenu = document.all(MenuIDStr);
	if (ToolbarMenu == null || thisMenu == null || thisMenu == ToolbarMenu) 
	{
		window.event.cancelBubble = true;
		return false;
	}
	window.event.cancelBubble = true;
	ToolbarMenu.style.display = "none";
	showElement("SELECT");
	showElement("OBJECT");
	ToolbarMenu = thisMenu;
	IsPTBMenu = (MenuIDStr.toUpperCase().indexOf("PTB_") != -1);
	x  = window.event.srcElement.offsetLeft + window.event.srcElement.offsetParent.offsetLeft;
	if (MenuIDStr == LastPTBMenu) 
		x += (window.event.srcElement.offsetWidth - thisMenu.style.posWidth);
	x2 = x + window.event.srcElement.offsetWidth;
	y  = (IsPTBMenu) ? 
		 (toolbarTopRow.offsetHeight) :
		 (toolbarTopRow.offsetHeight + 59 + toolbarBottomRow.offsetHeight);
	thisMenu.style.top  = y;
	thisMenu.style.left = x;
	thisMenu.style.clip = "rect(0 0 0 0)";
	thisMenu.style.display = "block";
	window.setTimeout("showMenu()", 2);
	return true;
}

function showMenu() 
{
	if (ToolbarMenu != null) 
	{ 
		IsMenuDropDown = (frameSupported && IsPTBMenu == false) ? false : true;
		if (IsMenuDropDown == false)
		{
			y = (y - ToolbarMenu.offsetHeight - toolbarBottomRow.offsetHeight);
			if (y < 0) y = 0;
			ToolbarMenu.style.top = y;
		}
		y2 = y + ToolbarMenu.offsetHeight;
		ToolbarMenu.style.clip = "rect(auto auto auto auto)";
		hideElement("SELECT");
		hideElement("OBJECT");
	}
}

function hideMenu()
{
	if (ToolbarMenu != null && ToolbarMenu != StartMenu) 
	{
		cY = event.clientY + document.body.scrollTop;
		if ( (event.clientX >= (x+5) && event.clientX <= x2) &&
			 ((IsMenuDropDown == true  && cY > (y-10) && cY <= y2) ||
			  (IsMenuDropDown == false && cY >= y     && cY <= (y2+10)) ))
		{
			window.event.cancelBubble = true;
			return; 
		}
		ToolbarMenu.style.display = "none";
		ToolbarMenu = StartMenu;
		window.event.cancelBubble = true;
		showElement("SELECT");
		showElement("OBJECT");
	}
}

function hideElement(elmID)
{
	for (i = 0; i < document.all.tags(elmID).length; i++)
	{
		obj = document.all.tags(elmID)[i];
		if (! obj || ! obj.offsetParent)
			continue;
		objLeft   = obj.offsetLeft;
		objTop    = obj.offsetTop;
		objParent = obj.offsetParent;
		while (objParent.tagName.toUpperCase() != "BODY")
		{
			objLeft  += objParent.offsetLeft;
			objTop   += objParent.offsetTop;
			objParent = objParent.offsetParent;
		}
		objTop = objTop - y;
		if (x > (objLeft + obj.offsetWidth) || objLeft > (x + ToolbarMenu.offsetWidth))
			;
		else if (objTop > ToolbarMenu.offsetHeight)
			;
		else if (IsPTBMenu && (y + ToolbarMenu.offsetHeight) <= 80)
			;
		else
			obj.style.visibility = "hidden";
	}
}

function showElement(elmID)
{
	for (i = 0; i < document.all.tags(elmID).length; i++)
	{
		obj = document.all.tags(elmID)[i];
		if (! obj || ! obj.offsetParent)
			continue;
		obj.style.visibility = "";
	}
}
var m_width;
var l_width = 165;
var r_width = 200;
document.write('<span style=\"width:100%;height:1px;position:absolute;\">&nbsp;</span>');

		m_width = document.body.offsetWidth-390;
		if(m_width < 480)
		{
			m_width = 480;
		}
		r_indent = m_width + l_width + 5;
		
	function toggle_signer(noder,secname) 
		{
			var currElm;
			var ThisElm;
			currElm = document.all(secname);
			thisElm = document.all(noder);
			if (currElm.style.display == "none")
				{
					currElm.style.display = "";
					//thisElm.innerHTML = '-';
				}
			else
				{
					currElm.style.display = "none";
					//thisElm.innerHTML = '+';
				}
		}
	function toggle_sign(noder)
		{
		alert(document.all(noder).innerHTML);
		}
	function toggle(secname,secaname) 
		{
			var currElm;
			var currElm2;
			currElm = document.all(secname);
			currElm2 = document.all(secaname);
			if (currElm.style.display == "none")
				{
					currElm.style.display = "";
					currElm2.style.display = "";
				}
			else
				{
					currElm.style.display = "none";
					currElm2.style.display = "none";
				}
		}
    function uncheckAll(elmID)
    {
      for (var i=0;i<document.all.tags(elmID).length;i++)
      {
        var e = document.all.tags(elmID)[i];
        if (e.className != 'cal_unboxed')
        e.className = 'cal_unboxed';
      }
    }
	function toggle_border(secname) 
		{
			var currElm;
			currElm = document.all(secname);
			if (currElm.className == "cal_unboxed")
				{
					currElm.className = "cal_boxed";
				}
			else
				{
					currElm.className = "cal_unboxed";
				}
		}
	function Msg()
		{
			document.all('msg_area').innerHTML= "<font color=#FF0000>Asagidan tarihi tiklayarak onaylayin.</font>";
		}
	function check_input(item,chkStr)
			{
				if (item.length < chkStr)
				 {
					return false;
					//alert('sfs');
				}
			}
	function help_cntxt(id)
		{
		if (id=='archivebox')
			{
			alert('ay/gün/yıl şeklinde bir tarih girmelisiniz.\nTarih formatında bir hata olmaması açısından\ntakvim yardımını kullanmanızı\nöneririz.\n\nDünya Online');
			}
		if (id=='archivebutton')
			{
			alert('Gazetemizin arşivinin bir kısmını internet üzerinden tarayabilirsiniz.\nBu butonu tıklayadığınızda karşınıza çikan kutuya\ngörmek istediğiniz arşvi tarihini girin.\nİlgili kutularda mouse ile sağklik yaparak yardım\naçıklamalarını okuyabilirsiniz.\n\nDünya Online');
			}
		if (id=='archiveSubmit')
			{
			alert('Seçmiş olduğunuz tarih arşiv görüntüleme kutusuna yazıldı.\nGÖRÜNTÜLE butonunu tıklayarak bu tarihin gazetesini görebilirsiniz.\n\nDünya Online');
			}
		if (id=='calendarLink')
			{
			alert('Tarih formatını düzgün girebilmeniz ve\narşiv taramasında kolaylık olması açısından\takvim yardımını kullanmanızı tavsiye ederiz.\n\nDünya Online');
			}
		if (id=='forumHelp')
			{
			alert('Forum kullanıcı kayıt bilgilerinizi görmek için tıklayın.\n\nDünya Online');
			}
		if (id=='forumLogoutHelp')
			{
			alert('Şu an açık olan oturumunuzu kapatmak için tıklayın.\n\nDünya Online');
			}		
		return false;
		}		
	function checkusr(username,sessionname,moderatorname)
		{
		if (sessionname=='')
			{
			stater = "Öncelikle oturumunuzu açmalısınız";
			document.all('DoGüncelle').disabled="True";
			}
			else
			{
				if (username==sessionname)
					{
					stater = "Güncelle";
					document.EditForm.action="forum_xtedit.asp";
					}
				else if (moderatorname==sessionname)
					{
					stater = "Güncelle [moderatör]";
					document.EditForm.action="forum_xtedit.asp";
					}
				else
					{
					//alert('hadi lan\n'+username+'\n'+sessionname);
					stater = "Siz bu mesajı güncellemeye yetkili değilsiniz";
					document.all('DoGüncelle').disabled="True";
					}
			}
		document.all('DoGüncelle').value=stater;
		}
function DoLogInEr(sessionname)
	{
	if (sessionname=='')
		{
		document.all('LogInEr').innerHTML="<font color=#F80000><marquee width=100>Oturumunuzu Açın</marquee></font>";
		}	
	else
		{
		document.all('LogInEr').innerHTML="Bilgilerinizi Güncelleyin";
		}
	}
function ChkTopicForm(var1,var2) {
	if (document.PostTopic.var1.value=='') {
		alert('deneme');
	}
	return false;
}

function pageOpen(pager){
	var wid = pageOpen.arguments[1];
	var hgt = pageOpen.arguments[2];
	var scrl = pageOpen.arguments[3];
	var name = pageOpen.arguments[4];
		if(!wid) wid = 350;
		if(!hgt) hgt = 400;
		if(!scrl) scrl = 'AUTO';
		if(!name) name = 'empty';
	window.open(pager,name,'toolbar=no,location=no,directories=no,title=no,status=no,menubar=no,resizable=yes,width=' + wid + ',height=' + hgt + ',marginwidth=0,scrollbars=' + scrl + ',marginheight=0');
}