		var limit81 = 20;
		var page_no81;
		var imgArrSD81 = new Array('<DDD><DDD>"סידן: מרכיב חשוב באורח חיים בריא"<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_health.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>הסידן שבחלב<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_in_milk.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>השפעה חיובית על סידן מהמזון על משקל הגוף, כמות השומן בגוף ורמות הכולסטרול בדם<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_fat_weight.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>ויסות רקמת שומן והשמנה – באמצעות סידן מהמזון<D>http://www.milk.org.il/info/health/dairy/calcium/cal/fat_tissue_regulation.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>זמינות הסידן במשקה סויה<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_availability_soy.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>חלב ודיאטה<D>http://www.milk.org.il/info/health/dairy/calcium/cal/main.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>יתרונות של סידן מחלב ומוצריו<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca-new_001.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>סידן ומוצרי חלב בכל גיל<D>http://www.milk.org.il/info/health/dairy/calcium/cal/cal-002.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>ספיגת סידן - עובדות ומיתוסים, מאת מיכל גילאון - דיאטנית קלינית<D>http://www.milk.org.il/info/health/dairy/calcium/cal/sidan_p12.pdf<D><D>http://www.milk.org.il/main/icons/pdf.gif<DDD><D><D><D>', '<DDD><DDD>צריכת ויטמין D וסידן מסייעים במניעת סרטן השד <D>http://www.milk.org.il/info/health/dairy/calcium/cal/cal-001.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>', '<DDD><DDD>שאלות ותשובות עבור הורים בנושא סידן<D>http://www.milk.org.il/info/health/dairy/calcium/cal/parents_questions.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D>');
		var imgArrClickAdminSD81 = new Array('<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/main10.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D>ClickAdmin<D><D>title= <DDD>date=<DDD>author= - arad, http://www.milk.org.il<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/1.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/2.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/3.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/calcium-foods.jpg<D><D>http://www.milk.org.il/main/icons/jpg.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=ליאת - liat<DDD>writer=<DDD>description=מזונות עשירים בסידן<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>imageLink=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/milk.jpg<D><D>http://www.milk.org.il/main/icons/jpg.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=ליאת - liat<DDD>writer=<DDD>description=<DDD>keywords=חלב - נכס תזונתי<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>imageLink=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/kid_drinking_milk.jpg<D><D>http://www.milk.org.il/main/icons/jpg.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=ליאת - liat<DDD>writer=<DDD>description=חלב חיוני להתפתחות תקינה של העצמות בגיל הילדות וההתבגרות<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>imageLink=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/dairy_products_1.jpg<D><D>http://www.milk.org.il/main/icons/jpg.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=ליאת - liat<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>imageLink=','<DDD><DDD><D>http://www.milk.org.il/info/health/dairy/calcium/cal/dairy_products_2.jpg<D><D>http://www.milk.org.il/main/icons/jpg.gif<DDD><D><D>ClickAdmin<D><D>title=<DDD>date=<DDD>author=ליאת - liat<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=0<DDD>noscandir=<DDD>imageLink=','<DDD><DDD>"סידן: מרכיב חשוב באורח חיים בריא"<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_health.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=&quot;סידן: מרכיב חשוב באורח חיים בריא&quot;<DDD>date=<DDD>author=<DDD>writer=<DDD>description=סידן הוא המינרל הנפוץ ביותר בגוף. רובו נמצא בעצמות והוא זה שמעניק לעצמות את חוזקן.  הגוף אינו מייצר סידן ולכן אנחנו חייבים לקבל אותו באופן יומיומי מהמזון שלנו. אנשים רבים סבורים שהם צורכים די סידן אך בפועל אין זה כך.<DDD>keywords=<DDD>previewImage=<DDD>nonew=1<DDD>nosearch=1<DDD>noscandir=<DDD>categories_n=סידן<DDD>categories=ca','<DDD><DDD>הסידן שבחלב<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_in_milk.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=הסידן שבחלב<DDD>date=<DDD>author=<DDD>writer=<DDD>description=חלב הוא מקור מצוין לסידן הנדרש להתפתחות עצמות ושיניים חזקות. מעט מאוד מזונות אחרים, מספקים כמויות כל – כך משמעותיות של סידן.<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=תזונת תינוקות וילדים, סידן<DDD>categories=nut_chd,ca','<DDD><DDD>השפעה חיובית על סידן מהמזון על משקל הגוף, כמות השומן בגוף ורמות הכולסטרול בדם<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_fat_weight.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=השפעה חיובית על סידן מהמזון על משקל הגוף, כמות השומן בגוף ורמות הכולסטרול בדם<DDD>date=<DDD>author=<DDD>writer=<DDD>description=מחקרים שנערכו בבני אדם הראו כי צריכה גבוהה של סידן נמצאת ביחס הפוך למחלות הקשורות להשמנה כמו יתר-לחץ-דם, סוכרת וחוסר יכולת של הגוף לנצל את האינסולין שלו. כלומר, ככל שצריכת הסידן גבוהה יותר כך הסיכון למחלות אלה – קטן.  <DDD>keywords=<DDD>previewImage=<DDD>nonew=1<DDD>nosearch=1<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>ויסות רקמת שומן והשמנה – באמצעות סידן מהמזון<D>http://www.milk.org.il/info/health/dairy/calcium/cal/fat_tissue_regulation.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=ויסות רקמת שומן והשמנה – באמצעות סידן מהמזון<DDD>date=<DDD>author=<DDD>writer=<DDD>description=דיאטה עשירה בסידן מקטינה הצטברות שומן בתאי רקמת השומן ועלייה במשקל, ובתקופות של הגבלת אנרגיה דיאטה עשירה בסידן מגבירה פרוק שומן ומשמרת את תהליך ייצור החום בגוף ומאיצה בכך את תהליך הירידה במשקל, באופן ניכר.<DDD>keywords=<DDD>previewImage=<DDD>nonew=1<DDD>nosearch=1<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>זמינות הסידן במשקה סויה<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca_availability_soy.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=זמינות הסידן במשקה סויה<DDD>date=5/2000<DDD>author=<DDD>writer=<DDD>description=משקה סויה מוצע כאחד הפתרונות לאנשים שאינם צורכים מוצרי חלב. מחקר זה בדק את זמינות הסידן  (כלומר את יכולת הגוף לנצל אותו ) במשקה סויה מועשר בסידן.<DDD>keywords=<DDD>previewImage=<DDD>nonew=1<DDD>nosearch=1<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>חלב ודיאטה<D>http://www.milk.org.il/info/health/dairy/calcium/cal/main.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=חלב ודיאטה<DDD>date=<DDD>author=<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>יתרונות של סידן מחלב ומוצריו<D>http://www.milk.org.il/info/health/dairy/calcium/cal/ca-new_001.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=יתרונות של סידן מחלב ומוצריו<DDD>date=<DDD>author=ערד חכים- arad, http://www.milk.org.il<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>סידן ומוצרי חלב בכל גיל<D>http://www.milk.org.il/info/health/dairy/calcium/cal/cal-002.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=סידן ומוצרי חלב בכל גיל<DDD>date=<DDD>author=ליאת - liat, http://www.milk.org.il<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>ספיגת סידן - עובדות ומיתוסים, מאת מיכל גילאון - דיאטנית קלינית<D>http://www.milk.org.il/info/health/dairy/calcium/cal/sidan_p12.pdf<D><D>http://www.milk.org.il/main/icons/pdf.gif<DDD><D><D><D><D>title=ספיגת סידן - עובדות ומיתוסים, מאת מיכל גילאון - דיאטנית קלינית<DDD>date=<DDD>author=<DDD>writer=<DDD>description= <DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>imageLink=','<DDD><DDD>צריכת ויטמין D וסידן מסייעים במניעת סרטן השד <D>http://www.milk.org.il/info/health/dairy/calcium/cal/cal-001.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=צריכת ויטמין D וסידן מסייעים במניעת סרטן השד <DDD>date=<DDD>author=ליאת - liat, http://www.milk.org.il<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=','<DDD><DDD>שאלות ותשובות עבור הורים בנושא סידן<D>http://www.milk.org.il/info/health/dairy/calcium/cal/parents_questions.htm<D><D>http://www.milk.org.il/main/icons/htm.gif<DDD><D><D><D><D>title=שאלות ותשובות עבור הורים בנושא סידן<DDD>date=1/2004<DDD>author=<DDD>writer=<DDD>description=<DDD>keywords=<DDD>previewImage=<DDD>nonew=<DDD>nosearch=<DDD>noscandir=<DDD>categories_n=<DDD>categories=');

	//------------- click Admin -----------------
	editAlow = '', alowToEdit = 0;
	clickadmin='';
	if (document.cookie.length > 0) { // if there are any cookies
		var search =  "clickadmin&";
		var search1 = "clickadmin=";
		offset = document.cookie.indexOf(search);
		if (offset == -1) offset = document.cookie.indexOf(search1);
		if (offset != -1) { // if cookie exists 
			offset += search.length ;  // set index of beginning of value
			end = document.cookie.indexOf("&", offset); // set index of end of cookie value
			if (end == -1) 
				end = document.cookie.length;
			clickadmin= unescape(document.cookie.substring(offset, end));
			if (clickadmin != "" && clickadmin != '0' && clickadmin.search(/^0/) == -1 )
				alowToEdit = 1;
		}
	}
	
	function incrementPage81(){
		page_no81++;
		document.pageInfo81.pageNo81.value=page_no81;
	}
	
	function decrementPage81(){
		page_no81--;
		document.pageInfo81.pageNo81.value=page_no81;
	}
	
	function initPage81(){
		if (alowToEdit == 1) imgArrSD81 = imgArrClickAdminSD81;
		page_no81 = document.pageInfo81.pageNo81.value;
		var limit81 = 20;
		start_page81 = limit81*page_no81;
		end_page81 = limit81*page_no81+limit81;
		if(imgArrSD81.length>0){
			if(imgArrSD81.length>=limit81)
				printPreview81(start_page81,end_page81);
			else
				printPreview81(0,imgArrSD81.length);
		}
		else if(imgArrSD81.length==0 && 1 == 1){
			printPreview81(0,0);
		}
	}
	
	var cookie_in = '', username='', password='';
	if (document.cookie.length > 0) { // if there are any cookies
		var search =  "username&";
		var search1 = "username=";
		offset = document.cookie.indexOf(search);
		if (offset == -1) offset = document.cookie.indexOf(search1);
		if (offset != -1) { // if cookie exists 
			offset += search.length ;  // set index of beginning of value
			end = document.cookie.indexOf("&", offset); // set index of end of cookie value
			if (end == -1) end = document.cookie.indexOf(";", offset); // set index of end of cookie value
			if (end == -1) 
				end = document.cookie.length;
			username = unescape(document.cookie.substring(offset, end));
		}
		var search =  "password&";
		var search1 = "password=";
		offset = document.cookie.indexOf(search);
		if (offset == -1) offset = document.cookie.indexOf(search1);
		if (offset != -1) { // if cookie exists 
			offset += search.length ;  // set index of beginning of value
			end = document.cookie.indexOf("&", offset); // set index of end of cookie value
			if (end == -1) 
				end = document.cookie.length;
			password = unescape(document.cookie.substring(offset, end));
		}
	}
	cookie_in = 'username='+username+'&password='+password;

		var linkButtons = new Object();
	linkButtons.htm_webaxy='/htm-webaxy';
	linkButtons.cgi_webaxy='/cgi-webaxy';
		linkButtons.lang = "he";
		linkButtons.name = "he";
		linkButtons.hidden = "lang=he&ID=645657_milk";
		linkButtons.scandir = "סורק ספריות";
		linkButtons.scanpic = "סורק תמונות";
		linkButtons.file = "קובץ מאתר";
		linkButtons.pic = "תמונה מאתר";
		linkButtons.uploadFileAndGetLink = "שלח קובץ וקשר";
		linkButtons.createPageAndGetLink = "צור דף וקשר";
		linkButtons.curdir = "";
		linkButtons.rootdir = "";
		

	linkButtons.hidden = linkButtons.hidden + '&username='+username+'&password='+password;	
	var myWidth, myHeight, myScroll;
function getSize() {
		// Window Size
		if (self.innerHeight) { // Everyone but IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
			myScroll = window.pageYOffset;
		} else if (document.documentElement && document.documentElement.clientHeight) { // IE6 Strict
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
			myScroll = document.documentElement.scrollTop;
		} else if (document.body) { // Other IE, such as IE7
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
			myScroll = document.body.scrollTop;
		}
		// Page size w/offscreen areas
	
		if (window.innerHeight && window.scrollMaxY) {	
			myScrollWidth = document.body.scrollWidth;
			myScrollHeight = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac
			myScrollWidth = document.body.scrollWidth;
			myScrollHeight = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			myScrollWidth = document.body.offsetWidth;
			myScrollHeight = document.body.offsetHeight;
		}
	}
	function changeArrow(id) {
		
		if (!document.getElementById(id).getAttribute('open')) {
			document.getElementById(id).style.backgroundImage = "url(/htm-webaxy/icons/arrow-up.gif)";	
			document.getElementById(id).setAttribute('open', 1);
		}
		else {
			document.getElementById(id).style.backgroundImage = "url(/htm-webaxy/icons/arrow-down.gif)";
			document.getElementById(id).setAttribute('open', 0);
		}
		
}

function openAll_SD81(index) {
		
		var val = document.getElementById('scandirCADiv81').getAttribute('open');
		
		if (val == 0) {
			for (var i=1;i<=index;i++) {
					animatedcollapse.show('file'+i);
			}
			document.getElementById('scandirCADiv81').setAttribute('open',1);
			document.getElementById('scandirCADiv81-openall').title = 'סגור הכל';	
			document.getElementById('scandirCADiv81-openall').src = '/htm-webaxy/icons/arrow-up.gif';
			for (var i=1;i<=index;i++) {
				document.getElementById('file_td'+i).style.backgroundImage="url(/htm-webaxy/icons/arrow-up.gif)";
			}
		}
		else {
			for (var i=1;i<=index;i++) {
					animatedcollapse.hide('file'+i);
			}
			document.getElementById('scandirCADiv81').setAttribute('open',0);
			document.getElementById('scandirCADiv81-openall').title = 'פתח הכל';	
			document.getElementById('scandirCADiv81-openall').src = '/htm-webaxy/icons/arrow-down.gif';
			for (var i=1;i<=index;i++) {
				document.getElementById('file_td'+i).style.backgroundImage="url(/htm-webaxy/icons/arrow-down.gif)";
			}
		}
}

function done_update_SD81() {

		if (!document.getElementById('update_done').value) {
				window.setTimeout("done_update_SD81()",250);
				return;
		}
		var rand_no = Math.random()*4567320356435;
		if (window.location.href.search(/sid=/) == -1) {
			if (window.location.href.search(/\?/) == -1) {
				window.location.href = window.location.href+'?sid=s'+parseInt(rand_no)+'e';
			}
			else {
				window.location.href = window.location.href+'&sid=s'+parseInt(rand_no)+'e';
			}
		}
		else {
			window.location.href = window.location.href.replace(/sid=s.+e/,'sid=s'+parseInt(rand_no)+'e');
		}

}

function cancel_update_SD81() {
		
		var hide = document.getElementById('hideAllDiv');
		var d = document.getElementById('scandirCADiv81');
		hide.style.display = 'none';
		d.style.display = 'none';
		hide.style.zIndex = 0;
		if (d.firstChild) d.removeChild(d.firstChild);
		
}

function update_SD81(done) {
	
	document.getElementById('update_done').value = '';
	document.getElementById('files_update').submit();	
	if (done) done_update_SD81();
		
}
	
	function selectCat(type,form,field,field_n) {
		
		var url = "http://www.milk.org.il/cgi-webaxy/admin/cat2-admin.pl?ID=645657_milk&lang=he&act=select&type="+type+"&form="+form+"&field="+field+"&field_n="+field_n;
		var prop = "height=400,width=500,resizable=yes,scrollbars=yes";
		
		open(url,"selectcat",prop);
	}
	
	function check_update_date(val, i) {
		
		if (val) {
				document.getElementById('sd_fileUpdateCB'+i).style.display = 'none';
				document.getElementById('file_updateDate'+i).checked = false;
		}
		else {
				document.getElementById('sd_fileUpdateCB'+i).style.display = 'inline';
		}
		
	}
	
	function openMP(page) {
		
	        	wEdit = open("http://www.milk.org.il/cgi-webaxy/magicpage/magicpage.pl?ID=645657_milk&lang=he&username="+username+"&password="+password+"&count="+page+"&frames=yes", "wEdit", "location=0, toolbar=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
	        	
	}
	
	function clickEditSD81(str, index){
		//wEdit = open("http://www.milk.org.il/cgi-webaxy/page_edit_login.pl?lang=he&ID=645657_milk&"+cookie_in+"&curdir=info/health/dairy/calcium/cal&count="+str+"&act=edit", "wEdit", "location=0, toolbar=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=1");
		getSize();
		var objHead = document.getElementsByTagName('head')[0];
		var objCSS = objHead.appendChild(document.createElement('link'));
		objCSS.rel = 'stylesheet';
		objCSS.href = '/htm-webaxy/skins/standard/standard_new.css';
		objCSS.type = 'text/css';		

		hide = document.getElementById('hideAllDiv');
		hide.style.height = (myHeight+myScrollHeight)+'px';
		hide.style.display = 'block';
		hide.style.width = myWidth+'px';
		hide.style.zIndex = 1111;
		if (navigator.appVersion.indexOf("MSIE")!=-1) {
			document.getElementById('hideAllDiv').style.filter = "alpha(opacity=85)";
		}
		else {
			document.getElementById('hideAllDiv').style.opacity = 0.85;
		}
		var addDiv = '';
		var d = document.getElementById('scandirCADiv81');
		var form = document.createElement("form");
		form.name = "files_update";
		form.id = "files_update";
		form.setAttribute("action", "http://www.milk.org.il/cgi-webaxy/scandiradmin.pl");
		form.setAttribute("method", "post");
		form.setAttribute("target", "hidden_iframe");
		form.setAttribute("enctype", "multipart/form-data"); 
		
		d.style.display = 'block';
		scroll((myWidth-d.style.width.replace(/px/,''))/2,0);
		d.style.left = ((myWidth-d.style.width.replace(/px/,''))/2)+'px';
		var tb = document.createElement('table');
		tb.width = '770px';
		tb.className = 'list-row';
		var row, cell;
		row = tb.insertRow(-1);
		cell = row.insertCell(-1);
		cell.align = 'right'
		cell.setAttribute('colSpan', 5);
		cell.innerHTML = '<a href="javascript:void(0);" onClick="cancel_update_SD81();"><img border="0" src="/htm-webaxy/skins/standard/close.gif" title="סגור" id="scandir-close"></a>';
		
		row = tb.insertRow(-1);
		cell = row.insertCell(-1);
		cell.align = "center";
		cell.setAttribute('colSpan', 5);
		if (index < 0) cell.innerHTML = '<a href="javascript:void(0);" onClick="openAll_SD81('+imgArrSD81.length+');"><img border="0" src="/htm-webaxy/icons/arrow-down.gif" title="פתח הכל" id="scandirCADiv81-openall"></a>';
		else cell.innerHTML = '';
		cell.innerHTML += '<input type="hidden" name="ID" value="645657_milk">';
		cell.innerHTML += '<input type="hidden" name="lang" value="he">';
		cell.innerHTML += '<input type="hidden" name="username" value="'+username+'">';
		cell.innerHTML += '<input type="hidden" name="action" value="update_details">';
		cell.innerHTML += '<input type="hidden" name="password" value="'+password+'">';
		if (index < 0)
			cell.innerHTML += '<input type="hidden" name="num_of_items" value="'+imgArrSD81.length+'">';
		else
			cell.innerHTML += '<input type="hidden" name="num_of_items" value="1">';
		cell.innerHTML += '<input type="hidden" name="scandirID" value="81">';
		cell.innerHTML += '<input type="hidden" name="update_done" id="update_done" value="">';
		var new_src = 'http://www.milk.org.il/cgi-webaxy/scandiradmin.pl?ID=645657_milk&lang=he&username='+username+'&password='+password+'&action=update_details&num_of_items'+imgArrSD81.length+'&scandirID=81';
		var curIndex = 0;
		var sdID = '81';
		for (i = 1 ; i <= imgArrSD81.length ; i++) {
			if (index >= 0 && i != index+1) continue;
			var j = i;
			var fileData = eval('imgArrSD'+sdID+'[i-1]');
			if (index >=0 && i == index +1) i=1;
			var imgData = fileData.split("<D>")[3];
			var img = imgData.split("<DDD>");
			var dscData = fileData.split("<D>")[7];
			var data = dscData.split("<DDD>");
			var file = fileData.split("<D>")[1];
			file = file.replace(/http\:\/\/www\.milk\.org\.il/,'');
			if (str.indexOf(file) == (str.length - file.length)) curIndex = i;
			var fileData = new Object();
			fileData.title = '';
			fileData.date = '';
			fileData.writer = '';
			fileData.date = '';
			fileData.description = '';
			fileData.keywords = '';
			fileData.nonew = '';
			fileData.nosearch = '';
			fileData.noscandir = '';
			fileData.date = '';
			fileData.previewImage = '';
			fileData.imageLink = '';
			for (var p=0; p<data.length;p++) {
				field = (data[p].split("="))[0];
				value = (data[p].split("="))[1];
				if (field == 'photog') field = 'writer';
				if ((field == 'nonew' || field == 'nosearch' || field == 'noscandir') && value == '1') value = 'checked';
				fileData[field] = value;
			}
			
			field = 'title';
			var file2 = file;
			if ('info\/health\/dairy\/calcium\/cal' != '-1#') file = file.replace(/info\/health\/dairy\/calcium\/cal/,'');
			file = file.replace(/^\//,'');
			file = file.replace(/^\//,'');
			var file1 = file;
			if (file1.search(/scandir3.pl/) >= 0) continue;
			
			row = tb.insertRow(-1);
			cell = row.insertCell(-1);
			cell.setAttribute('title', ''+file2);
			cell.innerHTML = '<img border="0" src="'+img[0]+'">';
			cell.dir = 'ltr';
			cell = row.insertCell(-1);
			cell.setAttribute('title', '/'+file2);
			if (file.length > 25) {
					file1 = "..."+file.substring(file.length-22);
			}
			cell.innerHTML = '<input type="hidden" name="file'+i+'" value="/'+file2+'"><b>'+file1+'</b>';
			cell.dir = 'ltr';
			cell = row.insertCell(-1);
			cell.innerHTML = 'כותרת';
			cell = row.insertCell(-1);
			cell.setAttribute('index', i);
			cell.innerHTML += '<input type="text" name="file_title'+i+'" value="'+fileData.title+'" style="width:200px;">&nbsp;';
			cell.innerHTML += 'תאריך&nbsp;<input type="text" name="file_date'+i+'" style="direction:ltr;width:70px;" value="'+fileData.date+'" onChange="check_update_date(this.value, '+eval(i)+');">&nbsp;';
			cell.innerHTML += '<img src="/htm-webaxy/select/cal.gif" style="border-width:0;cursor:pointer;" onclick="window.frames[\'date_ifr\'].clickDate(0,event.clientY,document.getElementById(\'files_update\').file_date'+i+',\'תאריך\');" title="">&nbsp;';
			cell.innerHTML += '&nbsp;&nbsp;'+
											 'מחבר&nbsp;'+
											 '<input type="text" name="file_writer'+i+'" style="width:100px;" value="'+fileData.writer+'">'+
											 '<input type="hidden" name="file_author'+i+'" value="'+fileData.author+'">';
			
			cell = row.insertCell(-1);						
			cell.style.width = '20px';
			cell.style.cursor = 'pointer';
			cell.style.backgroundRepeat = 'no-repeat';
			cell.style.backgroundPosition = '1% 0pt';
			if (index >=0 && j == index+1) cell.style.backgroundImage = 'url(/htm-webaxy/icons/arrow-up.gif)';
			else cell.style.backgroundImage = 'url(/htm-webaxy/icons/arrow-down.gif)';
			cell.open = 0;
			cell.id = 'file_td'+i;
			cell.onclick = function () { animatedcollapse.toggle('file'+this.index); changeArrow('file_td'+this.index); };
			cell.index = i;
			
			row = tb.insertRow(-1);
			mainCell = row.insertCell(-1);
			mainCell.setAttribute('colSpan', 5);
			
			var animateDiv = document.createElement('div');
			animateDiv.id = 'file'+i;
			if (index >=0 && j == index+1) animateDiv.style.display = 'block';
			else animateDiv.style.display = 'none';
			var animateTB = document.createElement('table');
			
			if (file.search(/\..?htm.?$/) != -1 && !fileData.nodsc) {
				row = animateTB.insertRow(-1);
				cell = row.insertCell(-1);
				cell.innerHTML = 'קטגוריות';
				cell = row.insertCell(-1);
				cell.innerHTML = '<input type="text" name="file_categories_n'+i+'" style="width:400px;" value="'+fileData.categories_n+'">'+
												 '<a style="text-decoration: none; color: rgb(0, 0, 170);" onclick="selectCat(\'checkbox\',\'files_update\',\'file_categories'+i+'\',\'file_categories_n'+i+'\');return false;" href="javascript:void(0)">בחירה מרשימה</a>'+
	      								 '<input type="hidden" value="'+fileData.categories+'" name="file_categories'+i+'"/>';
      }
      								 
			row = animateTB.insertRow(-1);
			cell = row.insertCell(-1);
			cell.innerHTML = 'תיאור';
			cell = row.insertCell(-1);
			fileData.description = fileData.description.replace(/&lt;br&gt;/g,"\n");
			cell.innerHTML = '<textarea rows="3" cols="40" name="file_description'+i+'" style="width:400px;">'+fileData.description+'</textarea>';
			//cell.innerHTML = '<input type="text" name="file_description'+i+'" style="width:400px;" value="'+fileData.description+'">';
			
			row = animateTB.insertRow(-1);
			cell = row.insertCell(-1);
			cell.innerHTML = 'מילות מפתח';
			cell = row.insertCell(-1);
			cell.innerHTML = '<input type="text" name="file_keywords'+i+'" value="'+fileData.keywords+'" style="width:400px;"></td>';
			
			row = animateTB.insertRow(-1);
			cell = row.insertCell(-1);
			cell.innerHTML = 'מאפיינים';
			cell = row.insertCell(-1);
			cell.innerHTML = '<input type="checkbox" name="file_nonew'+i+'" value="1" '+fileData.nonew+'>הסתר מחידושים&nbsp;'+
											 '<input type="checkbox" name="file_nosearch'+i+'" value="1" '+fileData.nosearch+'>הסתר מחיפוש&nbsp;'+
											 '<input type="checkbox" name="file_noscandir'+i+'" value="1" '+fileData.noscandir+'>הסתר מסורק ספריות &nbsp;';
			
			row = animateTB.insertRow(-1);
			cell = row.insertCell(-1);
			cell.innerHTML = 'תמונה ייצוגית';
			cell = row.insertCell(-1);
			cell.innerHTML = '<input type="text" id="file_previewImage'+i+'" name="file_previewImage'+i+'" value="'+fileData.previewImage+'" style="width:350px;direction:ltr;">'+
											 '<div class="getLink" fieldID="file_previewImage'+i+'" btnType="uploadFile;selectPic"></div>';
						
			if (file.search(/\..?htm.?$/) == -1) {
				row = animateTB.insertRow(-1);
				cell = row.insertCell(-1);
				cell.innerHTML = 'קישור';
				cell = row.insertCell(-1);
				cell.innerHTML = '<input type="text" id="file_imageLink'+i+'" name="file_imageLink'+i+'" value="'+fileData.imageLink+'" style="width:350px;direction:ltr;">'+
												 '<div class="getLink" fieldID="file_imageLink'+i+'"></div>';
			}
			
			if ((file.search(/\..?htm.?$/) == -1 || fileData.nodsc) && ('info/health/dairy/calcium/cal/'+file).search(/scanpic\/scanpic\d+\.htm/) == -1 && ('info/health/dairy/calcium/cal/'+file).search(/Albms\/albm\d+\.htm/) == -1) {
				row = animateTB.insertRow(-1);
				cell = row.insertCell(-1);
				cell.innerHTML = 'קובץ';
				cell = row.insertCell(-1);
				cell.innerHTML = '<input type="file" id="file_file'+i+'" name="file_file'+i+'" size="42">';
				var divStyle = '';
				if (fileData.date) divStyle = 'style="display: none;"';
				else divStyle = 'style="display: inline;"';
				cell.innerHTML += '&nbsp;<div '+divStyle+' id="sd_fileUpdateCB'+i+'">עדכן תאריך <input type="checkbox" value="1" id="file_updateDate'+i+'" name="file_updateDate'+i+'"></div>';
			}
			else if (!fileData.nodsc){
				/*if (index >= 0 && j == index+1) {
					wEdit = open("/cgi-webaxy/magicpage/magicpage.pl?ID=645657_milk&lang=he&username="+username+"&password="+password+"&count="+str+"&frames=yes", "wEdit", "location=0, toolbar=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
					cancel_update_SD81();
					return;
				}*/
				row = animateTB.insertRow(-1);
				cell = row.insertCell(-1);
				//cell = row.insertCell(-1);
				cell.setAttribute('colSpan', 2);
				var divStyle = '';
				if (fileData.date) divStyle = 'style="display: none;"';
				else divStyle = 'style="display: inline;"';
				cell.innerHTML = '<div '+divStyle+' id="sd_fileUpdateCB'+i+'">עדכן תאריך <input type="checkbox" value="1" id="file_updateDate'+i+'" name="file_updateDate'+i+'"></div>';
			}
			
			animateDiv.appendChild(animateTB);
			mainCell.appendChild(animateDiv);
			i = j;
		}
		
		row = tb.insertRow(-1);
		cell = row.insertCell(-1);
		cell.align = "center";
		cell.setAttribute('colSpan', 5);		
		cell.innerHTML = '<table cellspacing="0" cellpadding="0" border="0" onclick="update_SD81();" style="display:inline;cursor:pointer;margin:auto;direction:ltr;" title="עדכון">'+
												'<tr>'+
													'<td class="left-button"><img src="/htm-webaxy/skins/p.gif"></td>'+
												  '<td>'+
								  					'<table cellspacing="0" cellpadding="0" border="0" style="direction:rtl;">'+
												  	'<tr>'+
													  	'<td class="execute-butt"><img src="/htm-webaxy/skins/p.gif"></td>'+
								  						'<td class="text-button">עדכון</td>'+
											  		'</tr>'+
												  '</table>'+
												'</td>'+
							  				'<td class="right-button"><img src="/htm-webaxy/skins/p.gif"></td>'+
										 '</tr>'+
										'</table>'+
										'<table cellspacing="0" cellpadding="0" border="0" onclick="update_SD81(1);" style="display:inline;cursor:pointer;margin:auto;direction:ltr;" title="עדכן וסגור">'+
												'<tr>'+
													'<td class="left-button"><img src="/htm-webaxy/skins/p.gif"></td>'+
												  '<td>'+
								  					'<table cellspacing="0" cellpadding="0" border="0" style="direction:rtl;">'+
												  	'<tr>'+
													  	'<td class="execute-butt"><img src="/htm-webaxy/skins/p.gif"></td>'+
								  						'<td class="text-button">עדכן וסגור</td>'+
											  		'</tr>'+
												  '</table>'+
												'</td>'+
							  				'<td class="right-button"><img src="/htm-webaxy/skins/p.gif"></td>'+
										 '</tr>'+
										'</table>';
		form.appendChild(tb);
		d.appendChild(form);
		for (i = 1 ; i <= imgArrSD81.length ; i++) {
				animatedcollapse.addDiv('file'+i, 'fade=1');
		}
		animatedcollapse.init();
		creatAllLinkButtons();
		
		var f = document.getElementById('files_update');
		if (f['file_title'+curIndex]) f['file_title'+curIndex].focus();
	}
	
	function clickEditDir(dir){
		wAdd = open("http://www.milk.org.il/cgi-webaxy/page_edit_login.pl?lang=he&dir="+dir+"&ID=645657_milk&scandirID=81&"+cookie_in+"&act=addfile","wAdd","height=150,width=250,top=150,left=150,resizable=yes,status=yes,scrollbars=yes");
		
	}
	
	function clickEditScan(id){
		wAdd = open("http://www.milk.org.il/cgi-webaxy/scandiradmin.pl?lang=he&id_to_edit="+id+"&ID=645657_milk&"+cookie_in+"&action=edit_scan","wAdd","height=700,width=600,top=150,left=150,resizable=yes,status=yes");
		
	}
	
	function clickDel(str){
		if( confirm("האם למחוק \n"+str) ){
			
			dWin = open("http://www.milk.org.il/cgi-webaxy/page_edit_login.pl?lang=he&ID=645657_milk&"+cookie_in+"&act=delFile&dfile="+str ,"dWin","toolbar=yes,status=yes,scrollbars=no,resizable=no,width=1,height=1");
			//dWin.close();
			self.focus();
			//window.setTimeout("window.location.reload()",1000);
		}
	}
	
	
	function setMyCss(item, classN) {
		
		item.className = classN;
		
	}
	
	function printPreview81(sCount, eCount){
	var wantBullet="";
	var wuBullet="";
		var prntRecord;
		var strView = '<TABLE cellpadding="2" cellspacing="0" border="0" align="center" width="100%">';
		if (alowToEdit == 1) {
			strView += '<tr valign="top"><td colspan="2"><br></td><td align="center"><img src="/htm-webaxy/edit_all_docs.gif" border="0" onclick="clickEditSD81(\'info/health/dairy/calcium/cal\', -1)" title="ערוך כל המסמכים" style="cursor: pointer"><img src="/htm-webaxy/nadd.gif" border="0" onclick="clickEditDir(\'info/health/dairy/calcium/cal\')" title="הוספה ל: info/health/dairy/calcium/cal" style="cursor: pointer"></td></TR>'
		}
		var filepath = '';
		var talkback = '';
		var counter = 0;	
		var pv_counter = 0;
		var className, classNameOver;			
		var myTarget, lastDot;
		var ext_open_blank = '';
		eob = ext_open_blank.split(",");
		if (eCount<sCount) {
			for (i=eCount; i>sCount; i--) {
				ext = '';
				myTarget = '_top';
				prntRecord = imgArrSD81[i].split("<D>");
				lastDot = prntRecord[1].lastIndexOf('.');
				if (lastDot >= 0) ext = prntRecord[1].substring(lastDot+1);
				if (ext_open_blank && eob.length) {
						var ext2 = ext.toLowerCase();
						for (j=0;j<eob.length;j++) {
								var str1 = eob[j].toLowerCase();
								if (str1 == ext2) myTarget = '_new';
						}
				}
				alt = prntRecord[6];
				if (alt == undefined || alt == '') alt = '';
				else {
					//alt = alt.replace(/%22/g,"\"");
					alt = 'title="'+alt+'"';
				}
				//if (prntRecord[5] == 'ClickAdmin' && !alowToEdit) continue;
				counter++;
				if (counter % 2 == 0) {
						className = 'scandir81-item scandir81-even';
						classNameOver = 'scandir81-item-over scandir81-even-over';
				}
				else {
						className = 'scandir81-item scandir81-odd';
						classNameOver = 'scandir81-item-over scandir81-odd-over';
				}
				
				titleRecord = prntRecord[0].split("<DDD>");
				prntRecord[0] = titleRecord[2];
				var protect_icon = titleRecord[0];
				var new1 = titleRecord[1];
				if (prntRecord[0] == undefined) prntRecord[0] = '' ;
				if (new1 == undefined) new1 = '' ;				
				
				if (prntRecord[1].match("/cgi-webaxy/scandir3.pl")) {
					prntRecord[1].match(/dir=([^&]+)/);
					filepath = "http://www.milk.org.il/" + RegExp.$1;
				}
				else {
					filepath = prntRecord[1];
				}
				
				if (prntRecord[4] != "") {
					talkback = '<div class="scandir81-replies scandir-replies" style="display:inline;"> (' + prntRecord[4] + ' תגובות)</div>';
				}
				else {
					talkback = "";
				}
				var onmouseover='';
				var onmouseout='';
				if (('' || '') && (counter % 2 != 0)) {
						onmouseover = 'onmouseover="setMyCss(this, \''+classNameOver+'\');"';
						onmouseout = 'onmouseout="setMyCss(this, \''+className+'\');" class="'+className+'"';
				}
				if (('' || '') && (counter % 2 == 0)) {
						onmouseover = 'onmouseover="setMyCss(this, \''+classNameOver+'\');"';
						onmouseout = 'onmouseout="setMyCss(this, \''+className+'\');" class="'+className+'"';
				}
				strView += '<TR valign="top">';
				prntRecord3Arr = prntRecord[3].split("<DDD>");
				var pv_limit = parseInt('');
				if (('' == 'checked' || pv_counter < pv_limit) && prntRecord3Arr[1]) {pv_counter++;prntRecord[3] = prntRecord3Arr[1];}
				else {prntRecord[3] = prntRecord3Arr[0];prntRecord3Arr[1]='';}
				
				if (prntRecord[1].search(/\.flv$/i) > 0 || prntRecord[1].search(/\.flv\?/i) > 0) {
						prntRecord[1] = "/htm-webaxy/flowplayer/playurl.htm?video="+prntRecord[1];
				}
						
				if(prntRecord[3].match(/bullet.gif|htm.gif|untitled.gif|jpg.gif|wav.gif|mpg.gif|doc.gif|txt.gif|zip.gif|xls.gif|ppt.gif|exe.gif|pdf.gif/)) {
					if(wantBullet != "" && (('' && prntRecord3Arr[1] == '') || '' == '')) {
						prntRecord[3]=wantBullet;
					}
					strView += '<td colspan="2">';
					strView += '	<table '+onmouseover+' '+onmouseout+' class="'+className+'" width="100%" cellpadding="0">';
					strView += '		<tr valign="top">';
					if (wuBullet == '') {
						strView += '<td class="scandir-bullet scandir81-bullet" width="25px"><A '+alt+' href="'+prntRecord[1]+'"  target="'+myTarget+'"><img src="'+prntRecord[3]+'" border="0"></a></td>'
					}
					if (alowToEdit && prntRecord[0] == '') {
							var fileName = prntRecord[1];
				 			lastDot = prntRecord[1].lastIndexOf('/');
							if (lastDot >= 0) fileName = prntRecord[1].substring(lastDot+1);
							fileName = "קובץ: "+fileName;
							strView += '<td class="scandir81-link" style="font-size: 14px;"><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+fileName+'</a>'+prntRecord[2]+' '+talkback+'</td>'
					}
				 	else 
						strView += '<td class="scandir81-link" style="font-size: 14px;"><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+prntRecord[0]+'</a>'+prntRecord[2]+' '+talkback+'</td>'
					strView += '		</tr>';
					strView += '	</table>';
					strView += '</td>';
				}
				else {
					strView += '<td colspan="2">';
					strView += '	<table '+onmouseover+' '+onmouseout+' class="'+className+'" width="100%" cellpadding="0">';
					strView += '		<tr valign="top">';
					if (wuBullet == '') {
						//strView += '			<td class="scandir-bullet scandir81-bullet" width="25px"><A '+alt+' href="'+prntRecord[1]+'"  target="'+myTarget+'"><img src="'+prntRecord[3]+'" border="0" hspace="5"></a></td>'
						strView += '			<td class="scandir-bullet scandir81-bullet" width="25px"><A '+alt+' href="'+prntRecord[1]+'"  target="'+myTarget+'"><img src="'+prntRecord[3]+'" border="0"></a></td>'
					}
					if (alowToEdit && prntRecord[0] == '') {
							var fileName = prntRecord[1];
				 			lastDot = prntRecord[1].lastIndexOf('/');
							if (lastDot >= 0) fileName = prntRecord[1].substring(lastDot+1);
							fileName = "קובץ: "+fileName;
							strView += '			<td class="scandir81-link" style="font-size: 14px;"><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+fileName+'</a>'+prntRecord[2]+' '+talkback+'</td>'
					}
				 	else 
							strView += '			<td class="scandir81-link" style="font-size: 14px;"><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+prntRecord[0]+'</a>'+prntRecord[2]+' '+talkback+'</td>'
					strView += '		</tr>';
					strView += '	</table>';
					strView += '</td>';
				}				
				strView += '<td align="left">';
				if (alowToEdit == 1 && prntRecord[1].search(/scandir3.pl/) == -1) {
					var dscData = prntRecord[7];
					if (dscData.search(/nodsc=true/) == -1 && prntRecord[1].search(/\..?htm.?$/) > 0) strView += ' <img src="/htm-webaxy/magicpage.gif" border="0" onclick="openMP(\'%%FILE%%\')" title="בנה ביתך" style="cursor: pointer" onMouseOver="this.parentNode.parentNode.style.backgroundColor=\'silver\';" onMouseOut="this.parentNode.parentNode.style.backgroundColor=\'#ffffff\'"> '.replace(/%%FILE%%/g, prntRecord[1]);
					strView += ' <img src="/htm-webaxy/pagedit.gif" border="0" onclick="clickEditSD81(\''+filepath+'\', %%ID%%)" title="עריכה מאפיינים" style="cursor: pointer" onMouseOver="this.parentNode.parentNode.style.backgroundColor=\'silver\';" onMouseOut="this.parentNode.parentNode.style.backgroundColor=\'#ffffff\'"> '.replace(/%%ID%%/g, i);
					strView += ' <img src="/htm-webaxy/ndel.gif" border="0" onclick="clickDel(\''+filepath+'\')" title="Delete page from info/health/dairy/calcium/cal " title="מחיקה" title="מחיקה" style="cursor: pointer" onMouseOver="this.parentNode.parentNode.style.backgroundColor=\'silver\';" onMouseOut="this.parentNode.parentNode.style.backgroundColor=\'#ffffff\'"> ';
				}
				strView += '</td>';
				strView += '</TR>';
			}
		}
		else {
			for (i=sCount; i<eCount; i++){				
				ext = '';
				myTarget = '_top';
				prntRecord = imgArrSD81[i].split("<D>");
				lastDot = prntRecord[1].lastIndexOf('.');
				if (lastDot >= 0) ext = prntRecord[1].substring(lastDot+1);
				if (ext_open_blank && eob.length) {
						var ext2 = ext.toLowerCase();
						for (j=0;j<eob.length;j++) {
								var str1 = eob[j].toLowerCase();
								if (str1 == ext2) myTarget = '_new';
						}
				}
				alt = prntRecord[6];
				if (alt == undefined || alt == '') alt = '';
				else {
					//alt = alt.replace(/%22/g,"\"");
					alt = 'title="'+alt+'"';
				}
				//if (prntRecord[5] == 'ClickAdmin' && !alowToEdit) continue;
				counter++;
				if (counter % 2 == 0) {
						className = 'scandir81-item scandir81-even';
						classNameOver = 'scandir81-item-over scandir81-even-over';
				}
				else {
						className = 'scandir81-item scandir81-odd';
						classNameOver = 'scandir81-item-over scandir81-odd-over';
				}
				titleRecord = prntRecord[0].split("<DDD>");
				prntRecord[0] = titleRecord[2];
				var protect_icon = titleRecord[0];
				var new1 = titleRecord[1];
				if (prntRecord[0] == undefined) prntRecord[0] = '' ;
				if (new1 == undefined) new1 = '' ;				
				if (prntRecord[1].match("/cgi-webaxy/scandir3.pl")) {
					prntRecord[1].match(/dir=([^&]+)/);
					filepath = "http://www.milk.org.il/" + RegExp.$1;
				}
				else {
					filepath = prntRecord[1];
				}
								
				if (prntRecord[4] != "") {
					talkback = '<div class="scandir81-replies scandir-replies" style="display:inline;"> (' + prntRecord[4] + ' תגובות)</div>';
				}
				else {
					talkback = "";
				}
				var onmouseover='';
				var onmouseout='';
				if (('' || '') && (counter % 2 != 0)) {
						onmouseover = 'onmouseover="setMyCss(this, \''+classNameOver+'\');"';
						onmouseout = 'onmouseout="setMyCss(this, \''+className+'\');" class="'+className+'"';
				}
				if (('' || '') && (counter % 2 == 0)) {
						onmouseover = 'onmouseover="setMyCss(this, \''+classNameOver+'\');"';
						onmouseout = 'onmouseout="setMyCss(this, \''+className+'\');" class="'+className+'"';
				}
				//alert(prntRecord[0]+':'+prntRecord[1]+':'+prntRecord[2]+':'+prntRecord[3]);
				
				strView += '<TR valign="top">';
				prntRecord3Arr = prntRecord[3].split("<DDD>");
				var pv_limit = parseInt('');
				if (('' == 'checked' || pv_counter < pv_limit) && prntRecord3Arr[1]) {pv_counter++;prntRecord[3] = prntRecord3Arr[1];}
				else {prntRecord[3] = prntRecord3Arr[0];prntRecord3Arr[1]='';}
				
				if (prntRecord[1].search(/\.flv$/i) > 0 || prntRecord[1].search(/\.flv\?/i) > 0) {
						prntRecord[1] = "/htm-webaxy/flowplayer/playurl.htm?video="+prntRecord[1];
				}
				
				if(prntRecord[3].match(/bullet.gif|htm.gif|untitled.gif|jpg.gif|wav.gif|mpg.gif|doc.gif|txt.gif|zip.gif|xls.gif|ppt.gif|exe.gif|pdf.gif/)) {
					if(wantBullet != "" && (('' && prntRecord3Arr[1] == '') || '' == '')){
						prntRecord[3]=wantBullet;					
					}
					strView += '<td colspan="2">';
					strView += '	<table '+onmouseover+' '+onmouseout+' class="'+className+'" width="100%" cellpadding="0">';
					strView += '		<tr valign="top">';
					if (wuBullet == '') {
						strView += '<td class="scandir-bullet scandir81-bullet" width="25px"><A '+alt+' href="'+prntRecord[1]+'"  target="'+myTarget+'"><img src="'+prntRecord[3]+'" border="0"></a></td>';
					}
					if (alowToEdit && prntRecord[0] == '') {
							var fileName = prntRecord[1];
				 			lastDot = prntRecord[1].lastIndexOf('/');
							if (lastDot >= 0) fileName = prntRecord[1].substring(lastDot+1);
							fileName = "קובץ: "+fileName;
							strView += '<td class="scandir81-link"><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+fileName+'</a>'+prntRecord[2]+' '+talkback+' </td>';
					}
				 	else 
				 		strView += '<td class="scandir81-link"><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+prntRecord[0]+'</a>'+prntRecord[2]+' '+talkback+' </td>';
				 	strView += '		</tr>';
					strView += '	</table>';
					strView += '</td>';
				}
				else {
					strView += '<td colspan="2">';
					strView += '	<table '+onmouseover+' '+onmouseout+' class="'+className+'" width="100%" cellpadding="0">';
					strView += '		<tr valign="top">';
				 	if (wuBullet == '') {
				 		//strView += '			<td class="scandir-bullet scandir81-bullet" width="25px"><A '+alt+' href="'+prntRecord[1]+'"  target="'+myTarget+'"><img src="'+prntRecord[3]+'" border="0" hspace="5"></a></td>';
				 		strView += '			<td class="scandir-bullet scandir81-bullet" width="25px"><A '+alt+' href="'+prntRecord[1]+'"  target="'+myTarget+'"><img src="'+prntRecord[3]+'" border="0"></a></td>';
				 	}
				 	if (alowToEdit && prntRecord[0] == '') {
				 		var fileName = prntRecord[1];
				 		lastDot = prntRecord[1].lastIndexOf('/');
						if (lastDot >= 0) fileName = prntRecord[1].substring(lastDot+1);
						fileName = "קובץ: "+fileName;
				 		strView += '			<td class="scandir81-link" ><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+fileName+'</a>'+prntRecord[2]+' '+talkback+' </td>';
				 	}
				 	else
				 		strView += '			<td class="scandir81-link" ><a class="scandir81-fTitle" '+alt+' href="'+prntRecord[1]+'" target="'+myTarget+'">'+protect_icon+new1+prntRecord[0]+'</a>'+prntRecord[2]+' '+talkback+' </td>';
					strView += '		</tr>';
					strView += '	</table>';
					strView += '</td>';
				}
				strView += '<td align="left">';
				if (alowToEdit == 1 && prntRecord[1].search(/scandir3.pl/) == -1) {
					var dscData = prntRecord[7];
					if (dscData.search(/nodsc=true/) == -1 && prntRecord[1].search(/\..?htm.?$/) > 0) strView += ' <img src="/htm-webaxy/magicpage.gif" border="0" onclick="openMP(\'%%FILE%%\')" title="בנה ביתך" style="cursor: pointer" onMouseOver="this.parentNode.parentNode.style.backgroundColor=\'silver\';" onMouseOut="this.parentNode.parentNode.style.backgroundColor=\'#ffffff\'"> '.replace(/%%FILE%%/g, prntRecord[1]);
					strView += ' <img src="/htm-webaxy/pagedit.gif" border="0" onclick="clickEditSD81(\''+filepath+'\', %%ID%%)" title="עריכה מאפיינים" style="cursor: pointer" onMouseOver="this.parentNode.parentNode.style.backgroundColor=\'silver\';" onMouseOut="this.parentNode.parentNode.style.backgroundColor=\'#ffffff\'"> '.replace(/%%ID%%/g, i);
					strView += ' <img src="/htm-webaxy/ndel.gif" border="0" onclick="clickDel(\''+filepath+'\')" title="Delete page from info/health/dairy/calcium/cal " title="מחיקה" title="מחיקה" style="cursor: pointer" onMouseOver="this.parentNode.parentNode.style.backgroundColor=\'silver\';" onMouseOut="this.parentNode.parentNode.style.backgroundColor=\'#ffffff\'"> ';
				}
				strView += '</td>';
				strView += '</TR>';
			}
		}
		
		if (alowToEdit == 1) {
			strView += '<tr valign="top"><td colspan="2"><br></td><td align="center"><img src="/htm-webaxy/edit_all_docs.gif" border="0" onclick="clickEditSD81(\'info/health/dairy/calcium/cal\', -1)" title="ערוך כל המסמכים" style="cursor: pointer"><img src="/htm-webaxy/nadd.gif" border="0" onclick="clickEditDir(\'info/health/dairy/calcium/cal\')" title="הוספה ל: info/health/dairy/calcium/cal" style="cursor: pointer"></td></TR>'
		}
		strView += '</table>'
		document.getElementById('scandir81-PageViewDiv').innerHTML = strView;
		if ('checked' != 'hide' && 'checked' != 'checked') {
			var nextItms = (eCount+limit81);
			var beforeItms = (sCount-limit81);
			var information;
			
			if (nextItms>imgArrSD81.length){
				nextItms = (eCount+(imgArrSD81.length-eCount));
			}
			if (eCount == imgArrSD81.length)
				nextStr = '';
			else {
				//nextStr = ' <a title="קדימה" href="javascript:incrementPage81(); printPreview81('+eCount+','+nextItms+'); "><IMG SRC="/htm-webaxy/multimedia/scandir/next1.png" BORDER="0"></a>';
				nextStr = 'javascript:incrementPage81();printPreview81('+eCount+','+nextItms+');';
			}
			if (sCount == 0)
				beforeStr = '';
			else
				//beforeStr = ' <a title="אחורה" href="javascript:decrementPage81(); printPreview81('+beforeItms+','+sCount+'); "<IMG SRC="/htm-webaxy/multimedia/scandir/prev1.png" BORDER="0"></a>';
				beforeStr = 'javascript:decrementPage81();printPreview81('+beforeItms+','+sCount+');';
			
			if (nextStr == '' && beforeStr == '') {
				information = '<BR>';
			}
			else {
				//information = '<font style="font-size: 14px; color: #5d9a23;">ספריה: "cal", קבצים: '+(sCount+1)+' - '+(eCount)+', סך הכל: '+imgArrSD81.length+'</font>';
				information = '';
			}
			/*
			strView = '';
			strView += '<TR valign="top">';
			strView += '<td>';
			strView += '<table width="90%" border="0"><tr>';
			strView += '<td id="scandir81-pageBottomCell" align="center" class="scandir-pageBottomCell">'+information+beforeStr+nextStr+'</td>';
			strView += '</tr></table>';
			strView += '</TR>';
			if (alowToEdit == '1') {
				strView = strView.replace(/stylE[^ ]+/g," ");
			}
			*/
			strView = '<div id="scandir81-PageBottomDiv">'+information+'</div>';
			document.getElementById('scandir81-PageBottom').innerHTML = strView;
			if (document.getElementById('scandir81-nav_prv')) {
				if (beforeStr != '') {
					document.getElementById('scandir81-nav_prv').href = beforeStr;
					document.getElementById('scandir81-nav_prv').style.display = '';
				}
				else document.getElementById('scandir81-nav_prv').style.display = 'none';
			}
			if (document.getElementById('scandir81-nav_nxt')) {
				if (nextStr != '') {
					document.getElementById('scandir81-nav_nxt').href = nextStr;
					document.getElementById('scandir81-nav_nxt').style.display = '';
				}
				else document.getElementById('scandir81-nav_nxt').style.display = 'none';
			}
			if ('checked' != 'hide' && 'checked' != 'checked' && '1' == 1 && limit81) {
				updateNavNumbering();
			}
		}
		
		/*
		try {
			if (document.links.length) {
				document.links[0].focus();
			}
		}
		catch(e){}
		*/
	
	}
	
	function updateNavNumbering() {
	
		var eCount,sCount;
		var nav_numbering = '';
		var pages = Math.ceil(imgArrSD81.length/limit81);
		curP = page_no81;
		middle = Math.ceil(5/2);
		middle_inc = Math.floor(5/2);
		curP++;
		nav_numbering += '<table dir="ltr" id="scandir81-nav_numbering" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td>';
		elements = new Array();				
		start = '';
		if (curP <= middle+1) {
			start = 1;
		}
		else {
			start = curP - middle_inc;
		}
		if (start + 5 > pages) {start = pages - 5 + 1;}
		if (start <= 0 ) {start = 1;}
	
		if (start > 2) {
			eCount = 0;
			sCount = 1*limit81;
			//elements.push('<a href="/cgi-webaxy/scandir3.pl?lang=he&ID=645657_milk&scandirID=81&page_no=0">1</a>');
			elements.push('<a href="javascript:incrementPage81();printPreview81('+eCount+','+sCount+');">1</a>');
			elements.push("...");
		}
		for (i = start ; i <= pages && i < start + 5; i++) {
			j = i - 1;
			if (i == curP) {elements.push("<span>"+i+"</span>");}
			else {
				eCount = j*limit81;
				sCount = i*limit81;
				elements.push('<a href="javascript:incrementPage81();printPreview81('+eCount+','+sCount+');">'+i+'</a>');
			}
		}
		i--;
		if (pages > 5 && i < pages) {
			elements.push("...");
			eCount = (pages-1)*limit81;
			sCount = pages*limit81;
			elements.push('<a href="javascript:incrementPage81();printPreview81('+eCount+','+sCount+');">'+pages+'</a>');
			//elements.push('<a href="/cgi-webaxy/scandir3.pl?lang=he&ID=645657_milk&scandirID=81&page_no='+(pages-1)+'">'+pages+'</a>');
		}
		if ('he' == 'he' || 'he' == 'he') {
			nav_numbering += elements.reverse().join('');
		}
		else {
			nav_numbering += elements.reverse().join('');
		}
				
		nav_numbering += '</td></tr>';				
		nav_numbering += '</table>';
		//alert(nav_numbering);
		document.getElementById('scandir81-nav_numbering_div').innerHTML = nav_numbering;
			
	}
	
