
// Retrieve the value of the cookie with the specified name.
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(sName, sValue)
{
  date = new Date();
  document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
}


//
// url syntax: url_address?param1=value1&param2=value2 ...
// ex: www.bingo.org?lang=en&topic=news
// ------------------------------------------------------

function PageParams() {
	this.URLParams = new Array();
	this.URLValues = new Array();
	this.parseParams = pageparams_Parse;
	this.parseParams();
	this.getParam = pageparams_GetParam;
}

function pageparams_Parse() {
	
	this.URLParams = new Array();
	this.URLValues = new Array();
	
	var strURL = document.location.href;
	var iPos = strURL.indexOf("?");
	var iAPos = -1;
	var strParam = "", strValue = "";
	var bOk = true;
	
	if (iPos == -1 || iPos == strURL.length - 1 ) return;
	
	var strParams = strURL.substring(iPos + 1, strURL.length )
	
	iPos = strParams.indexOf("=");
	while (iPos > 0) {

		strParam = strParams.substring(0, iPos);
		if (iPos == strParams.length - 1) {
			// the equals sign is the last char; empty value
			strValue = "";
			strParams = "";
		}
		else {
			
			// get string after the equals sign
			strValue = strParams.substring(iPos + 1, strParams.length);
			strParams = strValue;
			
			// get ampersand (param separator) position
			// and extract value
			iAPos = strValue.indexOf("&");
			if (iAPos == 0 ){
				// ampersand next to equal sign; this param is empty
				strValue = "";
			}
			else if (iAPos > 0) {
				strValue = strValue.substring(0, iAPos);
			}
			
			// get parameters following the ampersand char
			if (iAPos >= 0) {
				if (iAPos == strParams.length - 1) {
					// last char from string; no more params
					strParams = "";
					//alert("ampersand last");
				}
				else {
					strParams = strParams.substring(iAPos + 1, strParams.length);
				}
			}
			else {
				strParams = "";
			}
		}
		strValue = unescape(strValue);
		
		// store param/value
		this.URLParams[this.URLParams.length] = strParam;
		this.URLValues[this.URLValues.length] = strValue;
		
		//alert(strParam + "-" + strValue);
		//alert(strParams);
	
		iPos = strParams.indexOf("=");
	}
	
	//alert("" + URLParams.length);
	
}

// get a param value method
function pageparams_GetParam(strParam) {
	
	if (strParam == null || strParam == "") return "";
	
	for (i = 0; i < this.URLParams.length; i++) {
		if (this.URLParams[i] == strParam) return this.URLValues[i];
	}
	
	return "";
}

var pp = new PageParams();
var MENU1_PARAM = "mnu1";
var strParamMenu1Id = pp.getParam(MENU1_PARAM);

// ------------------------------------------------------
// menu related
// ------------------------------------------------------

var path = "";
var strMenu1Id = null;
var strCurrentMenu1Id = null;
var bFollowMenu = false;
var strLastGetNewDate = null;
var iLastGetNewDate = null;
var bDebugLast = false;

function isAbs(strHRef){

	bAbs = false;

	if (typeof(strHRef) != "string") return false;
	if (strHRef.length > 4 ) {
		strPrefix = strHRef.substring(0, 4);
		strPrefix = strPrefix.toLowerCase();
		if (strPrefix == "http") bAbs = true;
		if (strPrefix == "www.") bAbs = true;
	}
	return bAbs;
}


function getNewOld() {
	return "<img border='0' align='top' src='" + path + "images/nou2.gif'>";
}

// intoarce cod html pentru item-uri semnalizate cu NOU
// strDate - data adaugare articol in format ZZ/LL/AAAA !!!!!!!!!!!!
//         - null, "" etc => nu e nou
//         - "always" => e nou
//         - strDate - now < delay => nou
function getNew(strDate, bComputeLastUpdate) {

    var iNewDaysDelay = 2;
	var strNew = "";
	var strDateData = null, strLastNewData = null;
	var iDateSrc, iDateNow, iDayMilli, iDays, dateNow = new Date();
	var iLastDate ;
	
	if(typeof(strDate) == "undefined") return strNew;
	if(strDate == null || strDate == "") return strNew;
	if(typeof(strDate) != "string") return strNew;
	
	strNew = "<img border='0' align='top' src='" + path + "images/nou2.gif'>";
	
	if (strDate == "always") return strNew;
	
	// split date into pieces
	// date must be received in ROMANIAN FORMAT  ZZ/LL/AAAA
	strDateData = strDate.split("/");
	
	// get milliseconds for current date and source date
	
	iDateNow = Date.parse(new Date(dateNow.getFullYear(), dateNow.getMonth(), dateNow.getDate()));
	iDateSrc = Date.parse(new Date(parseInt(strDateData[2]), parseInt(strDateData[1]) - 1, parseInt(strDateData[0])));
	
	// milliseconds in a day
	iDayMilli = 1000 * 60 * 60 * 24; 
	
	// get num days since source date
	iDays = Math.round((iDateNow - iDateSrc)/iDayMilli);
	
	
	// if too many days, return nothing
	if (iDays > iNewDaysDelay) strNew = "";
	
	// compute last update day
	if (typeof(bComputeLastUpdate) == "undefined" || bComputeLastUpdate)
	{
	    if (typeof(strLastGetNewDate) == "undefined" || strLastGetNewDate == null || strLastGetNewDate == "")
	    {
	        // first call; just assign the date
	        strLastGetNewDate = strDate;
	        iLastGetNewDate = iDateSrc;
	    }
	    else
	    {
	        // split the last new date and compute milliseconds
        	strDateData = strLastGetNewDate.split("/");
        	iLastDate = Date.parse(new Date(parseInt(strDateData[2]), parseInt(strDateData[1]) - 1, parseInt(strDateData[0])));
        	
        	// save the last new date
        	//if (iDateSrc > iLastDate) 
        	if (iDateSrc > iLastGetNewDate) 
        	{
        	    strLastGetNewDate = strDate;
        	    iLastGetNewDate = iDateSrc;
        	}
	    }

       	strDateData = strLastGetNewDate.split("/");
       	if (strDateData[1].length == 1) strDateData[1] = "0" + strDateData[1];
       	if (strDateData[0].length == 1) strDateData[0] = "0" + strDateData[0];
       	strLastGetNewDate = strDateData[0] + "/" + strDateData[1] + "/" + strDateData[2];
	}
	
	//alert(iDays);
	
	return strNew;
	
}

function writeLastUpdate(strForceDate)
{
    var strHtml;
    
    strHtml = "<p class='update'>Actualizat la ";
    
    if (typeof(strForceDate) == "undefined" || strForceDate == null || strForceDate == "")
    {
        strHtml += strLastGetNewDate;
    }
    else
    {
        strHtml += strForceDate;
    }
    
    strHtml += "</p>\n";
    
	document.write(strHtml);
}

// intoarce cod html pentru item-uri semnalizate cu NOU
// strDate - data adaugare articol in format ZZ/LL/AAAA
//         - null, "" etc => nu e nou
//         - "always" => e nou
//         - strDate - now < delay => nou
function getNew2(strDate) {

    var iNewDaysDelay = 2;
	var strNew = "";
	var strDateData = null, strLastNewData = null;
	var iDateSrc, iDateNow, iDayMilli, iDays, dateNow = new Date();
	
	if(typeof(strDate) == "undefined") return strNew;
	if(strDate == null || strDate == "") return strNew;
	if(typeof(strDate) != "string") return strNew;
	
	strNew = "<img border='0' align='top' src='" + path + "images/nou2.gif'>";
	
	if (strDate == "always") return strNew;
	
	// split date into pieces
	// date must be received in ROMANIAN FORMAT  ZZ/LL/AAAA
	strDateData = strDate.split("/");
	
	// get milliseconds for current date and source date
	
	iDateNow = Date.parse(new Date(dateNow.getFullYear(), dateNow.getMonth(), dateNow.getDate()));
	iDateSrc = Date.parse(new Date(parseInt(strDateData[2]), parseInt(strDateData[1]) - 1, parseInt(strDateData[0])));
	
	// milliseconds in a day
	iDayMilli = 1000 * 60 * 60 * 24; 
	
	// get num days since source date
	iDays = Math.round((iDateNow - iDateSrc)/iDayMilli);
	
	
	// if too many days, return nothing
	if (iDays > iNewDaysDelay) strNew = "";
	
	//alert(iDays);
	
	return strNew;
	
}

function getARef(strHRef)
{

	ref = "";
	if (typeof(strHRef) == "string" && strHRef != "") {

		if (isAbs(strHRef)) {
			ref = " href=\"" + strHRef + "\"";
		}
		else {
			ref = " href=\"" + path + strHRef + "\"";
		}

	}
	return ref;
}



function writeMenu( strId, strText, strHRef, iType)
{
	var clsMenu = "menu";
	if (strParamMenu1Id == strId && bFollowMenu) clsMenu = "menusel";

	clsType = "";
	if (typeof(iType ) == "number") {
		if (iType == 1) clsType = "type1";
	}

	document.write("<p class=\"" + clsMenu + clsType + "\" ><a class=\"" + clsMenu + "\"" +  getARef(addUrlParam(strHRef, MENU1_PARAM, strId)) + ">" + strText + "</a></p>");
	strMenu1Id = null;
}

function writeDropMenu(strId, strText, iType) {

	strMenu1Id = strId;
	if (strParamMenu1Id == strId) strCurrentMenu1Id = strId;

	var drop_cls = "dropmenu";
	if (strParamMenu1Id == strMenu1Id && bFollowMenu) drop_cls = "dropmenusel";

	clsType = "";
	if (typeof(iType ) == "number") {
		if (iType == 1) clsType = "type1";
	}

	writeMenu(strId, "<span class=\"hasdropmenu\" onclick=\"toggle('divdropmenu_" + strId + "', 'imgdrop_" + strId + "')\">" + strText + "</span><img class='drop' id='imgdrop_" + strId + "' align=bottom src=\"" + path + "images/menu_dn.gif\"  onclick=\"toggle('divdropmenu_" + strId + "', 'imgdrop_" + strId + "')\">", "", iType);
	document.write("<div id=\"divdropmenu_" + strId + "\" class=\"" + drop_cls + clsType + "\" >");
	strMenu1Id = strId;
}

function writeDropMenuEnd() {
	strMenu1Id = null;
	document.write("</div>");
}

function writeItem1(strText, strHRef, strTarget)
{
	if (typeof(strTarget) != "string") strTarget = "";
	else {
		strTarget = " target='" + strTarget + "' ";
	}
	
	if (strHRef != null && strHRef != "") {
		if (strMenu1Id!=null) strHRef = addUrlParam(strHRef, MENU1_PARAM, strMenu1Id);
	}
	var strStyle="";
	
	if (bFollowMenu && strHRef !="" && window.location.href.indexOf(strHRef) >=0) strStyle="style='color:#ffff00' ";
	
	document.write("<p class=\"item1\"><a class=\"item1\" " + strStyle + getARef(strHRef) + strTarget + ">" + strText + "</a></p>");
}

function writeItem2(strText, strHRef, strTarget)
{
	if (typeof(strTarget) != "string") strTarget = "";
	else strTarget = " target='" + strTarget + "' ";
	
	if (strHRef != null && strHRef != "") {
		if (strMenu1Id!=null) strHRef = addUrlParam(strHRef, MENU1_PARAM, strMenu1Id);
	}

	var strStyle="";
	if (bFollowMenu && strHRef !="" && window.location.href.indexOf(strHRef) >=0) strStyle="style='color:#ffff00' ";

	document.write("<p class=\"item2\"><a class=\"item1\" " + strStyle + getARef(strHRef) + strTarget + ">" + strText + "</a></p>");
}

function addUrlParam(strUrl, strParam, strValue) {
	
	if (strUrl == null || strUrl == "") return strUrl;
	
	if (strUrl.indexOf("?") < 0 ) strUrl += "?";
	else strUrl += "&";
	
	strUrl += strParam + "=" + escape(strValue);
	
	return strUrl;
	
}

function toggle(strEl, strImg) {
	
	el = document.getElementById(strEl);
	if (typeof(el) != "object") return;

	if (el.style.display == "block") {
		el.style.display = "none";
	}
	else {
		el.style.display = "block";
	}

	img = document.getElementById(strImg);
	if (typeof(img) != "object") return;


	if (el.style.display == "block") {
		img.src = path + "images/menu_up.gif";
	}
	else {
		img.src = path + "images/menu_dn.gif";
	}

}



// ------------------------------------------------------
// other
// ------------------------------------------------------


function openWindow(strHRef, strName, w, h, bCenter){
	
	if (typeof(strName) == "undefined") strWindow = ""
	else strWindow = strName;

	strFlags = "toolbar=no,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes";
	
	if (typeof(w) != "number") w = .85 * screen.availWidth; 
	strFlags += ",width=" + w;

	if (typeof(h) != "number") h = .85 * screen.availHeight;
	strFlags += ",height=" + h;

	if (bCenter) {	
		l = Math.floor((screen.width - w)/2);
		t = Math.floor((screen.availHeight - h)/3);
		strFlags += ",left=" + l + ",top=" + t;
	}
		
	//alert(strFlags);
	frmImage = window.open(strHRef ,strWindow, strFlags);
	try {
		frmImage.focus();
	}
	catch(e) {
	}
	
}

function footer() {
	f = "<table width=\"100%\"><tr><td><p><a href=\"#top\"><img border=\"0\" src=\""+path+"images/top.gif\" width=\"19\" height=\"18\" ></a></p></td><td><p style=\"text-align:right;margin-right:5px\"><a href=\"#top\"><img border=\"0\" src=\""+path+"images/top.gif\" width=\"19\" height=\"18\" ></a></p></td></tr></table>";
	document.write(f);
}


function header() {
	return;
	strRel = getRootRel();
	h = "<a class='vio' href='" + strRel + "articles/ziua/ziua_1iun2005.aspx#hrebe" + "'>(inalt functionar de stat)</a>"
	document.write(h);
}

function getRootRel() {

	strRootRel = "";
	iRel = 0;
	strRoot = window.parent.document.location.href;
	strHRef = document.location.href;
	strRel = strHRef.substr(strRoot.length);

	if (strRel.indexOf("/") < 0) {
		iRel = 0;
	}
	else {
		rl = strRel.split("/");
		iRel = rl.length - 1;
	}
	
	for(i = 0; i < iRel; i++) {
		strRootRel += "../";
	}
	//alert(strRootRel);
	return strRootRel;
}

function getFlash(src, width, height) {

	str = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ";
	str += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" ";
	str += "width=\"" + width + "\" height=\"" + height + "\" id='' align=\"middle\"> ";
	str += "<param name=\"allowScriptAccess\" value=\"sameDomain\" /> ";
	str += "<param name=\"movie\" value=\"" + path + src + "\" /> ";
	str += "<param name=\"quality\" value=\"high\" /> ";
	str += "<param name=\"bgcolor\" value=\"#ffffff\" /> ";
	str += "<embed src=\"" + path + src + "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"" + width + "\" height=\"" + height + "\" name='' align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /> ";
	str += "</object>";

	return str;
}



function writeMenus(strPath)
{
	if (typeof(strPath) == "string") path = strPath;

	writeMenu("", "&nbsp;", "");
	writeMenu("home", "Home", "coruptia.aspx");

	writeMenu("scr", "Scrisori deschise " , "scrisori/scrisori.aspx", 1);
	/*
	writeDropMenu("scrdes", "Scrisori deschise " + getNew(), 1);
		writeItem1("<strong>Primul Ministru</strong>", "");
		writeItem2("10/11/2005 ", "docs/pm_10_11_2005.aspx");
		writeItem2("07/10/2005 ", "docs/pm_07_10_2005.aspx");
		writeItem2("08/09/2005 ", "docs/pm_08_09_2005.aspx");
		writeItem2("01/09/2005 ", "docs/pm_01_09_2005.aspx");
		writeItem2("20/07/2005 ", "docs/pm_20_07_2005.aspx");
		writeItem2("30/12/2004 ", "docs/pm_30_12_2004.aspx");
	writeDropMenuEnd();
	*/
	

	writeMenu("ce", "Ce este coruptia ? " + getNew("11/12/2009") , "ce_este.aspx");
	writeMenu("despre", "Despre asasini " + getNew("7/7/2010") , "despre.aspx");

	writeDropMenu("mafia_int", "Mafia IT - International "+ getNew("26/7/2010"));
		writeItem1("Hotnews, 24/07/2010 "+ getNew("26/7/2010"), "articles/hot/2010_07_24_hot.aspx");
		writeItem1("Hotnews, 23/07/2010 "+ getNew("26/7/2010"), "articles/hot/2010_07_23_hot.aspx");
		writeItem1("ItalyOne, 21/07/2010 "+ getNew("26/7/2010"), "articles/2010_07_21_italyone.aspx");
		writeItem1("Hotnews, 21/07/2010 "+ getNew("26/7/2010"), "articles/hot/2010_07_21_hot.aspx");
		writeItem1("Hotnews, 03/03/2010 "+ getNew("3/3/2010"), "articles/hot/2010_03_03_hot.aspx");
		writeItem1("Jurnalul National, <span style='letter-spacing:-1px'>07/11/2005</span> ", "articles/jurnalul/jn_07_11_2005.aspx");
		writeItem1("Conspiratie-Spionaj Mafia IT ", "articles/jurnalul/jn_1_iun_2005.aspx");
		writeItem1("Ziua, 29/03/2002", "editorial/ed_2002_03_29_ziua.aspx");
	writeDropMenuEnd();

	writeMenu("mfit", "Mafia IT - Romania", "mafia_it/mafia_it.aspx");

	writeDropMenu("lege_furt", "Lege de furt IT ! ");
		writeItem1("Rom&#226;nia Libera, 01/11/2005 ", "articles/rl/rl_01_11_2005.aspx");
		writeItem1("Document, 07/10/2005 ", "docs/pm_07_10_2005.aspx");
		writeItem1("Document, 01/09/2005 ", "docs/pm_01_09_2005.aspx");
		writeItem1("Document, 20/07/2005 ", "docs/pm_20_07_2005.aspx");
		writeItem1("Document, 30/12/2004 ", "docs/pm_30_12_2004.aspx");
		writeItem1("O.G. nr. 124/2000 " , "lege_furt.aspx");
	writeDropMenuEnd();

	writeDropMenu("orda", "ORDA - Penal " + getNew("23/7/2010"));
		writeItem1("Romania Libera, 23/07/2010 " + getNew("23/7/2010"), "articles/rl/2010_07_23_rl.aspx");
		writeItem1("ARLD", "arld.aspx");
		writeItem1("Document, 27/10/2005 ", "docs/pna_og_27_10_2005.aspx");
		writeItem1("Document, 07/10/2005 ", "docs/pm_07_10_2005.aspx");
		writeItem1("Plangere penala, 06/10/2005 " , "plangere.aspx");
		writeItem1("Ac. Catavencu, 17/08/2005 " , "articles/ac/ac_17_aug_2005.aspx");
		writeItem1("Ac. Catavencu, 03/08/2005 " , "articles/ac/ac_03_aug_2005.aspx");
		writeItem1("Gardianul, 02/08/2005 "  , "articles/gardianul/grd_02_aug_2005.aspx");
		writeItem1("Cotidianul, 02/08/2005", "articles/cotidianul/cot_2_aug_2005.aspx");
		writeItem1("Legea dreptului de autor"  , "lege_autor.aspx");
	writeDropMenuEnd();

	writeDropMenu("nico", "Nicoleta Bulgaru - Penal ");
		writeItem1("Cotidianul, 07/11/2005 ", "articles/cotidianul/cot_07_11_2005.aspx");
		writeItem1("Plangere penala,24/10/2005 " , "nico/penal_24_oct_2005.aspx");
		writeItem1("Ziua, 11/04/2002 " , "nico/ziua_11_apr_2002.aspx");
		writeItem1("Ziua, 8/04/2002 " , "nico/ziua_8_apr_2002.aspx");
		writeItem1("Adevarul, 23/01/2002 " , "nico/ad_23_ian_2002.aspx");
		writeItem1("Jurnalul National, 15/11/2000 " , "nico/jn_15_11_2000.aspx");
		writeItem1("Ora, 2000 " , "nico/ora_2000.aspx");
	writeDropMenuEnd();

	writeDropMenu("an", "Adrian Nastase ");
		writeItem1("Gandul, 05/11/2005 ", "articles/gandul/gandul_05_11_2005.aspx");
	writeDropMenuEnd();

	writeDropMenu("dann", "Dan Nica ");
		writeItem1("Radiografie ", "dan_nica.aspx");
		writeItem1("Nica - Crama ", "articles/adevarul/ad_6_apr_2005.aspx");
		writeItem1("Nica - Posta ", "articles/ziua/ziua_11_mai_2005.aspx");
		writeItem1("Nica - 112 ", "articles/ziua/ziua_27_aug_2004.aspx");
		writeItem1("Nica - Licente ", "dan_nica_licente.aspx");
		writeItem1("Impact Est ", "impact_est.aspx");
	writeDropMenuEnd();

	writeDropMenu("dinup", "Dinu Patriciu ");
		writeItem1("Evenimentul Zilei, <span style='letter-spacing:-1px'>07/11/2005 </span>", "articles/ev/ev_07_11_2005.aspx");
		writeItem1("Atac, 07/11/2005 ", "articles/atac/atac_07_11_2005.aspx");
		writeItem1("Atac, 06/11/2005 ", "articles/atac/atac_06_11_2005.aspx");
		writeItem1("Rom&#226;nia Libera, 13/10/2005 ", "articles/rl/rl_13_10_2005.aspx");
	writeDropMenuEnd();
	
	writeDropMenu("vlad", "Sebastian Vladescu " + getNew("14/12/2009"));
		writeItem1("Atac, 02/11/2005 ", "articles/atac/atac_02_11_2005.aspx");
		writeItem1("Bilant, 01/11/2005 ", "articles/bilant/bil_01_11_2005.aspx");
		writeItem1("Ev. Zilei, 30/10/2005 ", "articles/ev/ev_30_10_2005.aspx");
		writeItem1("Scrisoare, 05/09/2005 " + getNew("14/12/2009") + "<br>S. Vladescu - Omnis Group", "docs/vlad_05_09_2005.aspx");
		writeItem1("Rom&#226;nia Mare, 24/08/2005 ", "articles/rm/rm_24_aug_2005.aspx");
		writeItem1("Rom&#226;nia Libera, 23/08/2005", "articles/rl/rl_23_aug_2005.aspx");
		writeItem1("7 Plus, 23/08/2005 ", "articles/plus7/plus7_23_aug_2005.aspx");
		writeItem1("Atac, 23/08/2005 ", "articles/atac/atac_23_aug_2005.aspx");
		writeItem1("Ev. Zilei, 23/08/2005 ", "articles/ev/ev_23_aug_2005.aspx");
		writeItem1("Gandul, 23/08/2005 ", "articles/gandul/gandul_23_aug_2005.aspx");
		writeItem1("Ziarul Tricolorul, 23/08/2005 ", "articles/tric/tric_23_aug_2005.aspx");
		writeItem1("Gandul, 20/08/2005 ", "articles/gandul/gandul_20_aug_2005.aspx");
		writeItem1("Gandul, 17/08/2005 ", "articles/gandul/gandul_17_aug_2005.aspx");
		writeItem1("Atac, 11/05/2005 ", "articles/atac/atac_11_mai_2005.aspx");
		writeItem1("Atac, 04/05/2005", "articles/atac/atac_4_mai_2005.aspx");
		writeItem1("Nine o'clock, July 2000", "vladescu_fni.aspx");
	writeDropMenuEnd();

	writeDropMenu("tari", "Calin Popescu Tariceanu " + getNew("14/12/2009"));
		writeItem1("Scrisoare, 29/12/2006 " + getNew("14/12/2009"), "docs/pm_29_12_2006.aspx");
		writeItem1("Adevarul, 01/11/2005 ", "articles/adevarul/ad_01_11_2005.aspx");
		writeItem1("Cotidianul, 01/11/2005 ", "articles/cotidianul/cot_01_11_2005.aspx");
		writeItem1("Document, 08/09/2005 ", "docs/tari_08_09_2005.aspx");
		writeItem1("Document, 08/09/2005 ", "docs/botos_08_09_2005.aspx");
		writeItem1("7 Plus, 23/08/2005 ", "articles/plus7/plus7_23_aug_2005.aspx");
		writeItem1("Gandul, 23/08/2005 ", "articles/gandul/gandul_23_aug_2005.aspx");
		writeItem1("Gandul, 17/08/2005 ", "articles/gandul/gandul_17_aug_2005.aspx");
		writeItem1("Gardianul, 13/05/2005 ", "articles/gardianul/grd_13_mai_2005.aspx");
		writeItem1("Atac, 11/05/2005 ", "articles/atac/atac_11_mai_2005.aspx");
		writeItem1("Atac, 04/05/2005", "articles/atac/atac_4_mai_2005.aspx");
		writeItem1("Gardianul, 31/03/2005 ", "articles/gardianul/grd_31_mar_2005.aspx");
		writeItem1("MEDIST SA ", "medist.aspx");
	writeDropMenuEnd();


	writeDropMenu("comp", "Companii IT ");
		writeItem1("<strong>Romanian Soft Company</strong>", "");
			writeItem2("Gandul, 05/09/2005 " , "articles/gandul/gandul_05_sep_2005.aspx");
			writeItem2("Cotidianul, 03/09/2005 ", "articles/cotidianul/cot_03_sep_2005.aspx");
			writeItem2("Atac, 02/09/2005 " , "articles/atac/atac_02_sep_2005.aspx");
			writeItem2("Piraterie Software", "rsc.aspx");
			writeItem2("Software Piracy " + "<img border='0' align='absmiddle' src='" + path + "images/en.gif'>", "rsc_en.aspx");
			writeItem2("Atac, 07/05/2005", "articles/atac/atac_7_mai_2005.aspx");
			writeItem2("Atac, 04/05/2005", "articles/atac/atac_4_mai_2005.aspx");
	writeDropMenuEnd();

	writeDropMenu("articole", "Acte de coruptie " + getNew("16/8/2010") );

		writeItem1("InfoLegal, 14/08/2010 " + getNew("16/08/2010"), "articles/2010_08_14_infolegal.aspx");
		writeItem1("Romania Mare, 10/08/2010 " + getNew("16/8/2010"), "articles/rm/2010_08_10_rm.aspx");
		writeItem1("Adevarul, 09/05/2010 " + getNew("10/5/2010"), "articles/2010_05_09_ad.aspx");
		writeItem1("HotNews, 08/05/2010 " + getNew("10/5/2010") , "articles/2010_05_08_hot.aspx");
		writeItem1("Adevarul, 07/05/2010 " + getNew("10/5/2010"), "articles/2010_05_07_ad.aspx");
		writeItem1("Romania Libera, 06/05/2010 " + getNew("10/5/2010"), "articles/2010_05_06_rl.aspx");
		writeItem1("Adevarul, 06/01/2010 " + getNew("10/5/2010") , "articles/2010_01_06_ad.aspx");
		writeItem1("Adevarul, 17/11/2009 " + getNew("10/5/2010") , "articles/2009_11_17_ad.aspx");
		writeItem1("Actualiatea Ph., 13/09/2009 " + getNew("10/5/2010") , "articles/2009_09_13_aprah.aspx");
		writeItem1("ziare.com, 07/03/2008 " + getNew("10/5/2010"), "articles/2008_03_12_ziare.aspx");
		
		writeItem1("Hotnews, 05/05/2010 " + getNew("6/5/2010"), "articles/hot/2010_05_06_hot.aspx");
		writeItem1("Hotnews, 05/05/2010 " + getNew("6/5/2010"), "articles/hot/2010_05_05_hot.aspx");
		writeItem1("Hotnews, 03/03/2010 " + getNew("3/3/2010"), "articles/hot/2010_03_03_hot_mm.aspx");
		writeItem1("Rom&#226;nia Libera, 01/02/2010 " + getNew("1/2/2010"), "articles/rl/2010_02_01_rl.aspx");
		writeItem1("Hotnews, 01/02/2010 " + getNew("1/2/2010"), "articles/hot/2010_02_01_hot.aspx");
		writeItem1("Hotnews, 19/01/2010 " + getNew("20/1/2010"), "articles/hot/2010_01_19_hot.aspx");
		writeItem1("Hotnews, 18/01/2010 " + getNew("18/1/2010"), "articles/hot/2010_01_18_hot.aspx");
		writeItem1("Deutsche Welle, 15/01/2010 " + getNew("15/1/2010"), "articles/dw/2010_01_15_dw.aspx");
		writeItem1("Rom&#226;nia Libera, 11/01/2010 " + getNew("11/1/2010"), "articles/rl/2010_01_11_rl.aspx");
		writeItem1("Ziua, 05/01/2010 " + getNew("5/1/2010"), "articles/ziua/2010_01_05_ziua.aspx");
		writeItem1("Adevarul, 22/12/2009 ", "articles/adevarul/2009_12_22_ad.aspx");
		writeItem1("Gardianul, 19/12/2009 " + getNew("21/12/2009"), "articles/gardianul/2009_12_19_grd.aspx");
		writeItem1("Hotnews, 15/12/2009 " + getNew("15/12/2009"), "articles/hot/2009_12_15_hot.aspx");
		writeItem1("Rom&#226;nia Libera, 07/11/2005 ", "articles/rl/rl_07_11_2005.aspx");
		writeItem1("Averea, 01/11/2005 ", "articles/averea/av_01_11_2005.aspx");
		writeItem1("Gandul, 05/09/2005 ", "articles/gandul/gandul_05_sep_2005.aspx");
		writeItem1("Cotidianul, 03/09/2005 ", "articles/cotidianul/cot_03_sep_2005.aspx");
		writeItem1("Atac, 02/09/2005 " , "articles/atac/atac_02_sep_2005.aspx");
		writeItem1("Ev. Zilei, 29/08/2005 ", "articles/ev/ev_29_aug_2005.aspx");
		writeItem1("Rom&#226;nia Mare, 24/08/2005 ", "articles/rm/rm_24_aug_2005.aspx");
		writeItem1("Rom&#226;nia Libera, 23/08/2005", "articles/rl/rl_23_aug_2005.aspx");
		writeItem1("7 Plus, 23/08/2005 ", "articles/plus7/plus7_23_aug_2005.aspx");
		writeItem1("Atac, 23/08/2005 ", "articles/atac/atac_23_aug_2005.aspx");
		writeItem1("Ev. Zilei, 23/08/2005 ", "articles/ev/ev_23_aug_2005.aspx");
		writeItem1("Gandul, 23/08/2005 ", "articles/gandul/gandul_23_aug_2005.aspx");
		writeItem1("Ziarul Tricolorul, 23/08/2005 ", "articles/tric/tric_23_aug_2005.aspx");
		writeItem1("Gandul, 20/08/2005 ", "articles/gandul/gandul_20_aug_2005.aspx");
		writeItem1("Gandul, 17/08/2005 ", "articles/gandul/gandul_17_aug_2005.aspx");
		writeItem1("Ac. Catavencu, 17/08/2005 " , "articles/ac/ac_17_aug_2005.aspx");
		writeItem1("Rom&#226;nia Mare, 10/08/2005 " , "articles/rm/rm_10_aug_2005.aspx");
		writeItem1("Ac. Catavencu, 03/08/2005 " , "articles/ac/ac_03_aug_2005.aspx");
		writeItem1("Rom&#226;nia Mare, 03/08/2005 " , "articles/rm/rm_03_aug_2005.aspx");
		writeItem1("Gardianul, 02/08/2005 "  , "articles/gardianul/grd_02_aug_2005.aspx");
		writeItem1("Cotidianul, 02/08/2005", "articles/cotidianul/cot_2_aug_2005.aspx");
		writeItem1("Rom&#226;nia Mare, 27/07/2005 " , "articles/rm/rm_27_iul_2005.aspx");
		writeItem1("Evenimentul Zilei, <br>12/07/2005 ", "articles/ev/ev_12_iul_2005.aspx");
		writeItem1("Gardianul, 13/06/2005 ", "articles/gardianul/grd_13_iun_2005.aspx");
		writeItem1("Gardianul, 10/06/2005 " , "articles/gardianul/grd_10_iun_2005.aspx");
		writeItem1("Curentul, 06/06/2005 ", "articles/curentul/cr_06_iun_2005.aspx");
		writeItem1("Ziua, 1/06/2005 ", "articles/ziua/ziua_1iun2005.aspx");
		writeItem1("Ziua, 31/05/2005 " , "articles/ziua/ziua_31_mai_2005.aspx");
		writeItem1("Gandul, 16/05/2005 ", "articles/gandul/gandul_16_mai_2005.aspx");
		writeItem1("Ziua, 13/05/2005", "articles/ziua/ziua_13_mai_2005.aspx");
		writeItem1("Gardianul, 13/05/2005 ", "articles/gardianul/grd_13_mai_2005.aspx");
		writeItem1("Atac, 11/05/2005 ", "articles/atac/atac_11_mai_2005.aspx");
		writeItem1("Atac, 07/05/2005", "articles/atac/atac_7_mai_2005.aspx");
		writeItem1("Curentul, 05/05/2005", "articles/curentul/cr_05_mai_2005.aspx");
		writeItem1("Atac, 04/05/2005", "articles/atac/atac_4_mai_2005.aspx");
		writeItem1("Adevarul, 29/04/2005", "articles/adevarul/ad_29_apr_2005.aspx");
		writeItem1("Atac, ian-apr 2005 ", "mfa_mizil.aspx");
		writeItem1("Jurnalul National, 27/04/2005", "articles/jurnalul/jn_27_apr_2005.aspx");
		writeItem1("Ziarul Financiar, 19/04/2005", "articles/zf/zf_19apr2005.aspx");
		writeItem1("Evenimentul Zilei, 11/04/2005", "articles/ev/ev11apr2005.aspx");
		writeItem1("Curentul, 28/01/2005", "articles/curentul/curentul28ian2005.aspx");
		writeItem1("Rom&#226;nia Libera, 25/01/2005", "articles/rl/rl_25_ian_2005.aspx");
		writeItem1("Cotidianul, 25/01/2005", "articles/cotidianul/cot_25_ian_2005.aspx");
		writeItem1("Ziua, 25/01/2005", "articles/ziua/ziua25ian2005.aspx");
		writeItem1("Ziua, 24/01/2005", "articles/ziua/ziua24ian2005.aspx");
		writeItem1("Ziua, 21/06/2004", "articles/ziua/ziua_21iun2004.aspx");
		writeItem1("Curentul, 10/03/2004", "articles/curentul/cr_10_mar_2004.aspx");
	writeDropMenuEnd();

	writeMenu("mono", "GPTI - Monopol de stat IT", "monopol.aspx");

	writeDropMenu("antimafia", "Anti MAFIA IT ");
		writeItem1("Gardianul, 01/11/2005 ", "articles/gardianul/grd_01_11_2005.aspx");
		writeItem1("Bloombiz, 31/10/2005 ", "articles/bloombiz/bloom_31_10_2005.aspx");
		writeItem1("Gardianul, 06/06/2005 ", "articles/gardianul/grd_06_06_2005.aspx");
		writeItem1("A.C.G", "articles/gandul/gandul_3_iun_2005.aspx");
		writeItem1("D.G.C.C.O.A.", "dgccoa.aspx");
	writeDropMenuEnd();

	writeDropMenu("legi", "Legislatie ");
		writeItem1("Pana la 1 Sep 2005", "legi/legi.aspx");
		writeItem1("Dupa 1 Sep 2005", "legi/oug123_1sep2005.aspx");
	writeDropMenuEnd();

	writeMenu("ee", "eEurope+ " + "<img border='0' align='absmiddle' src='" + path + "images/ue.gif'>", "mafia_it/scheele.aspx");
	writeMenu("credo", "Credo", "credo.aspx");

	if (strCurrentMenu1Id  != null && bFollowMenu) {
		toggle("divdropmenu_" + strCurrentMenu1Id , "imgdrop_" + strCurrentMenu1Id );
	}


	//document.write("<p class='update'>Actualizat la 14/12/09</p>");
    writeLastUpdate();
	
	writeHeaderLinks();
}

function writeHeaderLinks()
{
	var str = "", bLocal = false;
	
	var strSanse = "http://www.sanseegale.ro";
	var strCroc = "http://www.crocodilii.ro";
	var strCara = "http://www.caracatita.ro";
	
	if (window.location.href.indexOf("localhost") >=0) bLocal = true;
	
	if (bLocal)
	{
		strSanse = "http://localhost/sanseegale";
		strCroc = "http://localhost/crocodilii";
		strCara = "http://localhost/caracatita";
	}
	
	str += "<div class='divheaderlinks'>";
	str += "<p class=lnkheader>&nbsp;&nbsp;";
	
	str += "<a class=lnkheader href='" + strSanse + "' target='sanseegale' onclick=\"stopRightSong('coruptia_right')\">" + "www.sanseegale.ro" +"</a>&nbsp;&nbsp;";
	str += "<a class=lnkheader href='" + strCroc + "' target='crocodilii' >" + "www.crocodilii.ro" +"</a>&nbsp;&nbsp;";
	str += "<a class=lnkheader href='" + strCara + "' target='caracatita' >" + "www.caracatita.ro" +"</a>&nbsp;&nbsp;";

	str += "<span class=fondat>Fondat in 12 Aprilie 2005</span>"
	str += "</p>";
	str += "</div>";
	
	//alert(str);
	document.write(str);
}

function stopRightSong(strFrameName) {
	try {
		window.parent.frames[strFrameName].stopSong();
	}
	catch(e){}
}
