function reversebulletimagefaq(received,totalitems) {
  if (document[received].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
    for (i=1; i<=totalitems; i++) {
      document["FAQ_IMG" + i].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
    }
		document[received].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
	}
	else {
    for (i=1; i<=totalitems; i++) {
      document["FAQ_IMG" + i].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
    }
	}	
}

function reversebulletimage(received) {
	if (document[received].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
		document[received].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
	}
	else {
		document[received].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
	}
}

function reversebulletimagethemes() {
	var num_of_arguments = reversebulletimagethemes.arguments.length;
	var current_id;
	current_id = reversebulletimagethemes.arguments[0];
	if (document[current_id].src == "/esye/imgs/icons_orangebullet_vertical.gif") {
		document[current_id].src = "/esye/imgs/icons_orangebullet_horizontal.gif";
	}
	else {
		document[current_id].src = "/esye/imgs/icons_orangebullet_vertical.gif";
		for (incrementer = 1; incrementer < num_of_arguments ; incrementer++) {
			current_id = reversebulletimagethemes.arguments[incrementer];
			document[current_id].src = "/esye/imgs/icons_orangebullet_horizontal.gif";
		}
	}
}

function reversebulletimageapps(received01,received02,received03,received04,received05) {
	if (document[received01].id == 'appsbullet00') {
		if (document[received01].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
			document[received02].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received03].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received04].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received05].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
		else {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
	}
	if (document[received01].id == 'appsbullet01') {
		if (document[received01].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
			document[received02].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received03].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received04].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received05].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
		else {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
	}
	if (document[received01].id == 'appsbullet03') {
		if (document[received01].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
			document[received02].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received03].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received04].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received05].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
		else {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
	}
	if (document[received01].id == 'appsbullet04') {
		if (document[received01].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
			document[received02].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received03].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received04].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received05].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
		else {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
	}
	if (document[received01].id == 'appsbullet05') {
		if (document[received01].src == 'http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif') {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_vertical.gif";
			document[received02].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received03].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received04].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
			document[received05].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
		else {
			document[received01].src = "http://www.statistics.gr/esye/imgs/icons_orangebullet_horizontal.gif";
		}
	}
}

function reversebookimage(received) {
	if (document[received].src == 'http://www.statistics.gr/esye/imgs/icons_closebook.gif') {
		document[received].src = "/esye/imgs/icons_openbook.gif";
	}
	else {
    document[received].src = "/esye/imgs/icons_closebook.gif";
	}
}

function adjustheight() {

	var latestStatsHeight;
	var pressReleasesHeight;
	var newsHeight;
	var totalHeight;
	var bodySectorHeight;
	var newHeight1521;
	var newHeight1545;
	var newHeightTwoColums;
	var rg1521Height;
	var rg1545Height;
	var rg1579Height;
	var rg2069Height;
	var heighToPass;
	
	if ((document.getElementById('rg1521')) || (document.getElementById('rg1545'))) {
	
		latestStatsHeight = document.getElementById('lateststats').offsetHeight;
		pressReleasesHeight = document.getElementById('pressreleases').offsetHeight;
		newsHeight = document.getElementById('news').offsetHeight;
		totalHeight = latestStatsHeight + pressReleasesHeight + newsHeight;
		
		rg1521Height = document.getElementById('rg1521').offsetHeight;
		rg1545Height = document.getElementById('rg1545').offsetHeight;
    
    newHeight1521 = rg1521Height - totalHeight;
    newHeight1545 = rg1545Height - totalHeight;
		
		if ((newHeight1521 > 0) || (newHeight1545 > 0)) {
      heightToPass = Math.max(newHeight1521, newHeight1545);
      document.getElementById('adjustme').style.display = 'block';
      document.getElementById('adjustme').style.height = heightToPass + 'px';
    }
    else {
      document.getElementById('adjustme').style.display = 'none';
      document.getElementById('adjustme').style.height = 0 + 'px';
    }
  }
  else if ((document.getElementById("rg1579")) || (document.getElementById("rg2069"))) {
  
    bodySectorHeight = document.getElementById("bodySector").offsetHeight;
    
    if (document.getElementById("rg1579")) {
      rg1579Height = document.getElementById("rg1579").offsetHeight;
      newHeightTwoColums = rg1579Height - bodySectorHeight;
    }
    else if (document.getElementById("rg2069")) {
      rg2069Height = document.getElementById("rg2069").offsetHeight;
      newHeightTwoColums = rg2069Height - bodySectorHeight;
    }
    
    if (newHeightTwoColums > 0) {
      document.getElementById("adjustme2").style.display = 'block';
      document.getElementById("adjustme2").style.height = newHeightTwoColums + 'px';
    }
    else {
      document.getElementById("adjustme2").style.display = 'none';
      document.getElementById("adjustme2").style.height = 0 + 'px';
    }
  }
  else {
    void(0);
  }
}

var strReturn = "";
function getcurrenturl() {
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ) {
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ) {
      if (aQueryString[iParam].indexOf("mach_param".toLowerCase() + "=") > -1 ) {
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
}

function database() {
  if (window.frames['storage']) {
    if (window.frames['storage'].document.getElementById('c_14')) {
      var final_height = window.frames['storage'].document.getElementById('c_14').offsetHeight + 115;
    }
    else {
      var final_height = 485;
    }
  }
  if (document.getElementById('storage')) {
    document.getElementById('storage').style.height = final_height;
  }
}

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=4000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
  if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
    cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
  else
    cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
  if (document.getElementById("vmarquee")) {
    cross_marquee=document.getElementById("vmarquee")
    cross_marquee.style.top=0
    marqueeheight=document.getElementById("marqueecontainer").offsetHeight
    actualheight=cross_marquee.offsetHeight
    if (navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Netscape 7x, add scrollbars to scroll and exit
      cross_marquee.style.height=marqueeheight+"px"
      cross_marquee.style.overflow="scroll"
      return
    }
    setTimeout('lefttime=setInterval("scrollmarquee()",100)', delayb4scroll)
  }
}

if (window.addEventListener)
  window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
  window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
  window.onload=initializemarquee
