/* 	Copyright:	ArtwareSoftware 
	Project:	swissFM
	File: 		sfmt_js_links.js 
	Version: 	3.0 
	Description:	Javascript support file
*/

redCol = '#B00918'
menuItm = 6

var Link;
fLink = new Array("Accuel","Solutions","Services","Industries","Contact","Consultation","Links","Privacy","Terms")
eLink = new Array("English","Solutions","Support","Industries","Contact","Request Info","Links","Privacy","Terms")
dLink = new Array("Deutsch","Applikationen","Services","Lösungen","Kontakt","Anfrage","Links","Privacy","Terms")
sLink = new Array("Español","Aplicaciones","Soporte técnico","Soluciones","Contacto","Consulta","Links","Privacy","Términos legales")
jLink = new Array("&#12507;&#12540;&#12512;","&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;","&#12469;&#12540;&#12499;&#12473;","&#12477;&#12522;&#12517;&#12540;&#12471;&#12519;&#12531;","&#12467;&#12531;&#12479;&#12463;&#12488;","&#24773;&#22577;&#12288;","&#12522;&#12531;&#12463;","&#12503;&#12521;&#12452;&#12496;&#12471;&#12540;","&#26465;&#20214;")

lLink  = new Array( "index","solutions","support","industries","company","tools_dsk","links","privacy","terms")
lLngu  = new Array( "_d","_f","_e","_s","_j")

LngCst = new Array( "Kunden und Partner Eingang","Entrée Client et Partenaire","Customer and Partner Entrance","Customer and Partner Entrance","Customer and Partner Entrance")
Lngu   = new Array( "Deutsch","Francais","English","Español","Japanese")

   if (document.images) {
	homeOff     = new Image
	homeOn      = new Image
	homeOff.src = 'images/clg1.gif'
	homeOn.src  = 'images/clg2.gif'
   }
   else {	
	homeOff = ""
	homeOn = ""}


function mainHead(sec,lang) {
	Link = dLink
	if(lang == undefined) { lang = '_d' }
	if(lang =='_e') { Link = eLink }
	if(lang =='_f') { Link = fLink }
	if(lang =='_s') { Link = sLink }
	if(lang =='_j') { Link = jLink }
	home = lLink[0] + lang + ".html"
	mainTitle(sec,lang)
	langNav(sec,lang)
}

function miniTitle(heading) {
	hd = "<table border=0 width=800 height=100 bgcolor='#000099'  background=images/clouds00.jpg cellpadding=5>"
	hd += "<tr colspan=2><td width=220> &nbsp;<font face='Verdana, Geneva' size=+2 color=silver>SWISS<font size=+2 color=red ><I>FM</I><font color=white>Tool</font>"
	hd += "<td align=left><font face='HELVETICA,ARIAL' size=+2 color=blue>" + heading + "</font></th>"
	hd += "</tr></table>\n"
	document.write(hd)
}

function mainTitle(sec,lang) {
	hd = "<table border=0 width=1000 height=50  cellpadding=5>"
	hd += "<tr colspan=5 valign=center><td width=640 > &nbsp;<nobr><a HREF='" + home + "'><font face='Verdana, Geneva' size=+2 color=white>SWISS<font size=+2 color='#B00918'><I><B>FM</B></I><font color=white></B>Tool</b></font></a></nobr>"

// Temporary News button
//	hd += " &nbsp; &nbsp; &nbsp;<a HREF=pdfs/news.pdf TARGET=PDF><img src=images/anews.gif border=0 align=bottom></a>"

	hd += "</font></td>"
	hd += "<td align=left width=300 ><font face='HELVETICA,ARIAL' size=1>"
	hd += "<font size=1 color=red>" + Link[0] + "</font></a><br>\n"
	for(i=0;i<5;i++) {	
	    if(lang == lLngu[i]) {continue}
	    switchLang = lLink[sec] + lLngu[i]
	    hd += "<a href='" + switchLang + ".html'><font size=1>" + Lngu[i] + "</font></a><br>\n"
	}
	hd += "</td></tr></table>\n"
	document.write(hd)
}

function langNav(sect,lang) {
	nav = "<table border=0 width=100%><tr colspan=9 height=20>"
	div = "<td width=120 background='images/menu_1.jpg' align=center>"
	for(i=1;i<=menuItm;i++) {
	    nav += div + "<a HREF='" + lLink[i] + lang + ".html'>" + Link[i] + "</a></td>\n"
	}
	nav += "<td width=400 background='images/menu_1.jpg' align=center>"
	nav += "&nbsp;</td></tr><tr colspan=8 height=1 valign=top>\n"
	for(i=1;i<=menuItm;i++) {
	    bg = "bgcolor=gold"
	    if(i==sect) { 
		bg = " bgcolor=" + "gold"
	    }
	    nav += "<th width=110" + bg + "><font size=1 color=blue>.</font></th>"
	}
	nav += "</tr></table><br>\n"
	document.write(nav)
}

function mainFoot(lang) {
	if(lang == undefined) { lang = ''}
	ft = "<table border=0 width=100%>"
	ft += "<tr valign=bottom><td colspan=3 align=center>"
	ft += "<hr size=1 color=#808080><FONT face='HELVETICA,ARIAL' size=1 color=white>"
	ft += "© Copyright SWISS<font color=red><I>FM</I></font> &nbsp; | &nbsp; "	

	ft += "<a href='MAILTO:info@swissfm.ch'><font size=1>info@swissfm-tool.com</font></a>  &nbsp; | &nbsp; \n"

	ft += "<a HREF=\"javascript:popUpFrame('" + lLink[menuItm+1] + lang + ".html','pop')\">"
	ft += "<font size=1>" + Link[menuItm+1] + "</font></a> &nbsp; | &nbsp; "
	ft += "<a HREF=\"javascript:popUpFrame('" + lLink[menuItm+2] + lang + ".html','pop')\">"
	ft += "<font size=1>" + Link[menuItm+2] + "</font></a> &nbsp; | &nbsp; "

	ft += "<a HREF=\"http://artware-software.com\" Target=ext ><font size=1>Web Development</font></a>"
	ft += " <br></FONT></td></tr></table>"
	document.write(ft)
}

function popWindow(txt,w) {
	resize = 'width=300,height=450' + ',resizable'
	popWnd = window.open('',w,resize)
	popWnd.document.write("<HTML><HEAD><TITLE>swissfm</TITLE></HEAD>")
	popWnd.document.write("<LINK REL=stylesheet TYPE='text/css' HREF='../sfmt_stl.css'>")
	popWnd.document.write("<BODY bgcolor=" + redCol + " topmargin=0>")
	popWnd.document.write("<table border=0 cellpadding=0 height=100% width=100%>")
	popWnd.document.write("<tr valign=top><td align=center>")
	popWnd.document.write("<font  face='HELVETICA,ARIAL' size=2 color=#202020>")
	popWnd.document.write("<br><B>swissfm: " + txt )
	popWnd.document.write("</B></td></tr></table></BODY></HTML>")
	popWnd.document.close()
	popWnd.focus()
}

 function popUpFrame(page,w) {
	resize = 'width=300,height=450' + ',resizable,scrollbars=yes'
	popWnd = window.open(page,w,resize)
	popWnd.focus()
}


 function popUpDsk(page,w) {
	resize = 'width=400,height=500' + ',resizable,scrollbars=yes'
	popWnd = window.open(page,w,resize)
	popWnd.focus()
}

function selImg(prefix,from,to,w) {
      var sel = from + Math.floor( (Math.random()* (1 + to - from)) )
      var img = "images/" + prefix + sel
      document.write("<img src=" +  img + ".jpg border=0 width=" + w + ">")
}

function popUpWin(pic,w,size) {
	resize = size + ',resizable'
	picWindow = window.open(pic,w,resize)
	picWindow.focus()
}

function validErrForm_d(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Unternehmen\n";check=false }
    if(frm.Contact.value=="") { fill +=" Kontakt Person\n";check=false }
    if(frm.Email.value=="") { fill +="Email\n";check=false }
    if(check==false) { alert( " Bitte Pflichtfelder ausfuellen:\n\n\n" + fill) }

    return check
}

function validErrForm_s(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Cliente/Empresa/Localidad\n";check=false }
    if(frm.Contact.value=="") { fill +=" Persona de contacto\n";check=false }
    if(frm.Email.value=="") { fill +=" Email\n";check=false }
    if(check==false) { alert( " Por favor rellenar los campos señalados:\n\n\n" + fill) }

    return check
}

function validForm_d(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Unternehmen\n";check=false }
    if(frm.Web.value=="") { fill +="Homepage\n";check=false }
    if(frm.Email.value=="") { fill +="Email\n";check=false }
    if(frm.AppArea.value=="") { fill +="Anwenduncsbereiche\n";check=false }
    if(frm.Loc.value=="") { fill +="Niederlassungen, Laender\n";check=false }
    if(frm.OrgSize.value=="") { fill +="Groesse des Unternehmens\n";check=false }

    if(check==false) { alert( " Bitte Pflichtfelder ausfuellen:\n\n\n" + fill) }

    return check
}

function validForm_e(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Company Name\n";check=false }
    if(frm.Web.value=="") { fill +="Homepage\n";check=false }
    if(frm.Email.value=="") { fill +="Email\n";check=false }
    if(frm.AppArea.value=="") { fill +="Area of Application\n";check=false }
    if(frm.Loc.value=="") { fill +="Locations, Country(s)\n";check=false }
    if(frm.OrgSize.value=="") { fill +="Organisation Size\n";check=false }

    if(check==false) { alert( " Please fill in the following\n required fields:\n\n\n" + fill) }

    return check
}

function validForm_s(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Empresa\n";check=false }
    if(frm.Web.value=="") { fill +="Homepage\n";check=false }
    if(frm.Email.value=="") { fill +="Email\n";check=false }
    if(frm.AppArea.value=="") { fill +="Área de aplicación\n";check=false }
    if(frm.Loc.value=="") { fill +="Localidades, País(es)\n";check=false }
    if(frm.OrgSize.value=="") { fill +="Dimensión de la empresa\n";check=false }

    if(check==false) { alert( " Por favor rellenar los campos señalados:\n\n\n" + fill) }

    return check
}

function validForm_f(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Société\n";check=false }
    if(frm.Web.value=="") { fill +="Site web\n";check=false }
    if(frm.Email.value=="") { fill +="Email\n";check=false }
    if(frm.AppArea.value=="") { fill +="Champs d'application\n";check=false }
    if(frm.Loc.value=="") { fill +="Ville, pays\n";check=false }
    if(frm.OrgSize.value=="") { fill +="Taille de l'organisation\n";check=false }

    if(check==false) { alert( " Veuillez remplir les\n champs obligatoires suivants:\n\n\n" + fill) }

    return check
}

function validForm_j(frm) {
    check = true
    fill  = ''
    if(frm.Company.value=="") { fill +="Company Name\n";check=false }
    if(frm.Web.value=="") { fill +="Homepage\n";check=false }
    if(frm.Email.value=="") { fill +="Email\n";check=false }
    if(frm.AppArea.value=="") { fill +="Area of Application\n";check=false }
    if(frm.Loc.value=="") { fill +="Locations, Country(s)\n";check=false }
    if(frm.OrgSize.value=="") { fill +="Organisation Size\n";check=false }

    if(check==false) { alert( " Please fill in the following\n required fields:\n\n\n" + fill) }

    return check
}