<!--

var page = parent.mainFrame.location.href
var newpage = page.slice(0,-7)

 
function  grlang(){    // kaloume autin tin function otan vazoume ellinika - apla allazoume to top frame - opou sti sineheia tha anoixei thn analogi selida
parent.topFrame.location.href = rootpath+"topmenu_gr.htm"
}
 function  enlang(){ 	// kaloume autin otan vazoume agglika
parent.topFrame.location.href = rootpath+"topmenu_en.htm"
}



function checkLangTop(lng){		// otan allazei glwssa to topframe sigoureuomaste pws allazei kai to main
var mainindex = parent.mainFrame.location.href.indexOf('_')
var mainlang  = parent.mainFrame.location.href.substr(mainindex)
	if (mainindex > 0){ // sigoureuoume oti den einai mia apo tis selides xwris glwssa (contact,about)
		if (lng == 'gr' && mainlang  == '_en.htm'){
		parent.mainFrame.location.href =  newpage +"_gr.htm"
		}
		if (lng == 'en' && mainlang == '_gr.htm'){
		parent.mainFrame.location.href =  newpage +"_en.htm"
		}
	}
}

function checkLangMain(lng){				// tsekaroume pws an exoume katw mia glwssa exoume tin antistixi kai panw
var topindex = parent.topFrame.location.href.indexOf('_')
var toplang = parent.topFrame.location.href.substr(topindex)
if (lng == 'gr' && toplang == '_en.htm'){
parent.topFrame.location.href = rootpath + "topmenu_gr.htm"
}
if (lng == 'en' && toplang == '_gr.htm'){
parent.topFrame.location.href = rootpath + "topmenu_en.htm"
}
}

function gotoHome(){   // fuction pou anoigei tn kentriki selida analoga thn glwssa
var topindex = parent.topFrame.location.href.indexOf('_')
var toplang = parent.topFrame.location.href.substr(topindex)
var mUrl = top.location.href

	if (toplang == '_en.htm'){
		if (mUrl.indexOf("?") == -1){ 
		// evala auto to check gia na dinw diaforetiki selida analoga 
		//an ehw query sto main link (mpike ektos kentirkis selidas) i oxi
		// an den ehw querry tote apla allazw to link sto main frame....
		parent.mainFrame.location.href = rootpath + "main_en.htm"
		}else{
		// an exw tote tou dinw querry wste an ginei bookmarked i selida na anoixei i swsti ;)
		top.location.href = rootpath + "index.htm?" + "main_en.htm"
		}
	}
	if (toplang != '_en.htm'){
		if (mUrl.indexOf("?") == -1){
		parent.mainFrame.location.href = rootpath + "main_gr.htm"
		}else{
		top.location.href = rootpath + "index.htm?" + "main_gr.htm"
		}
	}
}
//end-->

