function popInca()
{
   window.open('../inca/inca.htm','incaWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,height=230,width=400,top=180,left=280');
}
function popSearch()
{
   window.open('../inca/search_goo.htm','srchgooWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,height=230,width=400,top=180,left=280');
}
function on_href(dest)
{
  var new_location;

  if (window.location.protocol.substring(0,4) == "http") {
	if (dest[0]=='/') // absolute pathname
	  new_location="https://"+window.location.hostname+dest;
	else {
	  j=window.location.pathname.lastIndexOf("/");
          new_location="https://"+window.location.hostname+window.location.pathname.substring(0,j+1)+dest;
        }
  }
  else
	new_location=dest;

  window.location=new_location;
}
function add_bkmark()
{
   if (document.all) // IE
      window.external.addFavorite(location.href,document.title);
   else
      window.alert('To add a bookmark, please close this message box, then press Ctrl-D');
}
function make_href(s1)
{
   if ((s2=location.protocol)=='https:')
      s2='http:';

   var url=s2+'//'+location.host;
   if (s1.substr(0,1)=='/') {
      url += s1;
   }
   else {
      var ar1=location.pathname.split('/');
      ar1.pop();
      url += ar1.join('/')+'/'+s1;
   }
   return url;
}
function pr_nav_bars()
{
   document.writeln('<MAP NAME="nav1">');
   document.writeln('<AREA SHAPE="RECT" COORDS="120,0,174,15" HREF="'+make_href('../inca/index2.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="180,0,272,15" HREF="'+make_href('../inca/download.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="279,0,367,15" HREF="'+make_href('../inca/purchase.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="374,0,454,15" HREF="'+make_href('../inca/contact.htm')+'">');
   document.writeln('</MAP>');

   document.writeln('<MAP NAME="nav2">');
   document.writeln('<AREA SHAPE="RECT" COORDS="1,0,80,16" HREF="'+make_href('../inca/about.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="86,0,136,16" HREF="'+make_href('../inca/news.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="142,0,232,16" HREF="'+make_href('../inca/products.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="238,0,332,16" HREF="'+make_href('../inca/solutions.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="338,0,417,16" HREF="'+make_href('../inca/support.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="423,0,529,16" HREF="'+make_href('../inca/ecomm.htm')+'">');
   document.writeln('<AREA SHAPE="RECT" COORDS="535,0,616,16" HREF="'+make_href('../inca/internet.htm')+'">');
   document.writeln('</MAP>');

   document.writeln('<table cellspacing=0 cellpadding=0 border=0 width=620>');
   document.writeln('<tr>');
   document.writeln('<td><A href="javascript:popInca();"><IMG alt="INCA Hellas Ltd." src ="../inca/inca_opq.gif" border=0 width=162 height=50></A></td>');
   document.writeln('<td align=right valign=bottom><a href="javascript:popSearch()"><img '+
      ' src="../img/search.gif" border=0 align=absmiddle width=18 height=32>&nbsp;Search</a> '+
      '<a href="javascript:add_bkmark()"><img src="../img/bookmark.gif" '+
      ' border=0 align=absmiddle width=18 height=32>&nbsp;Add bookmark</a>&nbsp;<a href="mailto:?subject='+
      'Something%20you%20must%20see&body='+escape(location.href)+'" style="font-size: 9pt;"><img '+
      ' src="../img/email.gif" border=0 align=absmiddle width=18 height=32>&nbsp;Tell a friend</a>'+
      '<BR><IMG alt="Site navigator" src="../inca/nav1a.gif" width=456 height=18 useMap=#nav1 border=0></td>');
   document.writeln('</tr>');
   document.writeln('<tr><td colspan=2 height=2></td></tr>');
   document.writeln('<tr>');
   document.writeln('<td colspan=2><IMG alt="Site navigator" src="../inca/nav2a.gif" width=620 height=17 useMap=#nav2 border=0 ></td>');
   document.writeln('</tr>');
   document.writeln('</table>');

   // Vacations
   /*
   document.write('<div id=vacat style="position:absolute;height:200px;width400px;"> \
      <table border=0 cellspacing=0 cellpadding=8 style="border:black solid 1px;background-color:white;"> \
      <tr bgcolor=#c0c0c0> \
      <td>Important message</td> \
      <td align=right><span style="border:black solid 1px;background-color:white;padding-left:4px;padding-right:4px;cursor:hand;" onclick="Hide(document.all.vacat)">x</span></td></tr> \
      <tr><td colspan=2>GR:: Η εταιρία θα παραμείνει κλειστή μέχρι τέλους Αυγούστου.<br> \
      Για έκτακτες περιπτώσεις, παρακαλούμε χρησιμοποιήστε <a href="pager.htm">τον pager.</a><hr> \
      EN:: Company will remain closed till end of August.<br> \
      For emergency only, please use <a href="pager.htm">the pager form.<a/></td></tr> \
      </table></div>');
   
      
   var o=document.getElementById('vacat');
   var x=document.body.scrollLeft+(document.body.clientWidth - 400)/2;
   var y=document.body.scrollTop+(document.body.clientHeight - 200)/2;
   o.style.left=x+'px';
   o.style.top=y+'px';
   */
}
function Hide(obj)
{
   obj.style.display='none';
   obj.style.visibility='hidden';
}
function draw_button(href,label)
{
   document.writeln('<td> \
      <table border=0 cellpadding=0 cellspacing=0> \
      <tr> \
      <td><img src="g1.gif" height=5 width=5></td> \
      <td background="g2.gif"><img src="clear.gif" width=1 height=1></td> \
      <td><img src="g3.gif" height=5 width=5></td> \
      </tr> \
      <tr> \
      <td background="g8.gif"><img src="../inca/clear.gif" width=1 height=1></td>');

   document.write('<td bgcolor="#AAF4E1"><b>&nbsp;');

   if (href.length)
	  document.write('<a href="'+href+'">');

   document.write(label);

   if (href.length)
	  document.write('</a>');

   document.writeln('</b>&nbsp;</td> \
      <td background="g4.gif"><img src="clear.gif" width=1 height=1></td> \
      </tr> \
      <tr> \
      <td><img src="g7.gif" height=5 width=5></td> \
      <td background="g6.gif"><img src="clear.gif" width=1 height=1></td> \
      <td><img src="g5.gif" height=5 width=5></td> \
      </tr></table> \
      </td>');
}
function top_strap(title,type,url)
{
   /*
      type=1: Show to_GR link
      type=2: Show to_Eng link
   */
   document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%"> \
      <tr><td colspan="3" bgcolor="#336363"><IMG height=2 \
            src="../inca/clear.gif" width=10></td></tr> \
      <tr><td><font color="#336363" CLASS=BIGGER><b>' + title + '</b></font></td> \
	     <td align=right>');
   if (type) {
      document.write('<a href="' + url + '"><img src="../img/');
      document.write(type==1?'but_gr3.gif':'but_eng3.gif');
      document.write('" border=0 alt="');
      document.write(type==1?'Greek pages':'English pages');
      document.write('" border=0 align="absmiddle"> <small>');
      document.write(type==1?'Greek pages':'English pages');
      document.write('</small></a>');
   }
   document.writeln('</td><td align="right" valign="top"><IMG height=31 \
      src="../inca/corner.gif" width=30></td></tr></table>');
}
function open_table(title)
{
   document.writeln( '<table border=1 bordercolor=black cellspacing=0 cellpadding=5 bgcolor=#FFFFCC width="100%">');
   if (title.length>0) {
      document.writeln('<tr> \
   <td bgcolor=#FFCC33 style="border-left: solid #FFFF00 2px; border-top: solid #FFFF00 2px; \
      border-right: solid #993300 2px; border-bottom: solid #993300 2px;"> \
   <!-- TITLE start.................... --> \
   <IMG SRC="../inca/ball1.gif"><b>&nbsp;' + title + '</b> \
   <!-- TITLE end...................... --> \
   </td> \
</tr>');
   }
   document.writeln('<tr> \
   <td style="border-left: solid #FFFFE0 2px; border-top: solid #FFFFE0 2px; \
      border-right: solid #C0C0A0 2px; border-bottom: solid #C0C0A0 2px;">' );
}
function close_table()
{
   document.writeln('</td></tr></table>');
}
function prTopLegal()
{
   document.writeln('<a href="#top"><img src="../inca/up.gif" align=absmiddle border=0 width="20" height="13"> Top</a> |');
   document.writeln('<a href="legal.htm">Legal stuff</a> | <a href="legal.htm">Privacy Policy</a>');
}
function printLastUpdate()
{
   docDateS=document.lastModified;
   if (docDateS==null || docDateS=='') {
      document.write("Unknown");
      return;
   }

   docDateX=new Date(docDateS);
   if (docDateX==0)
      document.write("Unknown");
   else {
      var zhours=new String( docDateX.getHours() );
      while (zhours.length<2)
         zhours="0"+zhours;

      var zmins=new String( docDateX.getMinutes() );
      while (zmins.length<2)
         zmins="0"+zmins;

      a=docDateX.getDate() + "-" + (docDateX.getMonth()+1) + "-" + docDateX.getYear() + "&nbsp;" + zhours  + ":" + zmins;
      document.write( a );
   }
}
function checkBrowser()
{
	var ieStr='Microsoft Internet Explorer';
	isie=(navigator.appName==ieStr);
	if (!isie) {
		window.alert('Sorry, this site needs ' + ieStr + ' version 6.0 at least, in order to display properly!\r\n' +
			'Instead, you are using ' + navigator.appName + '.');
		return;
	}

	// isie=true:
	version='0.0';
	do {
		parts=navigator.appVersion.split('(');
		if (parts.length<2)
			break;

		parts=parts[1].split(';');
		n=parts.length;
		for (i=0;i<n;i++) {
			suparts=parts[i].split(' ');
			n2=suparts.length;
			for (i2=0;i2<n2-1;i2++) {
				if (suparts[i2]=="MSIE") {
					version=suparts[i+1];
					break;
				}
			}
		}
	} while(false);
	if (parseInt(version)<6) {
		window.alert('Sorry, this site needs ' + ieStr + ' version 6.0 at least, in order to display properly!\r\n' +
			'Instead, you are using ' + navigator.appName + ' version ' + version + '.');
	}
}
function gramma_link(a)
{
   var ar1=a.split('/');
   if (ar1.length<2)
      return;

   document.write('<a href="' + String.fromCharCode(109,97,105,108,116,111,58) + ar1[0] + String.fromCharCode(64) + ar1[1] + '">'+
      ar1[0] + String.fromCharCode(64) + ar1[1] + '</a>');
}
function showHide(obj, state) {
   if (obj == null || obj == undefined)
      return;

   if (state) {
   	obj.style.display = 'inline';
   	obj.style.visibility = 'visible';
   }
   else {
      obj.style.display = 'none';
   	obj.style.visibility = 'hidden';
   }
}
function showTTips()
{
   $('li').mouseenter( function(event){
      var title2=$(this).attr('title2');
      if (title2!=undefined && title2.length>0) {
         $('#ttip').html(title2);
         $('#ttip').show();
         $('#ttip').css( {left: (event.pageX+16)+'px', top: (event.pageY+16)+'px' } );
      }
   } ).mouseleave( function(event){
      $('#ttip').hide();
   } ).mousemove( function(event){
         $('#ttip').css( {left: (event.pageX+16)+'px', top: (event.pageY+16)+'px' } );
   } );
}
/* ********* Pages protected by NEWSLETTER password ************************* */
var whoami='';
function isLoginOK()
{
   if (location.protocol=='file:' || location.hostname=='localhost') {
      whoami='Local user';
      return;
   }

   cc=document.cookie.split(';');
   n=cc.length;
   for (i=0;i<n;i++) {
      while (cc[i].charAt(0)==' ')
         cc[i]=cc[i].substr(1);

      ccx=cc[i].split('=');
      if (ccx[0]=='WHOAMI' && ccx.length>=2 && ccx[1].length>0) {
         whoami=ccx[1];
         return;
      }
   }
   // not found so far:
   location.href='https://www.incahellas.com/inca/logmein.php?HREF=' + encodeURIComponent(location.href);
}
function logmeout()
{
   document.cookie = 'WHOAMI=; path=/; expires=Fri, 31 Dec 1999 23:59:59 GMT; domain=.incahellas.com;';
   window.setTimeout("location.href='/inca/index2.htm';",200);
}
function onRemindMe(f)
{
   if (!window.confirm("Το αντίστοιχο password θα σας αποσταλεί στο email που ζητάτε."))
      return;

   url='http://www.incahellas.com/inca/remindme.php?FU=4&EMAIL=' + escape(f.EMAIL.value);
   window.open(url,'_blank','height=280,width=400,scrollbars=yes');
}
/* ************************************************************************** */