
<!--

/** open popup and show pic **/
function picPop(mylink) {
	if(!mylink) return false;
	if(!window.focus) return true;
	var newWin = window.open('picPop.php?id=' + mylink, 'Blog_Image','width=500,height=600,location=no,resizable=yes,scrollbars=yes,toolbar=no');
	newWin.focus();
	return true;
}

/** shows images on sale pages **/
function imgPop(mylink , windowname, x, y, scr) {
	if(!window.focus) return true;
	var href;
	href=mylink;
	var newWin;
	newWin = window.open(href, windowname, 'width=' + x +',height=' + y + ',scrollbars=' + scr + '');
	newWin.focus();
	return false;
}
	
	function blogPop(mylink) {
		if(!mylink) return false;
		if(!window.focus) return true;
		var newWin = window.open('blogImage.php?id=' + mylink, 'Blog_Image','width=500,height=600,location=no,resizable=yes,scrollbars=yes,toolbar=no');
		newWin.focus();
		return true;
	}
	
/**  script opens window to allow item image upload **/
function imageUploaderPop(itemNum) {
	if (! window.focus) return true;
	window.open("admin_imageUploader.php?itemNum=" + itemNum , "Image Upload", 'width=500,height=320,location=no,status=no,resizable=yes,scrollbars=yes');
	return false;
}

/* AUTO-add bookmark to browser */
function addBookmark(siteAddress,siteName)	{
	if(window.sidebar) {
		window.sidebar.addPanel(siteName, siteAddress,"");
	}	else if(document.all)	{
			window.external.AddFavorite(siteAddress,siteName);
	}	else if(window.opera && window.print)	{
			return true;
	}
	return false;
}

/** show the passed object if it exists **/
function showObj(obj) {
	if(document.getElementById(obj)) {
		document.getElementById(obj).style.display='';
		return true;
	}
	return false;
}

/** hide the passed object if it exists **/
function hideObj(obj) {
	if(document.getElementById(obj)) {
		document.getElementById(obj).style.display='none';
		return true;
	}
	return false;
}

function showmenu(elmnt) {
	document.getElementById(elmnt).style.visibility="visible";
	/*document.getElementById(elmnt).style.display='';*/
}

function hidemenu(elmnt) {
	document.getElementById(elmnt).style.visibility="hidden";
	/*document.getElementById(elmnt).style.display='none';*/
}

	function ajaxFunction() {
		var xmlHttp;
		try { xmlHttp=new XMLHttpRequest(); }  // Firefox, Opera 8.0+, Safari
		catch (e) {
			try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } // Internet Explorer
			catch (e) {
				try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
				catch (e) {
					alert("Either your browser does not support AJAX or you have javascript disabled.");
					return false;
				}
			}
		}
		return xmlHttp;
	}

/**   CLEAR THE USER OBJECT  **/
function clearUserObject() {
	var ajx = ajaxFunction();
	ajx.onreadystatechange=function() {
		if(ajx.readyState==4) {
			if(ajx.responseText=='OK') {
				//alert('User has been cleared.');
				if(document.getElementById('userObjectCheck')) {
					document.getElementById('userObjectCheck').innerHTML='';
					document.getElementById('userObjectCheck').style.display='none';
				}
			}
		}
	}
	ajx.open("GET", "includes/ajx_clearUserObj.php", true);
	ajx.send(null);
}

-->