function navigateSite(pid,catid,item,offset) {
	var nav = "index.php?pid=" + pid;
	if (catid != 0) {
		nav = nav + "&catid=" + catid;
	}
	if (item != 0) {
		nav = nav + "&item=" + item;
	}
	if (offset != 0) {
		nav = nav + "&offset=" + offset;
	}
	window.location.href = nav;
}

function launch(newURL, newName, newFeatures, orgName) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}
function navigatePic(pic,item) {
	var nav = "enlarge.php?pic=" + pic;
	if (item != 0) {
		nav = nav + "&item=" + item;
	}
	window.location.href = nav;
}
function navigateCase(pic,item) {
	var nav = "enlargecase.php?pic=" + pic;
	if (item != 0) {
		nav = nav + "&item=" + item;
	}
	window.location.href = nav;
}
function enlargeThePic(item,pic) {
	var enlarge = window.open ("./enlarge.php?item="+item+"&pic="+pic,"blank","toolbar=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=0,width=715,height=515,top=100,left=50,dependent=1");
}
function enlargeTheCase(item,pic) {
	var enlargeCase = window.open ("./enlargecase.php?item="+item+"&pic="+pic,"blank","toolbar=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=0,width=715,height=515,top=100,left=50,dependent=1");
}
function reloadPic(item,pic) {
	window.loaction.replace("./enlarge.php?item="+item+"&pic="+(pic+1));
}
function reloadCase(item,pic) {
	window.loaction.replace("./enlargecase.php?item="+item+"&pic="+(pic+1));
}