		
		/* <![CDATA[ */
		
			function cmfPopitup(url,width,height,showType)
			{
				var left = (screen.width-width)/2;
				var top = (screen.height-height)/2;
				if (left < 0) left = 0;
				if (top < 0) top = 0;
				var windowAttr='height='+height+',width='+width+',left='+left+',top='+top+',status=1,scrollbars=1,menubar=1';
				if (showType=='full') windowAttr='height='+height+',width='+width+',left='+left+',top='+top+','+'status=1,scrollbars=1,menubar=1,resizable=1';
				if (showType=='fixSimple') windowAttr='height='+height+',width='+width+',left='+left+',top='+top+','+'status=0,scrollbars=0,menubar=0,resizable=0';
				if (showType=='scrollResizable') windowAttr='height='+height+',width='+width+',left='+left+',top='+top+','+'status=0,scrollbars=1,menubar=0,resizable=1';
				if (showType=='fixWithScrollbars') windowAttr='height='+height+',width='+width+',left='+left+',top='+top+','+'status=0,scrollbars=1,menubar=0,resizable=0';

				newWindow=window.open(url,'name',windowAttr);
				if (window.focus) {newWindow.focus()}
				return false;
			}
			
				
			function cmfGetElements(docObj) 
			{
				if (docObj==null) {docObj=document;}
				var all = docObj.all ? docObj.all :
						docObj.getElementsByTagName('*');
				var elements = new Array();
				for (var e = 0; e < all.length; e++)
						elements[elements.length] = all[e];
				return elements;
			}
			
				
			/* This script and many more are available free online at
			The JavaScript Source!! http://javascript.internet.com
			Created by: Ultimater | http://webdeveloper.com/forum/member.php?u=30185 */
			function cmfHtmlEntityDecode(str) {
			  var ta=document.createElement("textarea");
			  ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
			  return ta.value;
			}
			
				
			function cmfCreateHtmlNode(tag, text) {
				var n = document.createElement(tag);
				if (text) n.innerHTML = text;
				return n;
			}
			
				
			/*
			Script by RoBorg
			RoBorg@geniusbug.com
			http://javascript.geniusbug.com | http://www.roborg.co.uk
			Please do not remove or edit this message
			Please link to this website if you use this script!
			*/
			function cmfClone(myObj)
			{
				if(typeof(myObj) != 'object') return myObj;
				if(myObj == null) return myObj;
			
				var myNewObj = new Object();
			
				for(var i in myObj)
					myNewObj[i] = clone(myObj[i]);
			
				return myNewObj;
			}
			
				
			function cmfClearSelectObject(obj) {
				/*
				obj.innerHTML='';
				return true;
				optgroups = obj.getElementsByTagName('optgroup');
				for (var j = 0; j < optgroups.length; j++) {
					obj.removeChild(optgroups[j]);
				}
				options = obj.getElementsByTagName('options');
				for (var j = 0; j < options.length; j++) {
					obj.removeChild(options[j]);
				}*/
				//obj.options.length=0;
				//obj.selectedIndex=null;
				
				var childs = obj.childNodes;
				for(i = childs.length - 1 ; i >= 0 ; i--) {
					obj.removeChild(childs[i],true);
				}
			}
			
				
			function cmfConfimationMessage(message)
			{
				if(confirm(message)) { return true; }
				else {return false;}
			}
			
					/*
				mode : onlyHide,OnlyShow
				use this parameter to force function to only hide or show the element,
				"mode" is useful if you have separate buttons to show and hide the object.
			*/
			function cmfToggleDisplayStyle(id,mode) {
		
				var element=document.getElementById(id);
				if (element) {
					if (element.style.display=='none' && mode!='onlyHide') {
						element.style.display='';
						return true;
					}
					else if (mode!='onlyShow') {
						element.style.display='none';
						return true;
					}
				}
				return false;
			}
			
					/*
				mode : onlyHide,OnlyShow
				use this parameter to force function to only hide or show the element,
				"mode" is useful if you have separate buttons to show and hide the object.
			*/
			function cmfToggleTabsDisplayStyle(activeTabId,tabsId,onSelectTab) {
				var tabId;
				var elm;
				for (key in tabsId) {
					tabId=tabsId[key];
					elm=document.getElementById(tabId);
					if (elm) {
						if (tabId==activeTabId) {
							elm.style.display='';
							if (onSelectTab) {
								onSelectTab(elm.id)
							}
						} else
							elm.style.display='none';
					}
				}
			}
			

				/* ]]> */
		
	
