function openpage(myname)
{
	directory= "./sxoliko/menus/";
	pagetype=".html";
	window.location.hash=myname;
	document.getElementById("contents").src=directory+myname+pagetype;
	document.getElementById("contents").height="1000px";
}


function myload()
{
	
	var myhash=window.location.hash;

if((myhash=="")||(myhash=="#"))
   { /*openpage("main");*/}
else{
    var mylink= myhash.substr(1);
      openpage(mylink);
}        
}
function mainpage()
{
window.location.hash="";
	document.getElementById("contents").src="./sxoliko/menus/main.html";
	document.getElementById("contents").height="800px";
	}
function changehash(loc)
{
	parent.window.location.hash=loc;
}


function linkcheck()
{	
	var curloc=parent.window.location.href;
    var currentprotocol= curloc.substring(0,7);
	var temp=new Array();
	temp=curloc.split('/');
	var tempsize=temp.length;
	var t=temp[(tempsize-2)];
	t= t.toLowerCase();
	if (t == "menus")
		{
			
			var temp2 = new Array();
			temp2= temp[tempsize-1].split('.');
			var toloc="";		
			if ("file://" == currentprotocol)
			{ toloc="file://"
			for (var i=3;i<tempsize-3;i++)
				toloc=toloc+"/"+temp[i];	
			toloc=toloc+"/sxoliko.html";
			}
			else
		{ toloc="http://www.cie.org.cy/sxoliko.html";
		
		}	

	parent.window.location=toloc+"#"+temp2[0];
	}
}

function reveal(location)
{
	var div,listitem;
	try{
div=document.getElementById("div_"+location);
listitem= document.getElementById("list_item"+location); }catch(e){alert(e)};

if (div.style.display=="block")
{div.style.display="none";
listitem.style.listStyleImage="";
}

else{
div.style.display="block";
listitem.style.listStyleImage="url(content%20pics/arrow3down.png)";
}
	}
