function verScroll(dir, spd, loop) {
	loop = true;
	direction = "up";
	speed = 10;
	scrolltimer = null;
	Twrapheight = document.getElementById('wrapper2').style.width.split('px');
	wrapheight = parseInt(Twrapheight[0]);
	
	maxheight = document.getElementById('contentLayer').offsetWidth - wrapheight;
	if (document.layers) {
	}
	else {
		if (document.getElementById) {
			Tmagassag = document.getElementById('contentLayer').style.left.split('px');
			magassag = parseInt(Tmagassag[0]);
		}
	}
	
	direction = dir;

    if( ((magassag < -maxheight) && (direction == "dn")) || ((magassag == 0) && (direction == "up")) ) {
		stopScroll();
	}
	else {
		speed = parseInt(spd); 
		var y_pos = parseInt(magassag);
		if (loop == true) {
			if (direction == "dn") {
				temp = y_pos - (speed);
				document.getElementById('contentLayer').style.left = temp + 'px';
			} else {
				if (direction == "up" && y_pos < 10) {
					temp = y_pos + (speed);
					document.getElementById('contentLayer').style.left = temp + 'px';
				} else {
					if (direction == "top") {
						document.getElementById('contentLayer').style.left = 10;
					}
				}
			}
			scrolltimer = setTimeout("verScroll(direction,speed)", 1);
		}
	}
}
function stopScroll() {
	loop = false;
	clearTimeout(scrolltimer);
}

/***********************************************************************************************/

function opensizedwin(link,w, h)  {
	popupWinex = window.open(link,'','scrollbars=yes, width=' + (w+20) + ', height=' + (h+20) + ', left=' + ((screen.width/2)-w/2) + ', top=' + ((screen.height/2)-h/2));
}

function loadPicture(galId, pictureName) {
    nagykep.location.href = "http://www.almaditruck.hu/gallery/nagykep.php?gal_id=" + galId + "&kep=" + pictureName;
//    nagykep.location.href = "http://10.0.0.205/almaditruck/hp/gallery/nagykep.php?gal_id=" + galId + "&kep=" + pictureName;
}

function ak_form_show() {
	document.getElementById('ak_form').style.display = 'block';
}

