var lastid = 1;function setlastid(id){	lastid = id;}function nextg(){	var cid = parseInt(lastid) + 1;	open_elem(cid);}function prevg(){	var cid = parseInt(lastid) - 1;	open_elem(cid);}function close_elem(id){	var tr = document.getElementById(id);	if (tr==null) { return }		tr.style.display = 'none';			var tr2 = document.getElementById('p'+id);	if (tr2==null) { return }	tr2.style.border = '0px';	//tr2.style.backgroundImage = 'none';	tr2.style.backgroundColor = '';}function open_elem(id){		var tr = document.getElementById(id);	if (tr==null) { return }	close_elem(lastid);	tr.style.display = '';	lastid = id;	setpager(id);		var tr2 = document.getElementById('p'+id);	if (tr2==null) { return }		tr2.style.border = '1px solid black';		//tr2.style.backgroundImage = 'http://services.coldline.hu/pics/dashed-h3b.png'; //mé nem megy			//tr2.style.backgroundRepeat = 'repeat';	tr2.style.backgroundColor = '#000000';}function setpager(idx){	var tre = document.getElementById('pager1');	if (tre==null) { return; }	tre.textContent = idx+'. oldal';}function getcomments(id){	putcontent("http://gallery.coldline.hu/getcomments.php?id="+id,'comments');}function putpicrsslinkcontent(id){	var tr = document.getElementById('rss_piccomment_content');	tr.innerHTML = "<a href=\"http://gallery.coldline.hu/rss.php?picid="+id+"\"><img src=\"http://services.coldline.hu/pics/rss16.png\" alt=\"rss\"> RSS a kép hozzászólásaihoz</a>";}function heightinc(id,inc){		var tr = document.getElementById(id);	tr.style.height = tr.clientHeight + inc + 'px';}function DelGalQ(galid){	if(confirm('Biztos törlöd az egész galériát?')) 		window.location.href='http://gallery.coldline.hu/editgal.php?id='+galid+'&del=1';}function ToggleGalPubRawPic(){    var spans = document.getElementsByTagName("span");	for(var a=0;a<spans.length;a++){		if(spans[a].title == 'OriginalPicToggle'){			putcontent('http://gallery.coldline.hu/pubrawpic.php?tpid='+spans[a].id+'&cmd=toggle',spans[a].id);		}	} }function ToggleGalCommentable(){    var spans = document.getElementsByTagName("span");	for(var a=0;a<spans.length;a++){		if(spans[a].title == 'IsCommentToggle'){			putcontent('http://gallery.coldline.hu/setpiccom.php?tpid='+spans[a].id+'&cmd=toggle',spans[a].id);		}	}}function SetViewType(type){	Set_Cookie('viewtype',type,0,"/","gallery.coldline.hu");	location.reload(false);}function AddUserComment(pid,commentfield,commentsfield){	var url = 'http://gallery.coldline.hu/adducomm.php?isenc=1';		var tr1 = document.getElementById(commentfield);		var pf = 'text='+tr1.value+'&pid='+pid;		putpostcontent(url,commentsfield,pf);	}function SetThumbPic(galid,picid){	var url = 'http://gallery.coldline.hu/editgal.php?id='+galid+'&thumbpic='+picid;		var xmlHttpObj=null;	try { 		xmlHttpObj=new XMLHttpRequest();	} catch (e) { 		try { 			xmlHttpObj=new ActiveXObject("Msxml2.XMLHTTP");		} catch (e){			try {				xmlHttpObj=new ActiveXObject("Microsoft.XMLHTTP");			} catch (e) {				alert("Your browser does not support AJAX!");				return false;			}		}	}	if (xmlHttpObj==null) return;		xmlHttpObj.onreadystatechange=function() {		if(xmlHttpObj.readyState == 4) {						var res = xmlHttpObj.responseText;			if(res == "ok")				alert("A kép beállítva.");			else				alert("Hiba a feldolgozás során.");		}			}	xmlHttpObj.open("GET",url,true);	xmlHttpObj.setRequestHeader('Content-Type','text/html');	xmlHttpObj.send(null);	}