<!--

var windowVariable = null;
function launchWindow(link) {
  windowVariable = window.open('pop_vest.php?id='+link,'Vest','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=380,height=300, left=5,top=5');

}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function vesti_page_change(n){
	document.forma.page.value = n;
	document.forma.submit();	
}

function check_adsl_form(){
	OK = true;
	if ((document.forma.textfield1.value != '')&&(document.forma.textfield2.value != '')&&(document.forma.textfield4.value != '')&&(document.forma.textfield6.value != '')&&(document.forma.textfield5.value != '')){
		;}
	else {
		OK = false;	
		alert("Molimo Vas da unesete sve potrebne podatke");
	}
	TS = document.forma.textfield4.value;
	if (!test_number(TS)){
		OK = false;
		alert("Noseci broj nije unet u odgovarajucem formatu!");
		document.forma.textfield4.focus();
	}
	if (TS.length>12){
		OK = false;
		alert("Noseci broj je duzi nego sto treba!");
		document.forma.textfield4.focus();
	}
	if (OK){document.forma.submit();};
}

function test_number(TempString){
IsOK = true;
var FirstChar = TempString.substring(0,1);
if (FirstChar == "0"){IsOK = false;}
var RefString="1234567890";
for (Count=0; Count < TempString.length; Count++)  {
TempChar= TempString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)  
IsOK = false;
}
return (IsOK);
}

function method97 (broj) {
	a = broj * 100 / 97;
	k = 98 - Math.round (97*(a-Math.floor(a)));
	return (k);	
}

function uplatnica() {
	if ((!test_number(document.forma_uplate.broj.value)) || (document.forma_uplate.broj.value=='')){
		alert ('Unesite noseci broj u korektnom formatu!');	
	}
	else {
		window.open('model97.php?prefix='+document.forma_uplate.prefix.value+'&broj='+document.forma_uplate.broj.value+'&month='+document.forma_uplate.month.value+'&year='+document.forma_uplate.year.value,null,"height =240, width =450,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
	}
}
function uplatnica_e() {
	if ((!test_number(document.forma_uplate.broj.value)) || (document.forma_uplate.broj.value=='')){
		alert ('Insert carrier phone line in corect form !');	
	}
	else {
		window.open('http://adsl.beotel.net/model97.php?prefix='+document.forma_uplate.prefix.value+'&broj='+document.forma_uplate.broj.value+'&month='+document.forma_uplate.month.value+'&year='+document.forma_uplate.year.value,null,"height =240, width =450,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
	}
}
function submit_pretraga_form(){
	document.form.submit();
}

function check_adsl_form_e(){
	OK = true;
	if ((document.forma.textfield1.value != '')&&(document.forma.textfield2.value != '')&&(document.forma.textfield4.value != '')&&(document.forma.textfield6.value != '')&&(document.forma.textfield5.value != '')){
		;}
	else {
		OK = false;	
		alert("Please, insert all data!");
	}
	TS = document.forma.textfield4.value;
	if (!test_number(TS)){
		OK = false;
		alert("Telephone number of the line to be used for ADSL is not on the right format!");
		document.forma.textfield4.focus();
	}
	if (TS.length>12){
		OK = false;
		alert("NTelephone number of the line to be used for ADSL is too long!");
		document.forma.textfield4.focus();
	}
	if (OK){document.forma.submit();}
}

function submit_kontakt_form(){
	OK = true;
	if (document.form2.email.value != ''){
		;}
	else {
		OK = false;	
		alert("Molimo Vas da unesete  potrebne podatke");
	}
	
	if (OK){document.form2.submit();};
}

function submit_kontakt_form_e(){
	OK = true;
	if (document.form2.email.value != ''){
		;}
	else {
		OK = false;	
		alert("Please, insert e-mail address!");
	}
	
	if (OK){document.form2.submit();};
}
-->