free = 1;
numb = 1;
going = "r";
limit = 1;
function sc_wl(){
limit = 0;

if(free == 1 && numb < totwl){
document.getElementById("raw").style.display = "inline";	
document.getElementById("law").style.display = "inline";	
	free = 0;
imp = document.getElementById("due_im").style.marginLeft;	
//alert(imp);
$j("#due_im").animate({ 
marginLeft: "-454px"
}, 500, 'easeInOutCirc',
function() {
imp = document.getElementById("due_im").style.marginLeft;	
//alert(totwl);
if(imp="-453px"){
free = 0;
if(numb == totwl){
numb = 0;
new Ajax.Updater('limg1', '/bizadvance/get/getwl_image.php?numb='+numb);
numb = 1;
new Ajax.Updater('limg2', '/bizadvance/get/getwl_image.php?numb='+numb,{onComplete:gofree});
//document.getElementById("limg1").innerHTML = document.getElementById("limg2").innerHTML;
document.getElementById("due_im").style.marginLeft = "0px";
}else{
if(going == "l"){
going = "r";
numb = numb + 2;
}else{
numb = numb + 1;
}
document.getElementById("limg1").innerHTML = document.getElementById("limg2").innerHTML;
document.getElementById("due_im").style.marginLeft = "0px";
new Ajax.Updater('limg2', '/bizadvance/get/getwl_image.php?numb='+numb,{onComplete:gofree});
}	
}
	
} 
);

if(numb + 1 == totwl || numb + 2 > totwl){
document.getElementById("raw").style.display = "none";
}

}else{

}
}









function sc_wl_bk(){

if(free == 1 && numb > limit){
document.getElementById("raw").style.display = "inline";	
document.getElementById("law").style.display = "inline";	
	free = 0;
document.getElementById("due_im").style.marginLeft = "-453px";
document.getElementById("limg2").innerHTML = document.getElementById("limg1").innerHTML;


if(going == "r"){
going = "l";
numb = numb - 2;
}else{
numb = numb - 1;
}


new Ajax.Updater('limg1', '/bizadvance/get/getwl_image.php?numb='+numb,{onComplete:function(){





$j("#due_im").animate({ 
marginLeft: "0px"
}, 500, 'easeInOutCirc',function(){free = 1;});
																							
}});




	
	

if(numb - 1 < 0){
document.getElementById("law").style.display = "none";	
}	

}else{
	

	
	
}
}






function gofree(){

free = 1;
	
}

function gorota_wl(){
	
if(numb<totwl){
sc_wl();
}
else{
sc_wl_bk();
numb=-2;	
}

}



window.onload = function(){ 
intwlc = setInterval('gorota_wl()', 5000);
 



}




function stopwlsc(){
	clearInterval(intwlc);
}















		function get_object(id) {
			var object = null;
			if( document.layers )	{			
				object = document.layers[id];
			} else if( document.all ) {
				object = document.all[id];
			} else if( document.getElementById ) {
				object = document.getElementById(id);
			}
			return object;
		}

		function is_child_of(parent, child) {
			if( child != null ) {			
				while( child.parentNode ) {
					if( (child = child.parentNode) == parent ) {
						return true;
					}
				}
			}
			return false;
		}
		function fxmo(element, event, JavaScript_code) {
			var current_mouse_target = null;
			if( event.toElement ) {				
				current_mouse_target 			 = event.toElement;
			} else if( event.relatedTarget ) {				
				current_mouse_target 			 = event.relatedTarget;
			}
			if( !is_child_of(element, current_mouse_target) && element != current_mouse_target ) {
				eval(JavaScript_code);
			}
		}
		
		
		
		function startwlnc() {
		intwlc = setInterval('gorota_wl()', 5000);
		}




function visup(idl){
new Ajax.Request("/bizadvance/get/link_vis_up.php?id="+idl);		
}




function dc_wl(idlun){
	
	
	
var r=confirm("Sigurno zelite maknuti ovaj link?");
if (r==true)
  {
document.getElementById("snwlid"+idlun).style.display = "none";	

new Ajax.Request("/bizadvance/get/link_un.php?id="+idlun);		
  }
else
  {

  }		
	
	
	
	
	
	

}






function uredi_wl(idlun){
var load = window.open('/bizadvance/get/link_edit.php?id='+idlun,'','scrollbars=yes,menubar=no,height=450,width=600,resizable=yes,toolbar=no,location=no,status=no');
}

function dodaj(){
var load = window.open('/bizadvance/get/link_add.php','','scrollbars=yes,menubar=no,height=770,width=600,resizable=yes,toolbar=no,location=no,status=no');
}


function refrom(){	
window.location.reload()
}



