	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_findObj(n, d) { //v4.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	/*----- gia index : anim---*/
	function MM_swapImgRestore_2(id) { //mayra
	  var a = new Array();
		
		if (id ==1)
			document.img101.src ='images/txt_gr02.gif';
		else if (id ==2)
			document.img102.src = 'images/txt_gr03.gif';
		else if (id ==3)
			document.img103.src ='images/txt_gr04.gif';
		else if (id ==4)
			document.img104.src ='images/txt_en02.gif';
		else if (id ==5)
			document.img105.src ='images/txt_en03.gif';
		else if (id ==6)
			document.img106.src ='images/txt_en04.gif';
	}
	
	function MM_swapImage_2(id) { //mayra
		var a = new Array();
		
		if (id ==1)
			document.img101.src ='images/txt_gr02b.gif';
		else if (id ==2)
			document.img102.src = 'images/txt_gr03b.gif';
		else if (id ==3)
			document.img103.src ='images/txt_gr04b.gif';
		else if (id ==4)
			document.img104.src ='images/txt_en02b.gif';
		else if (id ==5)
			document.img105.src ='images/txt_en03b.gif';
		else if (id ==6)
			document.img106.src ='images/txt_en04b.gif';
	}
	
	function show (poio)
	{

		if (poio ==1)	//gr
		{
			document.getElementById("per").innerHTML = "<a href='index1.php'><img src='images/txt_gr01.gif' width='486' height='109'></a><br/><a href='products.php?id=25' onMouseOut='MM_swapImgRestore_2(1)' onMouseOver='MM_swapImage_2(1)'><img name='img101' border='0' src='images/txt_gr02.gif' width='167' height='16'></a><br/><a href='products.php?id=3' onMouseOut='MM_swapImgRestore_2(2)' onMouseOver='MM_swapImage_2(2)'><img name='img102' border='0' src='images/txt_gr03.gif' width='133' height='16'></a><br/><a href='#' onMouseOut='MM_swapImgRestore_2(3)' onMouseOver='MM_swapImage_2(3)'><img name='img103' border='0' src='images/txt_gr04.gif' width='210' height='16'></a>";
		}
		else if (poio ==2)	//eng
		{
			document.getElementById("per").innerHTML = "<a href='./eng/index1.php'><img src='images/txt_en01.gif' width='487' height='93'></a><br/><a href='./eng/products.php?id=25' onMouseOut='MM_swapImgRestore_2(4)' onMouseOver='MM_swapImage_2(4)'><img name='img104' border='0' src='images/txt_en02.gif' width='127' height='16'></a><br/><a href='./eng/products.php?id=3' onMouseOut='MM_swapImgRestore_2(5)' onMouseOver='MM_swapImage_2(5)'><img name='img105' border='0' src='images/txt_en03.gif' width='131' height='16'></a><br/><a href='#' onMouseOut='MM_swapImgRestore_2(6)' onMouseOver='MM_swapImage_2(6)'><img name='img106' border='0' src='images/txt_en04.gif' width='145' height='16'></a>";

		}
	}
	
	/* ----------------- */
	function clickclear(thisfield, defaulttext) 
	{
		if(thisfield.value == defaulttext)  
			thisfield.value="";   
	}
	
	/* -------- contact ---------- */
	function imsrc(rn)
	{
		document.getElementById("leme").src = "./captcha/" + rn + ".bmp";
	}
	function imsrc_eng(rn)
	{
		document.getElementById("leme").src = "../captcha/" + rn + ".bmp";
	}
	
	function check()
	{
		if ( (document.form1.T1.value=="") || (document.form1.T2.value=="") || (document.form1.T4.value=="") || (document.form1.D1.value=="") )
		{
			alert ("Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία!");
			return;
		}

		document.form1.T5.value.replace("+","");
		if (document.form1.T5.value!="")
		{
			if ( (document.form1.T5.value.length<10) || (document.form1.T5.value.length>12) )	
			{
				alert("Μη αποδεκτό μήκος τηλεφώνου!");
				document.form1.T5.focus();
				return;
			}
		}
		
		if (document.form1.T1.value.length>50)	
		{
			alert("Πολύ μεγάλο μήκος ονόματος");	
			document.form1.T1.focus();
			return;
		}
		if (document.form1.T2.value.length>80)
		{
			alert("Πολύ μεγάλο μήκος επιθέτου");
			document.form1.T2.focus();
			return;
		}
		if (document.form1.T4.value.length>70)
		{
			alert("Πολύ μεγάλο μήκος email");
			document.form1.T4.focus();
			return;
		}
		
		var pr = MD5(document.form1.prama.value);
		if (document.form1.rand.value != pr)
		{
				alert("Πρέπει να συμπληρώσετε σωστά τον κωδικό!");
				document.form1.prama.focus();
				return;
		}
		
		document.form1.submit();
	}
	
	/* ---- */
	function bookmark()	//title,url
	{
		var title = "Data & Control Systems :: " + document.title;
		var url = location.href;
		
		if (window.sidebar) // firefox
			window.sidebar.addPanel(title, url, "");
		else if ( (window.opera) && (window.print) )	// opera
		{ 	
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();
		}
		else if(document.all)	// ie
			window.external.AddFavorite(location.href,document.title);	//window.external.AddFavorite(url, title);
	}
	
	/*------ admin ------*/
	function startTime()
	{
		var today=new Date();
		var h=today.getHours();
		var m=today.getMinutes();
		var s=today.getSeconds();
		// add a zero in front of numbers<10
		m=checkTime(m);
		s=checkTime(s);
		document.getElementById('time').innerHTML = h+":"+m+":"+s;
		t=setTimeout('startTime()',500);
	}
	
	function checkTime(i)
	{
		if (i<10)
		  i="0" + i;
		return i;
	}