var IE = document.all ? true : false

// If NS -- that is, !IE -- then set up for mouse capture  
if (!IE) 
 window.captureEvents(Event.onclick);

//window.onclick = content_navi;
document.onclick = content_navi;







function content_navi(eve){

var parentId ='';


if(IE){
	
	eve = window.event;
	eveTarget = eve.srcElement;
	
}


else{
	
	eveTarget = eve.target;
	
}


try {
	
	
 if (eveTarget.id && aContentNavi[eveTarget.id][0][1]){
		
		loca(aContentNavi[eveTarget.id][0][1]);
		
	}
	
	
	else if((parentId =eveTarget.parentNode.id) && aContentNavi[parentId][0][1]){
		
		loca(aContentNavi[parentId][0][1]);
		
	}
 
 
} 
catch (e) {
}


}// content_navi()



function inner_assoc_links(aLink_Text){

 var linksCont = '';
 
 
 // f idBox in  aLink_Text
 for (idBox in aLink_Text) {
 
 
  for (indLink in aLink_Text[idBox]) {
  
   linksCont += aLink_Text[idBox][indLink][0] + ' <a href="' + aLink_Text[idBox][indLink][1] + '">' +
   aLink_Text[idBox][indLink][2] +
   '</a>' +
   aLink_Text[idBox][indLink][3];
   
  }
  
  
  document.getElementById(idBox).innerHTML = linksCont;
  linksCont = '';
  
 }
 // f idBox in  aLink_Text

 //	retStri +=tempStri1.replace(/>\<\/a>/i, '>' +aLink_Text[lin]+ '</a>');


}// write_assoc_links()
function write_assoc_links(idDiv, tempStri){

 var retStri = '';
 eval('var aLink_Text =' + idDiv + '_aLink_Text');
 
 // &nbsp;  <a href="http://www.<?=$_ENV['mainHost'] ?>/biz/">&nbsp; Αθηνερ &nbsp;</a> 
 
 
 for (lin in aLink_Text) {
 
  tempStri1 = tempStri.replace(/href\=""/i, 'href="' + lin + '"');
  retStri += tempStri1.replace(/>\<\/a>/i, '>' + aLink_Text[lin] + '</a>');
  
 }
 
 
 //document.getElementById(idDiv).innerHTML =
 
 return retStri;
 
}// write_assoc_links()
function home_menu(idDiv){

 var retStri = '';
 var reg = /^\/([^\/\.]+)\/([^\/\.]*)/;
 eval('var aLink_Text =' + idDiv + '_aLink_Text');
 
 
 
 for (lin in aLink_Text) {
 
  aExecShowDiv = reg.exec(lin);
  
  aExecShowDiv[2] ? idShowDiv = aExecShowDiv[2] : idShowDiv = aExecShowDiv[1];
  
  if (!document.getElementById('view_')) 
  
   retStri += '<div></div><a href="' + lin + '" onmouseover="showLayer(\'view_' + idShowDiv + '\');" onmouseout="hideLayer(\'view_' + idShowDiv + '\')">' + aLink_Text[lin] + '</a><div></div><img src="/pic/trans.gif">';
  
  
 }
 
 
 document.getElementById(idDiv).innerHTML = retStri;
 
}//home_menu()
function showLayer(layerName){
 LayObj = eval("document.getElementById('" + layerName + "').style");
 LayObj.display = 'block';
 //LayObj.visibility='visible';
}


function hideLayer(layerName){
 LayObj = eval("document.getElementById('" + layerName + "').style");
 LayObj.display = 'none';
 //LayObj.visibility='hidden';
}




function loca(strHref){

 window.location = strHref;
 
}



function fixedEl(id){
 if (document.all) {
  document.all[id].style.pixelTop = document.body.scrollTop + 0;/*+zacatecni rozmisceni*/
 }
}


var win = null;
function NewWindow(myp1, myname, w, h, scroll, pos){
 if (pos == "random") {
  LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
  TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
 }
 if (pos == "center") {
  LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
  TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
 }
 else 
  if ((pos != "center" && pos != "random") || pos == null) {
   LeftPosition = 0;
   TopPosition = 20
  }
 settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
 win = window.open(myp1, myname, settings);
}/*EXAMPLE* <a href="" onclick="NewWindow(this.href,'kuki','650','470','yes',0,0);return false" onfocus="this.blur()"> */



