





// TOP BAR
var topbar = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<TR><TD><A HREF=http://www.veslam.com ><IMG SRC=/images/veslam_logo.jpg width=200 height=117 border=0></A></TD><TD  WIDTH=100% ><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=10></TD><TD  ><TABLE BORDER=0 cellspacing=1 cellpadding=3  bgcolor=949EBA width=215 HEIGHT=100 ><TR bgcolor=01185A ><TD align=center ><SPAN style=\"FONT-SIZE: 9pt;font-family:arial;color=949EBA;letter-spacing : .1em;\">HEAD OFFICE <B>VARNA</B></SPAN> </TD></TR><TR bgcolor=01185A ><TD><FONT FACE=ARIAL COLOR=949EBA SIZE=1>Varna 9000, BULGARIA<BR>108, \"Devnya\" str.,floor 3,<BR>phn: +359 52/ 601 220<BR>fax: + 359 52/ 601 219<BR>E-mail:<A HREF=&#109;&#097;&#105;&#108;&#116;&#111;&#058;&#118;&#101;&#115;&#108;&#097;&#109;&#064;&#118;&#101;&#115;&#108;&#097;&#109;&#046;&#099;&#111;&#109;><FONT FACE=ARIAL SIZE=1 COLOR=949EBA>&#118;&#101;&#115;&#108;&#097;&#109;&#064;&#118;&#101;&#115;&#108;&#097;&#109;&#046;&#099;&#111;&#109;</A>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; <IMG SRC=/images/mapbutton_small.jpg border=0 onmouseover=\"this.style.cursor=\'hand\'\" ;  onclick=\"window.open(\'/images/map.jpg\',\'\',\'height=370,width=430,status=no,toolbar=no,menubar=no,resizable=0,scrollbars=0\')\" ></FONT></TD></TR></TABLE></TD><TD width=6></TD><TD  align=center   ><TABLE BORDER=0 cellspacing=1 cellpadding=3   bgcolor=949EBA width=215 HEIGHT=100 ><TR bgcolor=01185A ><TD align=center><SPAN style=\"FONT-SIZE: 9pt;font-family:arial;color=949EBA;letter-spacing : .1em;\">BRANCH OFFICE <B>SOFIA</B></SPAN> </TD></TR><TR bgcolor=01185A ><TD><FONT FACE=ARIAL COLOR=949EBA SIZE=1>Sofia 1000, BULGARIA<BR>100, Tintiava str.<BR>phn: +359 2/ 979 7700, +359 2/ 979 7701,<BR>fax: + 359 2/ 979 9596<BR>E-mail:<A HREF=&#109;&#097;&#105;&#108;&#116;&#111;&#058;&#115;&#111;&#102;&#105;&#097;&#111;&#102;&#102;&#105;&#099;&#101;&#064;&#118;&#101;&#115;&#108;&#097;&#109;&#046;&#099;&#111;&#109; ><FONT FACE=ARIAL SIZE=1 COLOR=949EBA>&#115;&#111;&#102;&#105;&#097;&#111;&#102;&#102;&#105;&#099;&#101;&#064;&#118;&#101;&#115;&#108;&#097;&#109;&#046;&#099;&#111;&#109;</A>  &nbsp; &nbsp; &nbsp; &nbsp; <IMG SRC=/images/mapbutton_small.jpg border=0 onmouseover=\"this.style.cursor=\'hand\'\" ;  onclick=\"window.open(\'/images/map.jpg\',\'\',\'height=370,width=430,status=no,toolbar=no,menubar=no,resizable=0,scrollbars=0\')\" ></FONT></TD></TR></TABLE></TD><TD width=6></TD><TD  align=center   ><TABLE BORDER=0 cellspacing=1 cellpadding=3  bgcolor=949EBA width=250 HEIGHT=100><TR bgcolor=01185A><TD align=center ><SPAN style=\"FONT-SIZE: 9pt;font-family:arial;color=949EBA;letter-spacing : .1em;\"><B>ROMANIA</B>OFFICE</SPAN></TD></TR><TR bgcolor=01185A ><TD><FONT FACE=ARIAL COLOR=949EBA SIZE=1 NOWRAP>Bucharest , ROMANIA<BR>166, Ion Mihalache Bvd,Block 2, Entrance 1, Floor 6, Ap.26,011179 1st District - BUCHAREST<BR>phn: +40-21-316.36.16-03 , fax: +40-21-316.36.04<BR>E-mail:<A HREF=mailto:sales-buc@veslam.com ><FONT FACE=ARIAL SIZE=1 COLOR=949EBA>sales-buc@veslam.com</A> &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; <IMG SRC=/images/mapbutton_small.jpg border=0 onmouseover=\"this.style.cursor=\'hand\'\" ;  onclick=\"window.open(\'/images/map.jpg\',\'\',\'height=370,width=430,status=no,toolbar=no,menubar=no,resizable=0,scrollbars=0\')\" ></FONT></TD></TR></TABLE></TD></TR></TABLE></TD></TR>\
</TABLE>";
// MENU
var menu = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
<TR><TD WIDTH=200 background=/images/vert_bg.jpg  HEIGHT=571 ALIGN=CENTER VALIGN=TOP><BR>\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=187  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/about_veslam.html\"' ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 >ABOUT VESLAM</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/veslam_services.html\"'  ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 >SERVICES</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/activities/veslam_activities.pl\"'ALIGN=CENTER ><FONT FACE=ARIAL  SIZE=1 color=666666>ACTIVITIES</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"hd_lr('eqmenu');this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL size=1 color=666666>EASY QUOTE</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');hd_lr('bysea');hd_lr('byland');hd_lr('eqmenu');hd_lr('ebbysea');hd_lr('ebbyland');\" onmouseout=\"hd_lr('ebmenu');this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL size=1 color=666666 >EASY BOOKING</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://veslam.com/cgi-bin/disbursment/disbursment.pl\"' ALIGN=CENTER ><FONT FACE=ARIAL size=1 color=666666>ESTIMATE D/A</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/manning/manning_form.pl\"' ALIGN=CENTER ><FONT FACE=ARIAL size=1 color=666666>MANNING</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/news/news.pl\"'  ALIGN=CENTER ><FONT FACE=ARIAL size=1 color=666666 >NEWS</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/contactus/contacts.pl\"'ALIGN=CENTER ><FONT FACE=ARIAL  size=1 color=666666 >CONTACT US</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/mb/view.pl\"' ALIGN=CENTER ><FONT FACE=ARIAL  size=1 color=666666 >MESSAGE BOARD</td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/\"' ALIGN=CENTER ><FONT FACE=ARIAL  size=1 color=666666 >HOME</td></tr>\
</table></td></tr></table>\
<BR>\
</TD></TR>\
<TR><TD background=/images/vert_bg1.jpg  height=587 ALIGN=CENTER valign=top ><A HREF=http://www.fiata.com/ target=_blank><IMG SRC=/images/fiata.gif vspace=5 border=o></A> &nbsp; &nbsp; <IMG SRC=/images/glc.jpg vspace=5 onclick=window.open(\'/images/glc_big.jpg\',\'\',\'height=1171,width=850,status=no,toolbar=no,menubar=no,resizable=1,scrollbars=1\') ; onmouseover=\"this.style.cursor=\'hand\'\" > &nbsp; &nbsp; <A HREF=http://www.nsbs.bg  TARGET=_blank><IMG SRC=/images/nsbs.gif vspace=5 border=0></A></TD></TR>\
\
</TABLE>\
";

// EQ menu
var eq_menu = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=145  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');sh_lr('bysea');hd_lr('byland');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666> SEA </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');sh_lr('byland');hd_lr('bysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > LAND </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');hd_lr('bysea');hd_lr('byland');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  ALIGN=CENTER ><FONT FACE=ARIAL  SIZE=1 color=666666 > AIR </td></tr>\
</table></td></tr></table>\
<BR>\
</TD><TD></TD><TD></TD><TR>\
\
</TABLE>\
";
// EB menu
var eb_menu = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=145  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');sh_lr('ebbysea');hd_lr('ebbyland');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > SEA </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');sh_lr('ebbyland');hd_lr('ebbysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > LAND </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');hd_lr('ebbysea');hd_lr('ebbyland');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  ALIGN=CENTER ><FONT FACE=ARIAL  SIZE=1 color=666666 > AIR </td></tr>\
</table></td></tr></table>\
<BR>\
</TD><TD></TD><TD></TD><TR>\
\
</TABLE>\
";

// BY SEA
var by_sea = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=145  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');sh_lr('bysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/quotes/quotes.pl?action=containers\"'   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > CONTAINERS </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');sh_lr('bysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/quotes/quotes.pl?action=vessels\"'  ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > VESSELS </td></tr>\
</table></td></tr></table>\
<BR>\
</TD><TD></TD><TD></TD><TR>\
\
</TABLE>\
";

// BY LAND
var by_land = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=145  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');sh_lr('byland');hd_lr('bysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/quotes/quotes.pl?action=trucks\"'  ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > TRUCKS </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('eqmenu');sh_lr('byland');hd_lr('bysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/quotes/quotes.pl?action=rail\"' ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > RAIL </td></tr>\
</table></td></tr></table>\
<BR>\
</TD><TD></TD><TD></TD><TR>\
\
</TABLE>\
";
// EBBY SEA
var ebby_sea = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=145  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');sh_lr('ebbysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"  onClick='javascript:location.href=\"http://www.veslam.com/cgi-bin/quotes/orders.pl?action=containers\"'   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > CONTAINERS </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');sh_lr('ebbysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1> VESSELS </td></tr>\
</table></td></tr></table>\
<BR>\
</TD><TD></TD><TD></TD><TR>\
\
</TABLE>\
";

// EBBY LAND
var ebby_land = "<TABLE border=0  cellpadding=0 cellspacing=0  >\
\
<table border=0 bgcolor=666666 cellpadding=0 cellspacing=0 ><tr><td><table width=145  border=0 cellspacing=1 cellpadding=0 >\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');sh_lr('ebbyland');hd_lr('ebbysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > TRUCKS </td></tr>\
<tr><td bgcolor=WHITE  height=20  onmouseover=\"this.style.backgroundColor=raz;this.style.cursor=tri;sh_lr('ebmenu');sh_lr('ebbyland');hd_lr('ebbysea');sh_lr('hider')\" onmouseout=\"this.style.backgroundColor=dva;this.style.cursor=tri;\"   ALIGN=CENTER ><FONT FACE=ARIAL SIZE=1 color=666666 > RAIL </td></tr>\
</table></td></tr></table>\
<BR>\
</TD><TD></TD><TD></TD><TR>\
\
</TABLE>\
";


// Hider gif
var hider_gif = "\
<IMG SRC=/images/transparent.gif width=300 height=200  onmouseover=\"hd_lr('eqmenu');hd_lr('bysea');hd_lr('byland');hd_lr('hider');hd_lr('ebmenu');hd_lr('ebbysea');hd_lr('ebbyland');hd_lr('hider');\">\
";


/////SHOW LAYER
function sh_lr(lr){
var to_show = eval('document.all.'+lr); to_show.style.visibility='visible';
document.all.hider.style.visibility='visible';
}
///// show layer

/////HIDE LAYER
function hd_lr(lr){
var to_show = eval('document.all.'+lr); to_show.style.visibility='hidden';
document.all.hider.style.visibility='hidden';
}
///// hide layer


///////////////////VARS
var raz = "D74149";
var dva = "FFFFFF";
var tri = "hand" ;

////////////VALIDATE MESSAGE
function validate_message(){
 var errors=''; 

//var potvyrdi= confirm( 'IZPRASHTANE NA MESSAGE ?') ;
//if (document.Default.visitor_department.value ==1 ){ alert( 'Please chose the best department for your message ?') ; return false;}
//if (potvyrdi) {document.Default.submit()}else{return false;}

if(document.Default.visitor_department.value ==1){ 
errors += "Please, chose department where your message to be sent!\n";
}
if(document.Default.visitor_subject.value == ""){ 
errors += "Please, fill the field for the SUBJECT of your message!\n";
}
if(document.Default.visitor_message.value == ""){ 
errors += "Please, write your MESSAGE!\n";
}
if(document.Default.visitor_e_mail.value == ""){ 
errors += "Please, fill the field for your E-mail address!\n";
}
if(!isEmail(document.Default.visitor_e_mail.value)  ){ 
errors += "Please, write your E-mail correctly!\n";
}







if (errors){ 

 alert('Missing fields:\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.Default.submit();}


}
///////////////END VALIDATE 

////////////VALIDATE DISBURSMENT
function validate_disbursment(){
 var errors=''; 


if(document.Default.disbursment_port.value == 1){ 
errors += "Please, chose the port for your cargo operation !\n\n";
}
if(!document.Default.disbursment_grt.value){ 
errors += "Please, enter the GRT value for your vessel !\n\n";
}
if(!document.Default.disbursment_loa.value){ 
errors += "Please, enter the LOA value for your vessel !\n\n";
}
if(!document.Default.disbursment_quay_time.value){ 
errors += "Please, enter the QUAY TIME value !\n\n";
}
if(!isCurrency(document.Default.disbursment_grt.value)){ 
errors += "Please, enter only digits (or digits and dot) for the  GRT value for your vessel !\n\n";
}
if(!isCurrency(document.Default.disbursment_loa.value)){ 
errors += "Please, enter only digits (or digits and dot)for the  LOA value for your vessel !\n\n";
}

if(!isCurrency(document.Default.disbursment_quay_time.value)){ 
errors += "Please, enter only digits (or digits and dot) for the  QUAY TIME value for your vessel !\n\n";
}



 

if (errors){ 

 alert('Corrections:\n\n\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.Default.submit();}


}
///////////////END VALIDATE DISBURSMENT

////////////VALIDATE MESSAGE FOR DISBURSEMENT
function validate_message_disbursment(){
 var errors=''; 



if(document.Default.visitor_cargo_description.value == ""){ 
errors += "Please, describe your cargo with few word!\n";
}
if(document.Default.visitor_cargo_quantity.value == ""){ 
errors += "Please, tell us what is the quantity of yoru cargo!\n";
}
if(document.Default.visitor_country.value == ""){ 
errors += "Please, tell us your country!\n";
}
if(document.Default.visitor_city.value == ""){ 
errors += "Please, tell us your city!\n";
}
if(document.Default.visitor_phone.value == ""){ 
errors += "Please, tell us your phone!\n";
}
if(document.Default.visitor_company.value == ""){ 
errors += "Please, tell us your company!\n";
}
if(document.Default.visitor_ime.value == ""){ 
errors += "Please, tell us your name!\n";
}





if(document.Default.visitor_e_mail.value == ""){ 
errors += "Please, fill the field for your E-mail address!\n";
}
if(!isEmail(document.Default.visitor_e_mail.value)  ){ 
errors += "Please, write your E-mail correctly!\n";
}







if (errors){ 

 alert('Missing fields:\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.Default.submit();}


}
///////////////END VALIDATE DISBURSMENT MESSAGE 


////////////VALIDATE EDIT NAPRAVLENIE
function validate_edit_napravlenie(){
    var errors='';
    


for(i=0;i< document.Default.length;i++) {

var k =i+1
var m = i+2;

e=document.Default.elements[i]

f=document.Default.elements[k]
h=document.Default.elements[m]



if(e.type=='text'  &&  e.value==Default.nov_nap_e_mail.value){ 
errors += "- V tova napravlenie veche ima E-mail "+ Default.nov_nap_e_mail.value +"\n";
}
if(e.type=='text'  &&  e.value=='' ){ 
var potvyrdi= confirm( 'Siguren li ste che iskate da premahnete '+ f.value  + '-' +h.value +' ot tova napravlenie') 
if (potvyrdi) {document.Default.submit()}else{return false;}
}


}

  
if (errors){ 

 alert('Slednite greshki:\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.Default.submit();}

}
///////////////END VALIDATE EDIT NAPRAVLENIE


////////////VALIDATE DEPARTMENTS
function validate_departments(){
    var errors='';
    


for(i=0;i< document.Default.length;i++) {

var k =i+1
var m = i-1;

e=document.Default.elements[i]
f=document.Default.elements[k]
h=document.Default.elements[m]



if(   e.type=='text'  && !isLatino(e.value)  && f.type=='hidden' && e.name != 'nov_ime'  ){ 
errors += "Za kod na napravlenieto samo nalki latinski bukvi a-z i tzifri 0-9 PLEASE i BEZ prazni poleta\n";
}
if(   e.type=='text'  && e.value=='departments'  && f.type=='hidden' && e.name != 'nov_ime'  ){ 
errors += "Za kod na napravlenieto ne izpolzvajte dumata DEPARTMENTS\n";
}


if( i != 0  && e.type=='text' && e.value=='' &&  h.type=='hidden'  ){ 
errors += "Molq ne ostavqjte prazno poleto za IME na napravleniqta PLEASE\n";
}
if(  e.name=='nov_kod' && !isLatino(e.value)  ){ 
errors += "Za kod nanovoto napravlenie SAMO malki latinski bukvi a-z i tzifri 0-9 PLEASE i BEZ prazni poleta\n";
}
if(  e.name=='nov_kod' && (e.value=='departments' || e.value=='e_mails') ){ 
errors += "Za kod nanovoto napravlenie dumata DEPARTMENTS  ----PLEASE\n";
}


if( document.Default.nov_kod.value && !document.Default.nov_ime.value ){ 
errors += "Molq ne ostavqjte prazno poleto za IME na tova novo napravlenie PLEASE\n";
}

if(e.type=='text'  &&  e.value=='' && f.type=='hidden' && e.name != 'nov_ime'){ 
var potvyrdi= confirm( 'Siguren li ste che iskate da premahnete  tova napravlenie') 
if (potvyrdi) {document.Default.submit()}else{return false;}
}


  }
if (errors){ 

 alert('Slednite greshki:\n'+errors)
 return (errors == '')
 exit=false; 
}else{
document.Default.submit();
}



}
///////////////END VALIDATE DEPARTMENTS

////////////VALIDATE EMAILS
function validate_emails(){
    var errors='';
    


for(i=0;i< document.Default.length;i++) {

var k =i+1
var m = i-1;

e=document.Default.elements[i]
f=document.Default.elements[k]
h=document.Default.elements[m]



if(   e.type=='text'  && !isEmail(e.value)  && f.type=='hidden' && e.name != 'nov_ime'  ){ 
errors += "Vnimatelskata s Emaila ne e dobre redaktiran\n";
}
if( i != 0  && e.type=='text' && e.value=='' &&  h.type=='hidden'  ){ 
errors += "Molq pishi IME za tozi Email PLEASE\n";
}
if(  e.name=='nov_email' && !isEmail(e.value)  ){ 
errors += "vnimatelskata s noviq Email - nqma @ nqma tochnki PLEASE\n";
}

if( document.Default.nov_email.value && !document.Default.nov_ime.value ){ 
errors += "Molq vpishete IME za tozzi nov E-mail PLEASE\n";
}

if(e.type=='text'  &&  e.value=='' && f.type=='hidden' && e.name != 'nov_ime'){ 
var potvyrdi= confirm( 'Siguren li ste che iskate da premahnete  tozi e-mail barabar s imeto') 
if (potvyrdi) {document.Default.submit()}else{return false;}
}


  }
if (errors){ 

 alert('Slednite greshki:\n'+errors)
 return (errors == '')
 exit=false; 
}else{
document.Default.submit();
}



}
///////////////END VALIDATE EMAILS


////////////VALIDATE MANNING
function validate_manning1(){
 var errors=''; 



if(document.a.davailable.value == '0' || document.a.mavailable.value == '0' || document.a.yavailable.value == '0'){ 
errors += "Please, select correctly the DATE OF AVAILABILITY !\n\n";
}
if( document.a.yavailable.value!=0 && document.a.yavailable.value < 2000 ){ 
errors += "Please, enter the year  AVAILABLE correctly - should be  2000++ !!!\n\n";
}
if(document.a.position.value == 1 ){ 
errors += "Please, select the POSITION you are applaying for !\n\n";
}
if(!document.a.familia.value || !isLong(document.a.familia.value) ){ 
errors += "Please, enter your FAMILY NAME correctly! (with no more than 20 characters)\n\n";
}
if(!document.a.ime.value || !isLong(document.a.ime.value) ){ 
errors += "Please, enter your  NAME correctly! (with no more than 20 characters)\n\n";
}
if(document.a.dborn.value == '0' || document.a.mborn.value == '0' || document.a.yborn.value == '0'){ 
errors += "Please, select correctly your BIRTH DATE !\n\n";
}
if(!document.a.born_city.value || !isLong(document.a.born_city.value) ){ 
errors += "Please, enter your  Born Place! (with no more than 20 characters)\n\n";
}
if(!document.a.pr_address_str.value || !isLong30(document.a.pr_address_str.value) ){ 
errors += "Please, enter your  Present Address! (with no more than 30 characters)\n\n";
}
if(!document.a.pr_address_city.value || !isLong(document.a.pr_address_city.value) ){ 
errors += "Please, enter your  Present City ! (with no more than 20 characters)\n\n";
}
if(!document.a.per_address_str.value || !isLong30(document.a.per_address_str.value) ){ 
errors += "Please, enter your  Permanent Address Address! (with no more than 30 characters)\n\n";
}
if(!document.a.per_address_city.value || !isLong(document.a.per_address_city.value) ){ 
errors += "Please, enter your  Permanent City ! (with no more than 20 characters)\n\n";
}
if(!document.a.telephone.value || !isLong(document.a.telephone.value) ){ 
errors += "Please, enter your  PHONE NUMBER ! (with no more than 20 characters)\n\n";
}
if(!document.a.nationality.value || !isLong(document.a.nationality.value) ){ 
errors += "Please, enter your  Nationality ! (with no more than 20 characters)\n\n";
}
if(!document.a.passport_no.value || !isLong(document.a.passport_no.value) ){ 
errors += "Please, enter the number of your passport  ! (with no more than 20 characters)\n\n";
}
if(document.a.dpass_issued.value == '0' || document.a.mpass_issued.value == '0' || document.a.ypass_issued.value == '0'){ 
errors += "Please, select correctly the DATE when your International Passport was issued !\n\n";
}
if(!document.a.passport_issued_by.value || !isLong(document.a.passport_issued_by.value) ){ 
errors += "Please, enter where was your passport issued ! (with no more than 20 characters)\n\n";
}
if(document.a.dpass_valid.value == '0' || document.a.mpass_valid.value == '0' || document.a.ypass_valid.value == '0'){ 
errors += "Please, select correctly the DATE of the validity of your International Passport  !\n\n";
}

if(!document.a.nsm_no.value || !isLong(document.a.nsm_no.value) ){ 
errors += "Please, enter the number of your National Seamans book  ! (with no more than 20 characters)\n\n";
}
if(document.a.dnsm_issued.value == '0' || document.a.mnsm_issued.value == '0' || document.a.ynsm_issued.value == '0'){ 
errors += "Please, select correctly the DATE when your National Seamans Book was issued !\n\n";
}
if(!document.a.nsm_issued_by.value || !isLong(document.a.nsm_issued_by.value) ){ 
errors += "Please, enter where was your National Seamans Book issued ! (with no more than 20 characters)\n\n";
}
if(document.a.dnsm_valid.value == '0' || document.a.mnsm_valid.value == '0' || document.a.ynsm_valid.value == '0'){ 
errors += "Please, select correctly the DATE of the validity of your National Seamans Book  !\n\n";
}
if(!document.a.languages.value || !isLong(document.a.languages.value) ){ 
errors += "Please, enter the LANGUAGES YOUR KNOW ! (with no more than 20 characters)\n\n";
}
if(!document.a.pre_sea_education.value || !isLong30(document.a.pre_sea_education.value) ){ 
errors += "Please, enter your Pre Sea Education ! (with no more than 30 characters)\n\n";
}



if (errors){ 

 alert('Corrections:\n\n\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.a.submit();}


}
function validate_manning2(){
 var errors='';
 

if(!document.a.coc_no.value || !isLong(document.a.coc_no.value) ){ 
errors += "Please, enter the number of your Certificate Of Competency! (with no more than 20 characters)\n\n";
}
if(!document.a.coc_gr.value || !isLong(document.a.coc_gr.value) ){ 
errors += "Please, enter the grade Certificate Of Competency! (with no more than 20 characters)\n\n";
}
if(!document.a.coc_by.value || !isLong(document.a.coc_by.value) ){ 
errors += "Please, enter the PLACE of Issuing of your Certificate Of Competency! (with no more than 20 characters)\n\n";
}

if(document.a.dcoc_is.value == '0' || document.a.mcoc_is.value == '0' || document.a.ycoc_is.value == '0'){ 
errors += "Please, select correctly the DATE of the issuing of your Certificate Of Competency  !\n\n";
}
if(document.a.dcoc_val.value == '0' || document.a.mcoc_val.value == '0' || document.a.ycoc_val.value == '0'){ 
errors += "Please, select correctly the DATE of the validity of your Certificate Of Competency  !\n\n";
}


if(!document.a.a1.value && !document.a.b1.value && !document.a.c1.value && !document.a.d1.value && !document.a.e1.value && !document.a.f1.value && !document.a.g1.value ){ 
errors += "Please, enter data for your Sertificates  !\n\n";
}



if( document.a.a1.value && ( document.a.da2.value =='0'|| document.a.ma2.value =='0'|| document.a.ya2.value =='0'||document.a.da3.value =='0'||document.a.ma3.value =='0'||document.a.ya3.value =='0' || !isLong(document.a.a1.value) ||  !document.a.a4.value || !isLong(document.a.a4.value) ) ){ 
errors += "Please, enter  all needed data for your Advanced Training  In Fighting sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}
if( document.a.b1.value && ( document.a.db2.value =='0'|| document.a.mb2.value =='0'|| document.a.yb2.value =='0'||document.a.db3.value =='0'||document.a.mb3.value =='0'||document.a.yb3.value =='0' || !isLong(document.a.b1.value) ||  !document.a.b4.value || !isLong(document.a.b4.value) ) ){ 
errors += "Please, enter  all needed data for your Personal Safety and Social Responsibilities sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}
if( document.a.c1.value && ( document.a.dc2.value =='0'|| document.a.mc2.value =='0'|| document.a.yc2.value =='0'||document.a.dc3.value =='0'||document.a.mc3.value =='0'||document.a.yc3.value =='0' || !isLong(document.a.c1.value) ||  !document.a.c4.value || !isLong(document.a.c4.value) ) ){ 
errors += "Please, enter  all needed data for your Proficiency in Survival Graft and Rescue Boats sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}
if( document.a.d1.value && ( document.a.dd2.value =='0'|| document.a.md2.value =='0'|| document.a.yd2.value =='0'||document.a.dd3.value =='0'||document.a.md3.value =='0'||document.a.yd3.value =='0' || !isLong(document.a.d1.value) ||  !document.a.d4.value || !isLong(document.a.c4.value) ) ){ 
errors += "Please, enter  all needed data for your Maritime Search and Rescue Co-ordinator Surface Search sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}
if( document.a.e1.value && ( document.a.de2.value =='0'|| document.a.me2.value =='0'|| document.a.ye2.value =='0'||document.a.de3.value =='0'||document.a.me3.value =='0'||document.a.ye3.value =='0' || !isLong(document.a.e1.value) ||  !document.a.e4.value || !isLong(document.a.c4.value) ) ){ 
errors += "Please, enter  all needed data for your General Operator GMDSS sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}
if( document.a.f1.value && ( document.a.df2.value =='0'|| document.a.mf2.value =='0'|| document.a.yf2.value =='0'||document.a.df3.value =='0'||document.a.mf3.value =='0'||document.a.yf3.value =='0' || !isLong(document.a.f1.value) ||  !document.a.f4.value || !isLong(document.a.f4.value) ) ){ 
errors += "Please, enter  all needed data for your Personal Survival Techniques sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}
if( document.a.g1.value && ( document.a.dg2.value =='0'|| document.a.mg2.value =='0'|| document.a.yg2.value =='0'||document.a.dg3.value =='0'||document.a.mg3.value =='0'||document.a.yg3.value =='0' || !isLong(document.a.g1.value) ||  !document.a.g4.value || !isLong(document.a.g4.value) ) ){ 
errors += "Please, enter  all needed data for your Medical Care Aboard Ship sertificate (with no more than 20 characters for Number and for Place,Country) !\n\n";
}


if(!isLong(document.a.a1.value)||!isLong(document.a.a4.value) || !isLong(document.a.b1.value)||!isLong(document.a.b4.value) ||!isLong(document.a.c1.value)||!isLong(document.a.c4.value) ||!isLong(document.a.d1.value)||!isLong(document.a.d4.value) ||!isLong(document.a.e1.value)||!isLong(document.a.e4.value) ||!isLong(document.a.f1.value)||!isLong(document.a.f4.value) ||!isLong(document.a.g1.value)||!isLong(document.a.g4.value)        ){ 
errors += "Please, do not enter  more than 20 characters in neach field for sertificate number and Place Country)\n\n";
}







if (errors){ 

 alert('Corrections:\n\n\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.a.submit();}


}
function validate_manning3(){
 var errors='';
 

if(document.a.service_rank1.value == 1 || document.a.service_rank2.value == 1  ){ 
errors += "Please, enter at least for the last two places of service!\n\n";
}
if(document.a.service_rank1.value != 1 && (!document.a.service_vessel1.value || !isLong30(document.a.service_vessel1.value) ||  !document.a.service_tonnage1.value || !isLong30(document.a.service_tonnage1.value) || document.a.dservice_from1.value=='0' || document.a.mservice_from1.value=='0'|| document.a.yservice_from1.value=='0' || document.a.dservice_to1.value=='0' || document.a.mservice_to1.value=='0'|| document.a.yservice_to1.value=='0' )  ){ 
errors += "Please, enter correctly all the data for your most recent service place - Rank, Service Vessle, Tonnage or Type of M/F!,start and end date (with no more than 30 characters for Service Vessel and for Tonnage/MF ) \n\n";
}
if(document.a.service_rank2.value != 1 && (!document.a.service_vessel2.value || !isLong30(document.a.service_vessel2.value) ||  !document.a.service_tonnage2.value || !isLong30(document.a.service_tonnage2.value) || document.a.dservice_from2.value=='0' || document.a.mservice_from2.value=='0'|| document.a.yservice_from2.value=='0' || document.a.dservice_to2.value=='0' || document.a.mservice_to2.value=='0'|| document.a.yservice_to2.value=='0' )  ){ 
errors += "Please, enter correctly all the data for you second to most recent service place - Rank, Service Vessle, Tonnage or Type of M/F!,start and end date (with no more than 30 characters for Service Vessel and for Tonnage/MF ) \n\n";
} 




if (errors){ 

 alert('Corrections:\n\n\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.a.submit();}


}
function validate_manning4(){
 var errors='';
 var today = new Date();
var year=today.getYear();
var month=today.getMonth();

 

if(!document.b.pos.value ){ 
errors += "Please, do not leave the POSITION APPLIED field empty!\n\n";
}
if(!document.b.ime.value ){ 
errors += "Please, do not leave the Name field empty!\n\n";
}

if(!document.b.fam.value ){ 
errors += "Please, do not leave the FAMILY NAME field empty!\n\n";
}
if(( document.b.davailable.value!='0' || document.b.mavailable.value!='0' || document.b.yavailable.value!='0' ) && (document.b.davailable.value=='0'||document.b.mavailable.value=='0'||document.b.yavailable.value=='0')){ 
errors += "Please, enter the new  DATE AVAILABLE correctly - the full date!\n\n";
}

if( document.b.yavailable.value!=0 && document.b.yavailable.value < year ){ 
errors += "Please, enter the year  AVAILABLE correctly "  + document.b.yavailable.value+" < " +year+ "!!!\n\n";
}
if( document.b.yavailable.value!=0 && document.b.yavailable.value == year && document.b.mavailable < month){ 
errors += "Please, enter the year  AVAILABLE correctly "  + document.b.yavailable.value+" < " +month+ "!!!\n\n";
}








if (errors){ 

 alert('Corrections:\n\n\n'+errors)
 return (errors == '')
 exit=false; 
}else{document.b.submit();}


}

function isLong(s){ 
if (isEmpty(s)){  return true ; }
if ( s.length > 20  ){ return  false  ;}else{return true ;}
}
function isLong30(s){ 
if (isEmpty(s)){  return true ; }
if ( s.length > 30  ){ return  false  ;}else{return true ;}
}


///////////////END VALIDATE MANNING













//////////////////////////////////////////IS KALABALYK

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}

function isWhitespace (s)
{   var i;

    if (isEmpty(s)) return true;

    for (i = 0; i < s.length; i++)
    {   
        var c = s.charAt(i);
        if (c == ' ' ) return false;
    }
    return true;
}

function isInteger (s)
{   var i;
    if (isEmpty(s)) return true ;
       
    for (i = 0; i < s.length; i++)
    {   
        var c = s.charAt(i);
        if (!isDigit(c) ) return false;
    }
    return true;
}



function isCurrency(s)
{
    if (isEmpty(s))  return true ;

	var validChars = "0123456789.";
	for (var i = 0; i < s.length; i++)
	{
		if (validChars.indexOf(s.charAt(i),0) < 0) return false;
	}
    if (eval(s) == 0) 
       if (isCurrency.arguments.length == 2) return true;
       else return (isCurrency.arguments[2] == true);
	return true;
}

function isTelefon(s)
{
    if (isEmpty(s))  return true ;

	var validChars = " 0123456789";
	for (var i = 0; i < s.length; i++)
	{
		if (validChars.indexOf(s.charAt(i),0) < 0) return false;
	}
    if (parseInt(s) == 0) 
       if (isTelefon.arguments.length == 2) return true;
       else return (isTelefon.arguments[2] == true);
	return true;
}



function isLatino(s)
{
    if (isEmpty(s))  return true ;

	var validChars = "abcdefghijklmnopqrstuvwxyz0123456789";
	for (var i = 0; i < s.length; i++)
	{
		if (validChars.indexOf(s.charAt(i),0) < 0) return false;
	}
    if (parseInt(s) == 0) 
       if (isLatino.arguments.length == 2) return true;
       else return (isLatino.arguments[2] == true);
	return true;
}
function isEmail(s)
{
    if (isEmpty(s))  return true ;
    var j = 0 ;
      
	for (var i = 0; i < s.length; i++){
            if (s.charAt(i) == '@' || s.charAt(i) == '.'    ) j++ ;
	}

   if ( j  < 2 ) return false ;

    if (parseInt(s) == 0) 
       if (isEmail.arguments.length == 2) return true;
       else return (isEmail.arguments[2] == true);
	return true;
}



function MM_findObj(n, d) { //v3.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); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


var maketable = '<TABLE CELLPADDING=10 CELLSPACING=0 BORDER=0 BGCOLOR=RED ><TR><TD>\
<TABLE CELLPADDING=15 CELLSPACING=1 BORDER=0 WIDTH=500 >\
<TR BGCOLOR=WHITE ><TD  >\
The tug use is compulsory for ports of Varna for all vessels having GRT more than 1000 t. with some exceptions as the case may be.For more information please contact our agency department.\
<BR>\
<BR>\
</TD></TR>\
</TABLE></TD></TR></TABLE>\
\
\
\
';
