// <!-- 18-06-2005 www.insat-net.de Hide from old browsers.
function CopyLog(){
	refImg= new Image();
	refImg.src = "/cgi-bin/copylog.cgi";
}

function GetCookie(sCookie){
	var aCookie = document.cookie.split(",");
	for(var i=0; i < aCookie.length; i++){
		var aCrumb = aCookie[i].split("=");
		if(sCookie == aCrumb[0]){
			return unescape(aCrumb[1]);
		}
	}
	return "";
}

function SetCookie(sCookie, sValue){
	var NewCookie = "";
	var bExist = false;
	var aCookie = document.cookie.split(",");
	for(var i=0; i < aCookie.length; i++){
		if(aCookie[i]){
			var aCrumb = aCookie[i].split("=");
			if(sCookie == aCrumb[0]){
				NewCookie = NewCookie + sCookie + "=" + escape(sValue) + ",";
				bExist = true;
			}
			else{
				NewCookie = NewCookie + aCookie[i] + ",";
			}
		}
	}
	if(bExist == false){
		NewCookie = NewCookie + sCookie + "=" + escape(sValue) + ",";
	}
	document.cookie = NewCookie;
}

function CheckFrames(SectionID, RootPath, ItemID){
	if(window.name != "main"){
		window.name="root";
		var ContentPage = RootPath + "items.htm";
		var BannerPage = RootPath + "head.htm";
		var PageURL = "";
		var Search = "";
		var Hash = "";
		if(document.location.search == ""){
			Search = "?embedded=yes";
		}
		else{
			Search = document.location.search + "&embedded=yes";
		}
		if(document.location.hash != ""){
			Hash = document.location.hash;
		}
		PageURL = document.location.protocol + "//"+ document.location.host + document.location.pathname + Search + Hash;
		var ContentWidth;
		ContentWidth = GetCookie("contentwidth");
		if (ContentWidth == "") {ContentWidth = "240"};
		ItemID = (ItemID) ? ItemID : SectionID;
		document.write("<script language='JavaScript'>");
		document.write("  var SectionID = '" + SectionID + "';");
		document.write("  var ItemID = '" + ItemID + "';");
		document.write("</" + "script>");
		document.write(" \
			<frameset rows='60,*' cols='*'> \
				<frame name='banner' src='" + BannerPage + "' frameborder='0' marginwidth='0' marginheight='0' noresize scrolling='no'> \
				<frameset id='frsid' cols='" + ContentWidth + ",*' > \
					<frame name='contents' src='" + ContentPage + "' scrolling='auto' marginwidth='0' marginheight='0' frameborder='0'> \
					<frame name='main'     src='" + PageURL + "'     scrolling='auto' marginwidth='0' marginheight='0' frameborder='0'> \
				</frameset> \
			</frameset> \
			<noframes> \
				<body> \
					<p>This page is consist off frame, but your browser is not support this ability.</p> \
				</body> \
			</noframes> \
		");

	}
}
// End hiding from old browsers. -->
