function top()	{
window.scrollTo(0,0);
}

function back()	{
history.back();
}

function FrontPage_Form1_Validator(theForm)
{
if (theForm.sdg_lfdnr.value == "")
{
//alert("Please enter the Cargo-ID !");
alert("Unesite broj paketa!"); 
theForm.sdg_lfdnr.focus();
return (false);
}
							
if (theForm.sdg_lfdnr.value.length != 8)
{
//alert("Please enter all 8 digits.");
alert("Molim Vas unesite svih 8 znamenaka.");
theForm.sdg_lfdnr.focus();
return (false);
}		
							
									
if (theForm.sdg_mandnr.value == "")
{
//alert("Please enter the Cargo-ID !");
alert("Unesite broj paketa!"); 
theForm.sdg_mandnr.focus();
return (false);
}
							
if (theForm.sdg_mandnr.value.length != 3)
{
//alert("Please enter all 3 digits !");
alert("Molim Vas unesite svih 3 znamenaka.");
theForm.sdg_mandnr.focus();
return (false);
}
									
							
if (theForm.sdg_landnr.value != "191")
{
//alert("You can only search for Cargo-IDs starting with '191' !");
alert("Pretraživati možete samo Pakete koji pocinju sa '191'!");
theForm.sdg_landnr.focus();
return (false);
}
							
							
return (true);
}
//-->
							
function webtrace_form_Validator_Verknr(theForm)
{
if (theForm.verknr.value == "")
{
//alert("Please enter a reference number !");
alert("Molim Vas unesite Referentni-Broj!");
theForm.verknr.focus();
return (false);
}
									
if (theForm.kundenr.value == "")
{
//alert("Please enter a customer number !");
alert("Molim Vas unesite Jedinstveni broj partnera!");
theForm.kundenr.focus();
return (false);
}
									
return(true);
}

var s, c, o;
highlight_inner = function() {
	s = !s;
	c++;
	o.style.backgroundColor = s ? "#eee" : "";
	if( c < 6 ) setTimeout( "highlight_inner()", 200 );
	else o = null;
}
function highlight( strObj ) {
	if( o ) o.style.backgroundColor = "";
	if( !document.getElementById || !( o = document.getElementById( strObj ) ) ) return;
	s = false;
	c = 0;
	window.location.hash = strObj;
	setTimeout( "highlight_inner()", 200 );
}


function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
}


$(function () {
    $('#track-trace > ul').tabs();

    $("tbody > tr:nth-child(even)").addClass("odd");


	$('#floating-banner-flash').flash({
         	src: '/media/7944/300x300_net_hr.swf',
         	width: 300,
         	height: 300,
	 	flashvars: { clicktag: '/osnovne-informacije/ups-promotivna-akcija.aspx' }
	 	},{update:false});


	$('#ups-banner').flash({
         	src: '/media/7947/300x300_net_hr.swf',
         	width: 300,
         	height: 300,
	 	flashvars: { clicktag: 'http://www.overseas.hr' }
	 	},{update:false});

}); 

function position() {
        var pos = { left: $("#bigCont").width(), top: $("#bigCont").height() };
        pos.left = Math.floor((pos.left - parseInt($("#floating-banner-flash").width())) / 2) +100;
        pos.top = Math.floor((pos.top - parseInt($("#floating-banner-flash").height())) / 2) -250;
	$("#floating-banner")
	 	.css(pos)
      	}

function zatvoriProzor(){
$("#floating-banner").remove();
}
							
							
				