function open_news(what) { win = NewWindow(what,'article','700','400','yes','center','yes','no','yes'); win.focus(); } function open_career(what) { win = NewWindow(what,'recruitment','850','600','yes','top','yes','yes','yes'); win.focus(); } function open_plane(what) { win = NewWindow(what,'plane','320','600','no','left','no','no','no'); win.focus(); } function open_jobs(what) { win = NewWindow(what,'job','600','500','yes','center','yes','no','yes'); win.focus(); } function fm2i(what) { win = NewWindow(what,'fm2i','700','500','yes','center','yes','no','yes'); win.focus(); } function NewWindow(mypage,myname,w,h,scroll,pos,res,status,toolbar) { if (!(res)) res = "no"; if (!(status)) status = "no"; if (!(toolbar)) toolbar = "no"; if(pos == "random") { LeftPosition = (screen.width)?Math.floor(Math.random()*(screen.width-w)):100; TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100; } if(pos == "center") { LeftPosition=(screen.width)?(screen.width-w)/2:100; TopPosition=(screen.height)?(screen.height-h)/2:100; } else { if((pos != "center" && pos != "random") || pos == null) { LeftPosition=0; TopPosition=20; } } settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status='+status+',menubar=no,toolbar='+toolbar+',resizable='+res; win = window.open(mypage,myname,settings); win.focus(); return win; } function navigate(where) { window.document.navigation.P.value = where; window.document.navigation.SubP.value = ""; window.document.navigation.action = "main.php4"; window.document.navigation.submit(); } function navigatesub(where) { var tab_link=where.split("_"); if (tab_link.lengh == 0) window.document.navigation.P.value = where; else window.document.navigation.P.value = tab_link[0]; window.document.navigation.SubP.value = where; window.document.navigation.action = "main.php4"; window.document.navigation.submit(); } function plane_navigate(where) { window.opener.document.navigation.P.value = where; window.opener.document.navigation.SubP.value = ""; window.opener.document.navigation.action = "main.php4"; window.opener.document.navigation.submit(); } function plane_navigatesub(where) { var tab_link=where.split("_"); if (tab_link.lengh == 0) window.opener.document.navigation.P.value = where; else window.opener.document.navigation.P.value = tab_link[0]; window.opener.document.navigation.SubP.value = where; window.opener.document.navigation.action = "main.php4"; window.opener.document.navigation.submit(); } function changelanguage(lang) { window.document.navigation.language.value = lang; window.document.navigation.action = "changelanguage.php4"; window.document.navigation.submit(); } function ColorTopMenu (id,type) { theclass = "BlueBkgWhiteText"; if (type == "off") { if (document.navigation.P.value != id) theclass = "WhiteBkgBlueText"; } for (i=0;i<3; i++) { tmp = eval ("document.getElementById('tab"+i+"_"+id+"')"); tmp.className = theclass; } } function trim(string) { return string.replace(/(^\s*)|(\s*$)/g,''); } function validate() { var fillfield = false; var whocontact = false; //check if all fields are ot empty if (trim(document.navigation.name.value)=="" || trim(document.navigation.fname.value)=="" || trim(document.navigation.firm.value)=="" || trim(document.navigation.street.value)=="" || trim(document.navigation.zipcode.value)=="" || trim(document.navigation.city.value)=="" || trim(document.navigation.mail.value)=="" || trim(document.navigation.country.value)=="") alert("Filling in the boxes marked with * is obligatory"); else fillfield = true; //check if one of radio is cheched for (i=0;i<=2;i++) { if (document.navigation.contact[i].checked == true) whocontact = true; } if (!whocontact) alert("You must define a service !!"); if (fillfield && whocontact) { window.document.navigation.action = "tools/mail.php4"; window.document.navigation.submit(); } } function open_real(videofile,title) { var what = 'real/realbox.php4'; win = NewWindow('','real','500','500','no','center','no','no','no'); win.document.write("
"); win.document.getreal.whatfile.value = videofile; win.document.getreal.titlevideo.value = title; win.document.getreal.target = 'real'; win.document.getreal.action = what; setTimeout("win.document.getreal.submit();","2000"); } function open_pic(file2open) { win = NewWindow('tools/showpics.php4?picfile='+file2open,'picture','500','500','no','center','no','no','no'); } function open_result() { var fillkeyword = false; var choosecriteria = false; if (trim(window.document.gosearch.keyword.value) == "") alert("You must define search criteria!!"); else fillkeyword = true; if (window.document.gosearch.criteria.value == "default") alert("The domain you chose is not a valid criterion!!"); else choosecriteria = true; if (fillkeyword && choosecriteria) { var what = 'tools/search_result.php4'; win = NewWindow('','search_page','500','500','yes','left','no','no','no'); window.document.gosearch.action = what; window.document.gosearch.target = 'search_page'; window.document.gosearch.submit(); } } function next_result(min,max) { document.display.borne_min.value = min; document.display.borne_max.value = max; document.display.action = "search_result.php4"; document.display.submit(); } function intercept() { if (document.layers) document.captureEvents(Event.KEYPRESS) function backhome(e) { if (document.layers) { if (e.which==13) open_result(); } else if (document.all) { if (event.keyCode==13) open_result(); } } } function open_country_page (country) { if (country != 'NULL') { window.open('http://'+country+'.fmlogistic.com/'); } } function open_minisite(what) { win = NewWindow(what,'minisite','950','590','no','center','no','no','no'); win.focus(); }