function toggleProcedure(currProcedure, image) {
	var version = navigator.appVersion;
	if (version.indexOf("Windows") != -1) {
		thisProcedure = document.getElementById("procedure"+currProcedure).style;
		thisExpander = document.getElementById("expander"+currProcedure);
		if (thisProcedure.display == "block") {
			thisProcedure.display = "none";
			var icon = (image=='folder') ? 's_folder.gif' : 'expand.gif';
			thisExpander.src = "media/"+icon;
		}
		else {
			thisProcedure.display = "block";
			var icon = (image=='folder') ? 's_folderopen.gif' : 'collapse.gif';
			thisExpander.src = "media/"+icon;
		}
	}
	return false
}

function thumb1(title, pic, bg, caption)
{
  var width="720", height="600";
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>Najjadeh :: Photo Gallery :: '+title+'</title></head>';
  var body = '<body bgcolor="#C6D2C1" background="media/bg'+bg+'.gif"><center><img src="'+pic+'" border=1><br><p>'+caption+'<form><input type="button" value="   &#1573;&#1594;&#1604;&#1575;&#1602;   " onClick="self.close()"></form></center></body>';
  msgWindow.document.write(head + body);
  return false;
}

function thumb(cat_id, pic_id)
{
  var width="720", height="740";
  var left = (screen.width/2) - width/2;
  var top = 10;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("pop_pic.php?CatID="+cat_id+"&PhotoID="+pic_id,"msgWindow", styleStr);
  return false;
}