//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Action Links
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	var currlink;
	function action_links(alink) {
		document.getElementById('links-message').style.display 	= 'none';
		document.getElementById('links-add').style.display 		= 'none';
		document.getElementById('links-verify').style.display 	= 'none';
		document.getElementById('links-flag').style.display 	= 'none';
		document.getElementById('message').style.fontWeight 	= 'normal';
		document.getElementById('add').style.fontWeight 		= 'normal';
		document.getElementById('verify').style.fontWeight 		= 'normal';
		document.getElementById('flag').style.fontWeight 		= 'normal';
		if (currlink != alink) {
				document.getElementById("links-" + alink).style.display	= 'block';	
				document.getElementById(alink).style.fontWeight = 'bold';
				currlink = alink;
		} else {
				document.getElementById("links-" + alink).style.display = 'none';
				document.getElementById(alink).style.fontWeight = 'normal';
				currlink = '';
		}
	}
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Action Links
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	var loclink;
	function location_links(alink) {
		document.getElementById('links-review').style.display 	= 'none';
		document.getElementById('links-add').style.display 		= 'none';
		document.getElementById('links-report').style.display 	= 'none';
		document.getElementById('review').style.fontWeight 		= 'normal';
		document.getElementById('add').style.fontWeight 		= 'normal';
		document.getElementById('report').style.fontWeight 		= 'normal';
		if (loclink != alink) {
				document.getElementById("links-" + alink).style.display	= 'block';
				document.getElementById(alink).style.fontWeight = 'bold';
				loclink = alink;
		} else {
				document.getElementById("links-" + alink).style.display = 'none';
				document.getElementById(alink).style.fontWeight = 'normal';
				loclink = '';
		}
	}
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Show Comment Box
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function showcomment() {
		if (document.getElementById('comment-form').style.display == 'none') {
			document.getElementById('comment-form').style.display = 'block';
		} else {
			document.getElementById('comment-form').style.display = 'none';
		}
	}
		
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load Picture
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadpicture(image, caption, bigpic, id) {
		document.getElementById('mainphoto').innerHTML = '<a href="#" onclick="window.open(\'/images/gallery/huge.php?pic='+bigpic+'\', \'bigpic\', \'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=yes,width=200,height=200,left=0,top=0\');"><img src="' + image + '"></a>';
		document.getElementById('maincaption').innerHTML = caption;	
		document.getElementById('id_image').value = id;
		ajaxRequest('/_includes/view-image-comments.php?id_image='+id+'&ajax=true', 'image-comments')
	}
		
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load Picture
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadLocPicture(image, id_user, username, bigpic) {
		document.getElementById('mainphoto').innerHTML = '<a href="#" onclick="window.open(\'/images/gallery/huge.php?pic='+bigpic+'\', \'bigpic\', \'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=yes,width=200,height=200,left=0,top=0\');"><img src="' + image + '"></a>';
		document.getElementById('maincaption').innerHTML = 'Uploaded By: <a href="/profiles/' + id_user + '/">' + username + '</a>';
	}
		
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load Picture
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	var viewed = new Array();
	function loadGallery(image, id, idimage, user, score, total, bigpic) {
		var found = false;
		for (i=0;i<viewed.length;i++) if (viewed[i] = idimage) found = true;		
		if (found == false) ajaxRequest('/ajax/gallery.php?action=view&id=' + escape(idimage), '');
		if (found == false) viewed[viewed.length] = idimage;
		document.getElementById('mainphoto').innerHTML = '<a href="#" onclick="window.open(\'/images/gallery/huge.php?pic='+bigpic+'\', \'bigpic\', \'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=yes,width=200,height=200,left=0,top=0\');"><img src="' + image + '"></a>';
		var x = '';
		var x = x + '<ul id="unit_ul1a" class="unit-rating" style="width:150px;">';
		var x = x + '<li><a href="#" onclick="galleryrate(1,'+idimage+');" title="1 out of 5" class="r1-unit rater" rel="nofollow">1</a></li>';
		var x = x + '<li><a href="#" onclick="galleryrate(2,'+idimage+');" title="2 out of 5" class="r2-unit rater" rel="nofollow">2</a></li>';
		var x = x + '<li><a href="#" onclick="galleryrate(3,'+idimage+');" title="3 out of 5" class="r3-unit rater" rel="nofollow">3</a></li>';
		var x = x + '<li><a href="#" onclick="galleryrate(4,'+idimage+');" title="4 out of 5" class="r4-unit rater" rel="nofollow">4</a></li>';
		var x = x + '<li><a href="#" onclick="galleryrate(5,'+idimage+');" title="5 out of 5" class="r5-unit rater" rel="nofollow">5</a></li>';
		var x = x + '</ul>';
		var x = x + '<p>Rating: <strong> '+score+'</strong>/5 ('+total+' votes cast)  </p>';		
		document.getElementById('galleryrate').innerHTML = x;
		document.getElementById('mainusername').innerHTML = 'Uploaded By: <a href="/profiles/' + id + '/">' + user + '</a>';		
	}
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Gallery Rate
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function galleryrate(rating, id) {
		ajaxRequest('/ajax/gallery.php?action=rate&id=' + escape(id) + '&rating=' + escape(rating), '');
		document.getElementById('galleryrate').innerHTML = 'Rating Submitted. Thanks!';
	}
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Show Hide
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function showHide(elementShow, elementHide) {
		document.getElementById(elementShow).style.display 	= 'block';
		document.getElementById(elementHide).style.display 	= 'none';
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Void Function
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function voidFunction(){
		var a = 1;	
	}
