<!--

var xmlHttp;
var alert_str;

alert_str = "Your browser does not support AJAX!\nPlease update your browser.";
 
function getd_001(str)
{
	var url = rootpath + "getd_001.asp?catid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_001").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_002(str)
{
	var url = rootpath + "getd_002.asp?levelid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_002").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_003(str)
{
	var url = rootpath + "getd_003.asp?typeid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_003").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_004(str)
{
	var url = rootpath + "getd_004.asp?actionid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_004").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_005(str)
{
	var url = rootpath + "getd_005.asp?pageid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_005").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_006(str)
	{
	var url = rootpath + "getd_006.asp?menuid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_006").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_007(str)
{
	var url = rootpath + "getd_007.asp?fileid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_007").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_00701(str)
{
	var url = rootpath + "getd_00701.asp?fileid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_007").innerHTML = xmlHttp.responseText;
			
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_008(str)
	{
	var url = rootpath + "getd_008.asp?userid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_008").innerHTML = xmlHttp.responseText;
			//document.getElementById("R" + str).style.display = "none";
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_010(str)
	{
	var url = rootpath + "getd_010.asp?attributeid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_010").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_011(str)
	{
	var url = rootpath + "getd_011.asp?attributeid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_011").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_DE01(str)
	{
	var url = rootpath + "data/getd_DE01.asp?exportid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_DE01").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_012(str)
	{
	var url = rootpath + "getd_012.asp?mailid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			
			document.getElementById("DIV_012").innerHTML = xmlHttp.responseText;
			
			xinha_editors = null;
			xinha_init    = null;
			xinha_config  = null;
			xinha_plugins = null;
			xinha_init = xinha_init ? xinha_init : function()
			{
			  xinha_plugins = xinha_plugins ? xinha_plugins :
			  [
			   'SuperClean'
			  ];
			 if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
		
			  xinha_editors = xinha_editors ? xinha_editors :
			  [
				'body'
			  ];
			  xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
			  xinha_editors  = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
				  xinha_editors.body.config.width = '600px';
				  xinha_editors.body.config.height = '200px';
			  Xinha.startEditors(xinha_editors);
			}
			xinha_init();			
			
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getd_013(str)
	{
	var url = rootpath + "getd_013.asp?attributeid_=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("DIV_013").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}



function delete_(type,str){
	var url = rootpath + "cms_del.asp?deltype=" + type + "&delid=" + str;
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(type=='file'){
				document.getElementById("DIV_INFO").innerHTML = xmlHttp.responseText;
				u.expandit('edit_page_files');
			}
			if(type=='user_file'){
				//document.getElementById("DIV_INFO").innerHTML = xmlHttp.responseText;
				u.expandit('edit_user_files');
			}

			if(type=='level'){
				document.getElementById("DIV_002").innerHTML = xmlHttp.responseText;
			}
			if(type=='user'){
				document.getElementById("DIV_008").innerHTML = xmlHttp.responseText;
				document.getElementById("NTITLE" + str).style.color = "#F00";
				document.getElementById("NTITLE" + str).style.textDecoration = "line-through";
			}
			if(type=='user_attributes'){
				document.getElementById("DIV_010").innerHTML = xmlHttp.responseText;
			}
			if(type=='page'){
				document.getElementById("DIV_005").innerHTML = xmlHttp.responseText;
				document.getElementById("NTITLE" + str).style.color = "#F00";
				document.getElementById("NTITLE" + str).style.textDecoration = "line-through";
			}
			if(type=='appointment'){
				document.getElementById("DIV_104").innerHTML = xmlHttp.responseText;
				document.getElementById("NTITLE" + str).style.color = "#F00";
				document.getElementById("NTITLE" + str).style.textDecoration = "line-through";
			}
			if(type=='data_export'){
				document.getElementById("DIV_DE01").innerHTML = xmlHttp.responseText;
				document.getElementById("NTITLE" + str).style.color = "#F00";
				document.getElementById("NTITLE" + str).style.textDecoration = "line-through";
			}
		}
	}
	if(confirm('Are you sure you want to delete this item?')){
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	}
}

function getPage(str)
{
	var url = rootpath + "getd_page.asp?pageid=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("PAGE" + str).innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function getPageByAjax(str)
{
	var url = rootpath + "getd_pagebyajax.asp?pageid=" + str;
	
	try
	{  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
	{   
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{    
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{      
				alert(alert_str);
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById("PAGEBYAJAX" + str).innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function ajSaved(){
	document.getElementById("frm").style.backgroundColor = "#ddf8cc";
	document.getElementById("frm").style.backgroundImage = "url(cms/Images/37-0.gif)";
	document.getElementById("frm").style.backgroundPosition = "565px 8px";
	document.getElementById("frm").style.backgroundRepeat = "no-repeat"; 
	document.getElementById("frm").style.borderColor = "#80c65a";
	setTimeout("setToDefault()",800);
}

function ajError(){
	document.getElementById("frm").style.backgroundColor = "red";
	setTimeout("setToDefault()",800);
}

function setToDefault(){
	document.getElementById("frm").style.backgroundColor = "#f1f1f1";
	document.getElementById("frm").style.backgroundImage = "none";
	document.getElementById("frm").style.borderColor = "#cccccc";
}

function getMultipleSelection(formName,elementName,array){ 
	var selected = new Array(); 
	var mySelect = document.forms[formName].elements[elementName]; 
	for(j=0;j<mySelect.options.length;j++){ 
		if(mySelect.options[j].selected){ 
			selected.push(mySelect.options[j].value);
		} 
	}
	if(array != 'true') return selected.toString(); else return selected;
} 

function getMultipleSelectionAll(formName,elementName,array){ 
	var selected = new Array(); 
	var mySelect = document.forms[formName].elements[elementName]; 
	for(j=0;j<mySelect.options.length;j++){ 
			selected.push(mySelect.options[j].value);
	}
	if(array != 'true') return selected.toString(); else return selected;
} 

//-->

