//UDMv3.8.1
if (!exclude) {

var menuALIGN = "virtual";		// alignment mode
var absLEFT = 	202;		// absolute left or right position (if menu is left or right aligned)
var absTOP = 	-50; 		// absolute top position

var staticMENU = false;		// static positioning mode (win/ie5,ie6 and ns4 only)

var stretchMENU = false;	// show empty cells
var showBORDERS = false;	// show empty cell borders

var baseHREF = "/inc/js/";	// base path
var zORDER = 	1000;		// base z-order of nav structure

var mCOLOR = 	"#DDD4CA";	// main nav cell color
var rCOLOR = 	"#887865";	// main nav cell rollover color
var bSIZE = 	0;		// main nav border size
var bCOLOR = 	"#964440";	// main nav border color
var aLINK = 	"#964440";	// main nav link color
var aHOVER = 	"#DDD4CA";		// main nav link hover-color (dual purpose)
var aDEC = 		"none";		// main nav link decoration
var fFONT = 	"arial,sans-serif";	// main nav font face
var fSIZE = 	11;		// main nav font size (pixels)
var fWEIGHT = 	"bold";		// main nav font weight
var tINDENT = 	7;		// main nav text indent (if text is left or right aligned)
var vPADDING = 	4;		// main nav vertical cell padding
var vtOFFSET = 	0;		// main nav vertical text offset (+/- pixels from middle)

var keepLIT =	true;		// keep rollover color when browsing menu
var vOFFSET = 	2;		// shift the submenus vertically
var hOFFSET = 	0;		// shift the submenus horizontally

var smCOLOR = 	"#DDD4CA";	// submenu cell color
var srCOLOR = 	"#887865";	// submenu cell rollover color
var sbSIZE = 	1;		// submenu border size
var sbCOLOR = 	"#964440";	// submenu border color
var saLINK = 	"#964440";	// submenu link color
var saHOVER = 	"#ffffff";	// submenu link hover-color (dual purpose)
var saDEC = 	"none";		// submenu link decoration
var sfFONT = 	"arial,sans-serif";	// submenu font face
var sfSIZE = 	13;		// submenu font size (pixels)
var sfWEIGHT = 	"normal";	// submenu font weight
var stINDENT = 	8;		// submenu text indent (if text is left or right aligned)
var svPADDING = 1;		// submenu vertical cell padding
var svtOFFSET = 0;		// submenu vertical text offset (+/- pixels from middle)

var shSIZE =	2;		// submenu dropshadow size
var shCOLOR =	"#aDa49A";	// submenu dropshadow color
var shOPACITY = 100;		// submenu dropshadow opacity (not ie4,ns4 or opera)

var keepSubLIT = true;		// keep submenu rollover color when browsing child menu
var chvOFFSET = 0;		// shift the child menus vertically
var chhOFFSET = 3;		// shift the child menus horizontally

var openTIMER = 50;		// menu opening delay time (not ns4/op5/op6)
var openChildTIMER = 100;	// child-menu opening delay time (not ns4/op5/op6)
var closeTIMER = 200;		// menu closing delay time

var aCURSOR = "hand";		// cursor for active links (not ns4, op5 or op6)
var altDISPLAY = "";		// where to display alt text
var allowRESIZE = mu;		// allow resize/reload

var redGRID = false;		// show a red grid
var gridWIDTH = 765;		// override grid width
var gridHEIGHT = 500;		// override grid height
var documentWIDTH = 0;		// override document width

var hideSELECT = true;		// auto-hide select boxes when menus open (ie only)
var allowForSCALING = true;	// allow for text scaling in gecko browsers
var allowPRINTING = true;	// allow the navbar and menus to print (not ns4)

var arrWIDTH = 13;		//arrow width (not ns4/op5/op6)
var arrHEIGHT = 13;		//arrow height (not ns4/op5/op6)

var arrHOFFSET = -1;		//arrow horizontal offset (not ns4/op5/op6)
var arrVOFFSET = -3;		//arrow vertical offset (not ns4/op5/op6)
var arrVALIGN = "middle";	//arrow vertical align (not ns4/op5/op6)

var arrLEFT = "<";		//left arrow (not ns4/op5/op6)
var arrLEFT_ROLL = "<<";		//left rollover arrow (not ns4/op5/op6)
var arrRIGHT = ">>";		//right arrow (not ns4/op5/op6)
var arrRIGHT_ROLL = "";		//right rollover arrow (not ns4/op5/op6)


<?php


//** LINKS ***********************************************************

/*

// add main link item ("url","Link name",width,"text-alignment","_target","alt text",top position,left position,"key trigger","mCOLOR","rCOLOR","aLINK","aHOVER")

MI("/ccj/about/","About",194,"left","","",0,0,"u","","","","");
	SP(200,"left","left",0,0,"","","","","","","");
	SI("/ccj/about/#description","Description of the Center","","");
	SI("/ccj/about/#history","History of the Center","","");
	SI("/ccj/about/#staff","Staff","",""); 

MI("/ccj/events/","Events",194,"left","","",0,0,"u","","","","");
	SP(120,"left","left",0,0,"","","","","","","");
	SI("#","Upcoming Events","","");
	SI("#","Past Events","",""); 
	
MI("/ccj/programs/","Educational Programs",194,"left","","",0,0,"u","","","","");
	SP(120,"left","left",0,0,"","","","","","","");
	SI("#","Programs","","");
	SI("#","Resources","","");
	SI("#","Affiliated Institutions","",""); 
	
MI("/ccj/grants/","Grants",194,"left","","",0,0,"u","","","","");
	SP(200,"left","left",0,0,"","","","","","","");
	SI("#","Grant Info","","");
	SI("#","Educational Institutions","","");
	SI("#","Application Forms","",""); 
	
MI("/ccj/bibliography/","Bibliography",194,"left","","",0,0,"u","","","","");
	SP(200,"left","left",0,0,"","","","","","","");
	SI("#","Reading List","","");
	SI("#","Educational Institutions","","");
	SI("#","Etc","",""); 
	
MI("/ccj/articles/","Articles",194,"left","","",0,0,"u","","","","");
	SP(120,"left","left",0,0,"","","","","","","");
	SI("#","New","","");
	SI("#","Archive","","");
	
MI("/ccj/communities/","Links & Communities",194,"left","","",0,0,"u","","","","");
	SP(120,"left","left",0,0,"","","","","","","");

	SI("#","Links","","");
	SI("#","Regions","","");
	
	// define child menu properties (width,"align to edge","text-alignment",v offset,h offset,"filter","smCOLOR","srCOLOR","sbCOLOR","shCOLOR","saLINK","saHOVER")
		CP(178,"right","left",0,0,"","","","","","","");

		// add child menu link items ("url","Link name","_target","alt text")
		CI("#","New York","","");
		CI("#","etc","","");
		CI("#","etc","","");
		CI("#","etc","","");
		CI("#","etc","","");
		CI("#","etc","","");

	
	SI("#","etc","",""); 

	
MI("#","Links & Communities",194,"left","","",0,0,"u","","","","");
	SP(120,"left","left",0,0,"","","","","","","");

	SI("#","Links","","");
	SI("#","Regions","","");
	
	// define child menu properties (width,"align to edge","text-alignment",v offset,h offset,"filter","smCOLOR","srCOLOR","sbCOLOR","shCOLOR","saLINK","saHOVER")
		CP(178,"left","left",0,0,"","","","","","","");

		// add child menu link items ("url","Link name","_target","alt text")
		CI("#","New York","","");
		CI("#","etc","","");
		CI("#","etc","","");
		CI("#","etc","","");
		CI("#","etc","","");
		CI("#","etc","","");

	
	SI("#","etc","",""); 
*/
// dynamic version

$connection = mysql_connect("localhost","ybccj","ybscfcj") or die ("couldn't connect to server");
$db = mysql_select_db("culturaljudaism_org",$connection) or die ("couldn't connect to database");

$sel_p = "select
			p_id,
			p_name,
			p_link
		from
			c_ps
		where
			p_nav = '1'
		order by
			p_id asc
";

$sel_p_res = mysql_query($sel_p,$connection) or die(mysql_error()."<br>Couldn't Select Content! (Error HCS.1)");
if (!$sel_p_res) {
	echo mysql_error()."<br>Couldn't Select Content! (Error HCS.2)";
} else {
	while($row = mysql_fetch_array($sel_p_res)){
		$p_id = $row["p_id"];
		$p_name = $row["p_name"];
		$p_link = $row["p_link"];
		//echo "kkkkkkkkkkkkkkkkkk".$p_link."kkkkkkkkkkkkkkkkkkkk";
		echo "MI(\"/ccj/$p_link\",\"$p_name\",200,\"left\",\"\",\"\",0,0,\"u\",\"\",\"\",\"\",\"\");\n SP(200,\"left\",\"left\",0,0,\"\",\"\",\"\",\"\",\"\",\"\",\"\");\n";
		
		$sel_s = "select
					s_id,
					s_url,
					s_title
				from
					c_ss
				where
					s_p = '$p_id'
					and
					s_status = '1'
				order by
					s_ord asc
		";
		
		$sel_s_res = mysql_query($sel_s,$connection) or die(mysql_error()."<br>Couldn't Select Content! (Error HCS.1)");
		if (!$sel_s_res) {
			echo mysql_error()."<br>Couldn't Select Content! (Error HCS.2)";
		} else {
			while($row = mysql_fetch_array($sel_s_res)){
				$s_id = $row["s_id"];
				$s_url = $row["s_url"];
				$s_title = $row["s_title"];
				
				echo "  SI(\"/ccj/$p_link/$s_url\",\"$s_title\",\"\",\"\");\n";
				
			}
		}
		
		echo "\n";
		
		// here, we rinse and repeat for links because it may need to be different on inside pages
		/*
		if($p_id=="6"){
		
			echo "MI(\"/ccj/$p_link/\",\"$p_name\",200,\"left\",\"\",\"\",0,0,\"u\",\"\",\"\",\"\",\"\");\n SP(200,\"left\",\"left\",0,0,\"\",\"\",\"\",\"\",\"\",\"\",\"\");\n";
		
			$sel_s = "select
					s_id,
					s_url,
					s_title
				from
					c_ss
				where
					s_p = '6'
					and
					s_status = '1'
				order by
					s_ord asc
			";
			
			$sel_s_res = mysql_query($sel_s,$connection) or die(mysql_error()."<br>Couldn't Select Content! (Error HCS.1)");
			if (!$sel_s_res) {
				echo mysql_error()."<br>Couldn't Select Content! (Error HCS.2)";
			} else {
				while($row = mysql_fetch_array($sel_s_res)){
					$s_id = $row["s_id"];
					$s_url = $row["s_url"];
					$s_title = $row["s_title"];
					
					echo "  SI(\"/ccj/$p_link/#$s_url\",\"$s_title\",\"\",\"\");\n";
					
				}
			}
			
			echo "\n";
		}
		*/


	}
}


/*
	// define submenu properties (width,"align to edge","text-alignment",v offset,h offset,"filter","smCOLOR","srCOLOR","sbCOLOR","shCOLOR","saLINK","saHOVER")
	SP(184,"left","left",0,0,"","","","","","","");

	// add submenu link items ("url","Link name","_target","alt text")
	SI("http://www.brothercake.com/dropdown/index.html","Script home","","");
	SI("http://www.brothercake.com/dropdown/install.html","Download and Installation","","");
	SI("http://www.brothercake.com/dropdown/custom.php","Customisation","","");

		// define child menu properties (width,"align to edge","text-alignment",v offset,h offset,"filter","smCOLOR","srCOLOR","sbCOLOR","shCOLOR","saLINK","saHOVER")
		CP(178,"left","center",0,0,"","","","","","","");

		// add child menu link items ("url","Link name","_target","alt text")
		CI("http://www.brothercake.com/dropdown/custom.php?v=menuALIGN","Global style definitions","","");
		CI("http://www.brothercake.com/dropdown/custom.php?v=addMainItem","Menu and link definitions","","");
		CI("http://www.brothercake.com/dropdown/free_tutorial.html","Using free alignment","","");
		CI("http://www.brothercake.com/dropdown/relative.html","Relative positioning","","");
		CI("http://www.brothercake.com/dropdown/triggers.html","Virtual alignment","","");

	SI("http://www.brothercake.com/dropdown/advanced.html","Advanced customisation","","");
*/

?>
//* DO NOT EDIT THIS BIT *
}//***********************
//************************


