	function switchTab(tab){
		order = tab.getAttribute("name");
		elem = document.getElementById("needFade").getElementsByTagName("div");
	    divs = new Array();
		for(i = 0,iarr = 0; i < elem.length; i++) {
			att = elem[i].getAttribute("name");
			if(att == "TabbedPanelsContent") {
				divs[iarr] = elem[i];
				iarr++;
        	}
		}
		menus = document.getElementsByTagName("a");
		for (i = 0; i < menus.length; i++) {
			if (menus[i].getAttribute("name") == order) {
				document.title = "אלוף טכנולוגיות והדרכה - " + menus[i].innerHTML;
			}
		}
		for (i = 0; i < divs.length; i++) {
			if(divs[i].style.display == "block"){
				divs[i].style.display = "none";
			}
			tabid = divs[i].getAttribute("id");
			if(tabid == "tab"+order){
				divs[i].style.display = "block";
			}
		}
		setTimeout('showSubb()',100);
	}
		
function textareas(){
	tinyMCE.init({
		theme: "advanced",
		mode: "textareas",
		editor_selector: "mceEditor",
		directionality: "rtl",
		width: "580",
		height: "400",
		language: "he",
		relative_urls : false,
		remove_script_host : false,
		document_base_url : "http://www.aluftec.co.il/",
		plugins : "linkupload,docsupload,imgupload,style,layer,table,emotions,iespell,preview,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,pagebreak,imagemanager,filemanager",	
		theme_advanced_toolbar_location: "top",
		theme_advanced_toolbar_align: "right",
		theme_advanced_buttons1: "bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,outdent,indent,cut,copy,paste,undo,redo,link,unlink,hr",
		theme_advanced_buttons2: "ltr,rtl,removeformat,fontselect,fontsizeselect,sub,sup,forecolor,backcolor,charmap,emotions,imgupload,docsupload,linkupload",
		theme_advanced_buttons3: "pastetext,pasteword,table,delete_col,delete_row,delete_table,col_after,col_before,row_after,row_before,row_after,row_before,split_cells,merge_cells"
	});
	tinyMCE.init({
		theme: "advanced",
		mode: "textareas",
		editor_selector: "mainEditor",
		directionality: "rtl",
		width: "330",
		height: "400",
		language: "he",
		relative_urls : false,
		remove_script_host : false,
		document_base_url : "http://www.aluftec.co.il/",
		plugins: "emotions,directionality,table,imgupload",
		theme_advanced_toolbar_location: "top",
		theme_advanced_toolbar_align: "right",
		theme_advanced_buttons1: "sub,sup,bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist",
		theme_advanced_buttons2: "outdent,indent,cut,copy,paste,undo,redo,link,unlink,hr,ltr,rtl,removeformat",
		theme_advanced_buttons3: "fontselect,fontsizeselect,forecolor,backcolor,charmap,emotions,imgupload,docsupload",
		theme_advanced_buttons4: "table,delete_col,delete_row,delete_table,col_after,col_before,row_after,row_before,row_after,row_before,split_cells,merge_cells"
	});
	tinyMCE.init({
		theme: "advanced",
		mode: "textareas",
		editor_selector: "newsEditor",
		directionality: "rtl",
		width: "150",
		height: "400",
		language: "he",
		relative_urls : false,
		remove_script_host : false,
		document_base_url : "http://www.aluftec.co.il/",
		plugins: "emotions,directionality,table,imgupload",
		theme_advanced_toolbar_location: "top",
		theme_advanced_toolbar_align: "right",
		theme_advanced_buttons1: "bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull",
		theme_advanced_buttons2: "imgupload,docsupload,cut,copy,paste,undo,redo,link,unlink",
		theme_advanced_buttons3: "fontselect,fontsizeselect",
		theme_advanced_buttons4: "sub,sup,forecolor,backcolor,charmap,removeformat",
		theme_advanced_buttons5: "hr,bullist,numlist,ltr,rtl,outdent,indent"
	});
}