// control.js by Jürn Hocke (c)2000 by Nutzwerk GmbH

lite = new Image();
lite.src = '../pics/arrow_r_l.gif';
clear = new Image();
clear.src = 'pics../spacer.gif';
dark = new Image();
dark.src = '../pics/arrow_r_d.gif';

function start_pres(name)
{
 if(name == 'partners')
 {
  if(top.nav.document.location.href.indexOf('media_nav.html') != -1 || top.nav.location.href.indexOf('contact/contact_nav.html') != -1 || 
top.nav.location.href.indexOf('message/mess_nav.html') != -1 || top.nav.location.href.indexOf('pres_nav.html') != -1 || top.nav.location.href.indexOf('strategy/strat_nav.html') != -1 || 
top.nav.location.href.indexOf('user/user_nav.html') != -1 || 
top.nav.location.href.indexOf('reseller/rese_nav.html') != -1 || 
top.nav.location.href.indexOf('examples/examp_nav.html') != -1 || 
top.nav.location.href.indexOf('products/prod_nav.html') != -1 || top.nav.document.location.href.indexOf('testimonials/testi_nav.html') != -1 || 
top.nav.document.location.href.indexOf('download/down_nav.html') != -1 || 
top.nav.location.href.indexOf('jobs/jobs_nav.html') != -1 )
  {
   top.main.document.location.href = '../partners/pres01.html';
   top.nav.document.location.href = '../partners/pres_nav.html';
  }
  else
  {
   top.main.document.location.href = 'partners/pres01.html';
   top.nav.document.location.href = 'partners/pres_nav.html';
  }
 }
 else if(name == 'company')
 {
  if(top.nav.document.location.href.indexOf('media_nav.html') != -1 || top.nav.location.href.indexOf('contact/contact_nav.html') != -1 || top.nav.location.href.indexOf('pres_nav.html') != -1 || top.nav.location.href.indexOf('examples/examp_nav.html') != -1 || top.nav.location.href.indexOf('products/prod_nav.html') != -1 || top.nav.document.location.href.indexOf('testimonials/testi_nav.html') != -1)
  {
   top.main.document.location.href = '../company/pres01.html';
   top.nav.document.location.href = '../company/pres_nav.html';
  }
  else
  {
   top.main.document.location.href = 'company/pres01.html';
   top.nav.document.location.href = 'company/pres_nav.html';
  }
 }
 else alert('not available yet');
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function continue_pres()
{
 var file = top.main.document.location.href.split('/')	// file[file.length-1] is the filename of current file in frame

 if(file[file.length-2] == 'partners')
 {
  if(file[file.length-1] == 'pres01.html') top.main.document.location.href = 'pres02.html'

  if(file[file.length-1] == 'pres02.html') top.main.document.location.href = 'pres03.html'
  if(file[file.length-1] == 'pres021.html') top.main.document.location.href = 'pres03.html'
  if(file[file.length-1] == 'pres022.html') top.main.document.location.href = 'pres03.html'

  if(file[file.length-1] == 'pres03.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres031.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres032.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres033.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres034.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres035.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres036.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres037.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres038.html') top.main.document.location.href = 'pres04.html'

  if(file[file.length-1] == 'pres04.html') top.main.document.location.href = 'pres05.html'
  if(file[file.length-1] == 'pres041.html') top.main.document.location.href = 'pres05.html'
  if(file[file.length-1] == 'pres042.html') top.main.document.location.href = 'pres05.html'

  if(file[file.length-1] == 'pres05.html')
  {
   top.document.location.href = '../index.html'
  }

//  if(file[file.length-1] == 'pres06.html') top.main.document.location.href = 'pres07.html'
//  if(file[file.length-1] == 'pres07.html')
//  {
//   top.main.document.location.href = '../content.html'
//   top.nav.document.location.href = '../nav_bar.html'
//  }
 }

 if(file[file.length-2] == 'company')
 {
  if(file[file.length-1] == 'pres01.html') top.main.document.location.href = 'pres02.html'
  if(file[file.length-1] == 'pres011.html') top.main.document.location.href = 'pres02.html'
  if(file[file.length-1] == 'pres012.html') top.main.document.location.href = 'pres02.html'

  if(file[file.length-1] == 'pres02.html') top.main.document.location.href = 'pres03.html'
  if(file[file.length-1] == 'pres021.html') top.main.document.location.href = 'pres03.html'

  if(file[file.length-1] == 'pres03.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres031.html') top.main.document.location.href = 'pres04.html'

  if(file[file.length-1] == 'pres04.html') top.main.document.location.href = 'pres05.html'
  if(file[file.length-1] == 'pres041.html') top.main.document.location.href = 'pres05.html'
  if(file[file.length-1] == 'pres042.html') top.main.document.location.href = 'pres05.html'

  if(file[file.length-1] == 'pres05.html') top.document.location.href = '../index.html'
  if(file[file.length-1] == 'pres051.html') top.document.location.href = '../index.html'
  if(file[file.length-1] == 'pres052.html') top.document.location.href = '../index.html'
  if(file[file.length-1] == 'pres053.html') top.document.location.href = '../index.html'
  if(file[file.length-1] == 'pres054.html') top.document.location.href = '../index.html'
 }
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function slide_pres()
{
 var file = top.main.document.location.href.split('/')	// file[file.length-1] is the filename of current file in frame

 if(file[file.length-2] == 'partners')
 {
  if(file[file.length-1] == 'pres01.html') top.main.document.location.href = 'pres02.html'
  if(file[file.length-1] == 'pres02.html') top.main.document.location.href = 'pres021.html'
  if(file[file.length-1] == 'pres021.html') top.main.document.location.href = 'pres022.html'
  if(file[file.length-1] == 'pres022.html') top.main.document.location.href = 'pres03.html'
  if(file[file.length-1] == 'pres03.html') top.main.document.location.href = 'pres031.html'
  if(file[file.length-1] == 'pres031.html') top.main.document.location.href = 'pres032.html'
  if(file[file.length-1] == 'pres032.html') top.main.document.location.href = 'pres033.html'
  if(file[file.length-1] == 'pres033.html') top.main.document.location.href = 'pres034.html'
  if(file[file.length-1] == 'pres034.html') top.main.document.location.href = 'pres035.html'
  if(file[file.length-1] == 'pres035.html') top.main.document.location.href = 'pres036.html'
  if(file[file.length-1] == 'pres036.html') top.main.document.location.href = 'pres037.html'
  if(file[file.length-1] == 'pres037.html') top.main.document.location.href = 'pres038.html'
  if(file[file.length-1] == 'pres038.html') top.main.document.location.href = 'pres04.html'
  if(file[file.length-1] == 'pres04.html') top.main.document.location.href = 'pres041.html'
  if(file[file.length-1] == 'pres041.html') top.main.document.location.href = 'pres042.html'
  if(file[file.length-1] == 'pres042.html') top.main.document.location.href = 'pres05.html'
  if(file[file.length-1] == 'pres05.html')
  {
   top.document.location.href = '../index.html'
  }

//  if(file[file.length-1] == 'pres06.html') top.main.document.location.href = 'pres07.html'
//  if(file[file.length-1] == 'pres07.html')
//  {
//   top.main.document.location.href = '../content.html'
//   top.nav.document.location.href = '../nav_bar.html'
//  }
 }

 if(file[file.length-2] == 'company')
 {
  if(file[file.length-1] == 'pres01.html') top.main.document.location.href = 'pres011.html'
  if(file[file.length-1] == 'pres011.html') top.main.document.location.href = 'pres012.html'
  if(file[file.length-1] == 'pres012.html') top.main.document.location.href = 'pres02.html'

  if(file[file.length-1] == 'pres02.html') top.main.document.location.href = 'pres021.html'
  if(file[file.length-1] == 'pres021.html') top.main.document.location.href = 'pres03.html'

  if(file[file.length-1] == 'pres03.html') top.main.document.location.href = 'pres031.html'
  if(file[file.length-1] == 'pres031.html') top.main.document.location.href = 'pres04.html'

  if(file[file.length-1] == 'pres04.html') top.main.document.location.href = 'pres041.html'
  if(file[file.length-1] == 'pres041.html') top.main.document.location.href = 'pres042.html'
  if(file[file.length-1] == 'pres042.html') top.main.document.location.href = 'pres05.html'

  if(file[file.length-1] == 'pres05.html') top.main.document.location.href = 'pres051.html'
  if(file[file.length-1] == 'pres051.html') top.main.document.location.href = 'pres052.html'
  if(file[file.length-1] == 'pres052.html') top.main.document.location.href = 'pres053.html'
  if(file[file.length-1] == 'pres053.html') top.main.document.location.href = 'pres054.html'
  if(file[file.length-1] == 'pres054.html')
  {
   top.document.location.href = '../index.html'
  }
 }
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function open_call() // opens the "callcenter" in a seperate window
{
 var centerx = (screen.availWidth - 460)/2;
 var centery = (screen.availHeight - 72)/2;
 
 callcenter = open("../callcenter/xcall.html","newone","width=460,height=72,status=no,locationbar=no,toolbar=no,menubar=no,resizeable=no,scrollbars=no");
 callcenter.focus()
 callcenter.moveTo(centerx,centery)
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function show_page() //shows the selected file from the selectionlist of the nav_bar
{


 for(i=0;i<=top.nav.document.navigation.auswahl.options.length-1;i++)
 {
  if(top.nav.document.navigation.auswahl.options[i].selected == true) loc = top.nav.document.navigation.auswahl.options[i].value;
 }

 if(loc != "void" && loc.indexOf('javascript') == -1) top.location.href  = loc
 else if(loc != "void") location.href = loc

//
// if(top.nav.document.location.href.indexOf('media_nav.html') != -1 || top.location.href.indexOf('contact/index.html') != -1 || top.nav.location.href.indexOf('pres_nav.html') != -1)
// {
//  if(loc == "start") top.location.href = "../index.html"
//  if(loc == "part") location.href = "javascript:start_pres('partners')"
//  if(loc == "contact") top.location.href = "../contact/index.html"
//  if(loc == "press") top.location.href = "../media/index.html"
//  if(loc == "unternehmen") top.location.href = "../partners/index.html"
// }
// else
// {
//  if(loc == "start") top.location.href = "index.html"
//  else if(loc == "part") location.href = "javascript:start_pres('partners')"
//  else if(loc == "contact")top.location.href = "contact/index.html"
//  else if(loc == "press") top.location.href = "media/index.html"
//  else if(loc == "unternehmen") top.location.href = "/partners/index.html"
//  else {}
// }
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function check_mail()
{
 if(!top.main.document.contact.email.value || top.main.document.contact.email.value == 'fehlerhafte Eingabe' || top.main.document.contact.email.value.length <= 7)
 {
  top.main.document.contact.email.focus()
  top.main.document.contact.email.value = 'fehlerhafte Eingabe';
 }
 else
 {
  if(top.main.document.contact.email.value.indexOf('@') == -1)
  {
   top.main.document.contact.email.focus()
   top.main.document.contact.email.value = 'fehlerhafte Eingabe';
  }
  else if(top.main.document.contact.email.value.indexOf('.') == -1)
       {
        top.main.document.contact.email.focus()
        top.main.document.contact.email.value = 'fehlerhafte Eingabe';
       }
 }
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function preview(name) // opens a new window to preview a picture - use full name
{
 if(name == 'og_sshot_1.gif') open("preview01.html","preview","width=320,height=270,status=no,location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=no");
 else if(name == 'og_sshot_2.gif') open("preview02.html","preview","width=320,height=270,status=no,location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=no");
 else if(name == 'og_sshot_3.gif') open("preview03.html","preview","width=320,height=270,status=no,location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=no");
 else alert('Unknown picture-referer - This is a generated script-error');
}

//#####################################################################################
//#####################################################################################
//#####################################################################################

function open_firewall()
{
 var centerx = (screen.availWidth - 800)/2;
 var centery = (screen.availHeight - 600)/2;

 firewall = open("sim_email_firew/index_firewall.html","firewall","width=800,height=600,locationbar=no,menubar=yes,toolbar=no,scrollbars=yes");
 firewall.focus()
 firewall.moveTo(centerx,centery)
}

function open_safersurf1()
{
 var centerx = (screen.availWidth - 770)/2;
 var centery = (screen.availHeight - 600)/2;

 safersurf1 = open("sim_safersurf/oview_a.html","safersurf1","width=770,height=525,locationbar=no,menubar=yes,toolbar=no,scrollbars=no");
 safersurf1.focus()
 safersurf1.moveTo(centerx,centery)
}

function open_safersurf2()
{
 var centerx = (screen.availWidth - 770)/2;
 var centery = (screen.availHeight - 600)/2;

 safersurf2 = open("sim_safersurf/time_p_b.html","safersurf2","width=770,height=525,locationbar=no,menubar=yes,toolbar=no,scrollbars=no");
 safersurf2.focus()
 safersurf2.moveTo(centerx,centery)
}

function open_safersurf3()
{
 var centerx = (screen.availWidth - 770)/2;
 var centery = (screen.availHeight - 600)/2;

 safersurf3 = open("sim_safersurf/cont_e_b.html","safersurf3","width=770,height=525,locationbar=no,menubar=yes,toolbar=no,scrollbars=no");
 safersurf3.focus()
 safersurf3.moveTo(centerx,centery)
}

function open_safersurf4()
{
 var centerx = (screen.availWidth - 770)/2;
 var centery = (screen.availHeight - 600)/2;

 safersurf4 = open("sim_safersurf/addre_b.html","safersurf4","width=770,height=525,locationbar=no,menubar=yes,toolbar=no,scrollbars=no");
 safersurf4.focus()
 safersurf4.moveTo(centerx,centery)
}

function open_safersurf5()
{
 var centerx = (screen.availWidth - 770)/2;
 var centery = (screen.availHeight - 600)/2;

 safersurf5 = open("sim_safersurf/oview_e.html","safersurf5","width=770,height=525,locationbar=no,menubar=yes,toolbar=no,scrollbars=no");
 safersurf5.focus()
 safersurf5.moveTo(centerx,centery)
}


