<!--//
//*** PODMIENKY REKLAMY NA STRANKE *****************************************//
function podmienkyRek() {
	window.open("podmienky_reklama.php", "_podmienky", "toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=590, height=500, left=20, top=20");	
}

//*** MAZANIE AUKCIE *****************************************//

function DelAuk() {
	document.aukform.action = "aukcie_delauk.php";
	document.aukform.submit();
}

//*** MAZANIE OBRAZKY TOVARU V AUKCII ************************//

function DelPic() {
	document.aukform.action = "aukcie_delpic.php";
	document.aukform.submit();
}

//*** DETAIL TOVAR NA TLAC ***********************************//

function open4print(id) {
	window.open("tovar_print.php?id="+id, "_tovar4print", "toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=auto, width=590, height=500, left=20, top=20");
}

//*** ZMENA POCTU KUSOV TOVARU V KOSIKU **********************//

function openKosikKus(id) {
	window.open("kosik_kus.php?id="+id,"_kosik_kus","toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=auto, width=300, height=80, left=20, top=20");
}

//*** PRIHLASOVANIE ******************************************//

function checkLog() {
	if (document.logform.meno.value == "") {
		alert("Neuviedli ste Vaše prihlasovacie meno!");
	} else {
		if (document.logform.heslo.value == "") {
			alert("Neuviedli ste Vaše heslo!");
		} else {
			document.logform.crypt.value =  calcSHA1(document.logform.heslo.value);
			document.logform.heslo.value = "";
			document.logform.submit();
		}
	}
}

//*** OBRAZOK ***********************************************//

function openAukBig(id_pic) {
	window.open("admin/aukcia_bigpic.php?id="+id_pic,"_BigTov","toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=auto, width=600, height=600, left=20, top=20");
}

//*** OBRAZOK ***********************************************//

function openTovBig(id_pic) {
	window.open("admin/tovar_bigpic.php?id="+id_pic,"_BigTov","toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=auto, width=600, height=600, left=20, top=20");
}

//*** SCROLLER ***********************************************//

//konfiguracia
var scrollerdelay='3000' //pauza medzi spravami 3000=3 sekundy.
var scrollerwidth='159px'
var scrollerheight='112px'
var scrollerbgcolor='#FFFFFF'
var scrollerbackground=''

//spravy
var messages=new Array()

//toto needitovat!

var ie=document.all
var dom=document.getElementById

function move(whichdiv) {
	
	if (i >= messages.length) i=0

	tdiv=eval(whichdiv)

	if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5) {
		tdiv.style.top=0+"px"
		setTimeout("move(tdiv)",scrollerdelay)
		setTimeout("move2(second2_obj)",scrollerdelay)
		return
	}

	if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1) {
		tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
		setTimeout("move(tdiv)",50)
	} else {
		tdiv.style.top=parseInt(scrollerheight)+"px"
		tdiv.innerHTML=messages[i]
		if (i>=messages.length-1)
			i=0
		else
			i++
	}
}

function move2(whichdiv) {

	if (i >= messages.length) i=0

	tdiv2=eval(whichdiv)
	
	if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5) {
		tdiv2.style.top=0+"px"
		setTimeout("move2(tdiv2)",scrollerdelay)
		setTimeout("move(first2_obj)",scrollerdelay)
		return
	}

	if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
		tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
		setTimeout("move2(second2_obj)",50)
	} else {
		tdiv2.style.top=parseInt(scrollerheight)+"px"
		tdiv2.innerHTML=messages[i]
		if (i>=messages.length-1)
			i=0
		else
			i++
	}

}

function startscroll() {
	first2_obj=ie? first2 : document.getElementById("first2")
	second2_obj=ie? second2 : document.getElementById("second2")
	move(first2_obj)
	second2_obj.style.top=scrollerheight
	second2_obj.style.visibility='visible'
}

//*** OBJEDNAT ***********************************************//

function objednat() {
	document.objform.submit();	
}


//*** ONLINE PLATBA ***//
function PayOnline(typ) {
	document.objform.online.value = typ;
	document.objform.submit();
}
//-->
