//if (window.addEventListener) {
//	window.addEventListener("load", LayoutIndex, false)
//}
//else if (window.attachEvent) {
//	window.attachEvent("onload", LayoutIndex)
//}

//window.onload=function() {
//	var doc=window.open('map.htm');
//	doc.document.write(document.getElementById('IndexTree').innerHTML);
//};

//window.onload = function(){
//	var scatIndexPopup=document.getElementsByTagName('li');
//	for (var i=0; i<scatIndexPopup.length; i++) {
//		if (scatIndexPopup[i].id.indexOf('sColumn')>-1)
//			scatIndexPopup[i].style.zIndex=9999;
//	}
////	var doc=window.open('map.htm');
////	doc.document.write(document.getElementById('IndexTree').innerHTML);
//};

var blnClickOnMenu	=false;
var intRowsPerColumn=20;
var intColumnWidth	=130;

//function LayoutIndex() {
//	var IndexTree=document.getElementById('IndexTree');
//	var ULTags=IndexTree.getElementsByTagName("li");
//	var debug=new Array();
////	var ATags=IndexTree.getElementsByTagName("li");
//	for (var t=0; t<ULTags.length; t++){
//		ULTags[t].style.left=GetParentWidth(ULTags[t])+"px";
//		debug[debug.length]=ULTags[t].style.left;
////		ULTags[t].style.visibility="visible";
////		ULTags[t].style.display="block";
////		if (ULTags[t].style.display=="block") {
////			ULTags[t].style.visibility="visible";
////			ULTags[t].style.display="none";
////		}
//	}
////	alert(debug.join('\n'));
//}
/*
function ToggleMenus(nodes) {
	var maxHierarchyLen=4;
	for (var i=0; i<nodes.length; i++) {
		var node=new String(nodes[i]);
		if (node.isNumeric()) {
			var thisNodes=nodes.slice(0,i+1);
			var thisID='_'+thisNodes.join('_')+'_'.repeat(maxHierarchyLen-i-1);
			var node=document.getElementById(thisID).parentNode;
			blnClickOnMenu=false;
			ToggleSubMenus(node);
		}
	}
	blnClickOnMenu=true;
	return(false);
}
*/
function ToggleMenus(nodes) {
	var menu=$$('MenuTree');
	for (var i=0; i<nodes.length; i++) {
		var nodeTitle=new String(nodes[i]);
		if (nodeTitle.length>0) {
			for (var m=0; m<menu.childNodes.length; m++) {
				thisMenu=menu.childNodes[m];
				if (thisMenu.title==nodeTitle) {
					blnClickOnMenu=false;
					ToggleSubMenus(thisMenu);
					m=menu.childNodes.length;
					menu=thisMenu.getElementsByTagName('ul')[0];
				}
			}
		}
	}
	blnClickOnMenu=true;
	return(false);
}
function ToggleSubMenus(obj){
	if (!blnClickOnMenu) {
		HidePopupIndices();
		var ULTags=obj.parentNode.getElementsByTagName("ul");
		var ATags=obj.parentNode.getElementsByTagName("li");
		for (var t=0; t<ULTags.length; t++){
			if (ULTags[t].style.display=="block") {
				ULTags[t].style.visibility="visible";
				ULTags[t].style.display="none";
			}
		}
		for (var a=ATags.length-1; a>-1; a--) {
			if (ATags[a].className.indexOf('On')>-1) ATags[a].className=ATags[a].className.replace('On','Off');
		}

		var ULTag=obj.getElementsByTagName("ul")[0];
		ULTag.style.left=GetParentWidth(ULTag)+"px";
		obj.className=obj.className.replace('Off','On');
		ULTag.style.display="block";
		blnClickOnMenu=true;
	}
	return(false);
}
function ToggleSubIndex(obj){
	try {
		if (!blnClickOnMenu) {
			HidePopupMenus();
			var ULTags=obj.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("ul");
			var ATags=obj.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("li");
			for (var t=0; t<ULTags.length; t++){
				if (ULTags[t].style.display=="block") {
					ULTags[t].style.visibility="visible";
					ULTags[t].style.display="none";
				}
			}
			for (var a=ATags.length-1; a>-1; a--) {
				if (ATags[a].className.indexOf('On')>-1) ATags[a].className=ATags[a].className.replace('On','Off');
			}
			var ULTag=obj.parentNode.getElementsByTagName("ul")[0];
			ULTag.style.top=obj.offsetTop+'px';
			ULTag.style.left=obj.offsetLeft+obj.offsetWidth+"px";
			/*ULTag.style.top=obj.parentNode.offsetTop+((BrowserDetect.browser=='Explorer') ? obj.parentNode.parentNode.offsetTop : 0)+'px';
			ULTag.style.marginLeft=(obj.parentNode.className.getNumbersOnly()-1)*160+20+'px';
			ULTag.style.left=ULTag.parentNode.offsetWidth+"px";*/
			obj.parentNode.className=obj.parentNode.className.replace('Off','On');
			ULTag.style.display="block";
			blnClickOnMenu=true;
		}
	}
	catch(e) { alert(e); }
	return(false);
}
function SetMenuClickOn() {
	blnClickOnMenu=true;
}
function GetParentWidth(obj) {
	var nodes;
	var nodeLoc;
	var nodeCount;
	var rowsPerColumn;
	var nodeColumn;
	var maxColumns;
	var columnShift;
	try {
		nodes=obj.parentNode.parentNode.childNodes;
		nodeLoc=nodes.indexOf(obj.parentNode)+1;
		nodeCount=obj.parentNode.parentNode.childNodes.length;
		rowsPerColumn=(nodeCount<intRowsPerColumn) ? intRowsPerColumn : Math.ceil(nodeCount/Math.ceil(nodeCount/intRowsPerColumn));
		nodeColumn=Math.ceil(nodeLoc/rowsPerColumn);
		maxColumns=Math.ceil(nodeCount/rowsPerColumn);
		columnShift=(maxColumns-nodeColumn+1);
	}
	catch(e) {
		nodes=new Array();
		var nodesSub=obj.parentNode.parentNode.childNodes;
		for (var i=0; i<nodesSub.length; i++) {
			nodes[nodes.length]=nodesSub[i];
		}
		nodeLoc=nodes.indexOf(obj.parentNode)+1;
		nodeCount=obj.parentNode.parentNode.childNodes.length;
		rowsPerColumn=(nodeCount<intRowsPerColumn) ? intRowsPerColumn : Math.ceil(nodeCount/Math.ceil(nodeCount/intRowsPerColumn));
		nodeColumn=Math.ceil(nodeLoc/rowsPerColumn);
		maxColumns=Math.ceil(nodeCount/rowsPerColumn);
		columnShift=(maxColumns-nodeColumn+1);
	}
	var shiftPixels=columnShift*intColumnWidth;
	/*
	alert(
		new Array(
			 'nodeLoc:'+nodeLoc
			,'nodeCount:'+nodeCount
			,'rowsPerColumn:'+rowsPerColumn
			,'nodeColumn:'+nodeColumn
			,'maxColumns:'+maxColumns
			,'columnShift:'+columnShift
			,'shiftPixels:'+shiftPixels
		).join('\n')
	);
	*/
	return(shiftPixels);
}
function HidePopupMenu() {
	HidePopupMenus();
	HidePopupIndices();
	blnClickOnMenu	=false;
}
function HidePopupMenus() {
	try {
		if (!blnClickOnMenu) {
			var MenuTree=document.getElementById('MenuTree');
			var ULTags=MenuTree.getElementsByTagName("ul");
			var ATags=MenuTree.getElementsByTagName("li");
			for (var t=ULTags.length-1; t>-1; t--){
				if (ULTags[t].style.display=="block") {
					ULTags[t].style.visibility="visible";
					ULTags[t].style.display="none";
				}
			}
			for (var a=ATags.length-1; a>-1; a--) {
				if (ATags[a].className.indexOf('On')>-1) ATags[a].className=ATags[a].className.replace('On','Off');
			}
		}
	} catch(e) { ; }
}
function HidePopupIndices() {
	try {
		if (!blnClickOnMenu) {
			var MenuTree=document.getElementById('IndexTree');
			var ULTags=MenuTree.getElementsByTagName("ul");
			var ATags=MenuTree.getElementsByTagName("li");
			for (var t=ULTags.length-1; t>-1; t--){
				if (ULTags[t].style.display=="block") {
					ULTags[t].style.visibility="visible";
					ULTags[t].style.display="none";
				}
			}
			for (var a=ATags.length-1; a>-1; a--) {
				if (ATags[a].className.indexOf('On')>-1) ATags[a].className=ATags[a].className.replace('On','Off');
			}
		}
	} catch(e) { ; }
}
function GoToPage(hierarchy, thisNode) {
	for (var i in hierarchy) {
		if (hierarchy[i]=='') {
			hierarchy.splice(i);
		}
	}
	if (hierarchy.length>3) {
		if (hierarchy[3].indexOf('(All')>-1) {
			hierarchy.pop();
		}
		hierarchy.unshift('/Products');
		document.location=hierarchy.join('/').replace(/ /g,'-');
	}
	else {
		ToggleSubMenus(thisNode);
	}
	return(false);
}
/*
function GoToPage(cls, scls, cat, scat) {
	//alert([cls, scls, cat, scat].join('\n'));
	var hierarchy=[];
	hierarchy.push('/Products');
	if (cls) hierarchy.push(cls);
	if (cls) hierarchy.push(scls);
	if (cls) hierarchy.push(cat);
	if (cls) hierarchy.push(scat);
	if (scat.indexOf('(All')>-1) {
		document.location=hierarchy.join('/');
	}
	else {
		document.location=['/Products',cls,scls,cat,scat].join('/');
	}
}
*/
function GoToLink(cls, scls, cat, scat) {
//	alert('GoToLink');
	var url=new Array('','products','cls',cls,'scls',scls,'cat',cat,'scat',scat).join('/');
//	alert(url);
	document.location=url.replace(/ /g, '-');
}
/*
var MenuIDs=["MenuTree"] //Enter id(s) of SuckerTree UL menus, separated by commas

function BuildSubMenus(){

	for (var i=0; i<MenuIDs.length; i++){

		var ULTags=document.getElementById(MenuIDs[i]).getElementsByTagName("ul")
		
		for (var t=0; t<ULTags.length; t++){

			//ULTags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"

			if (ULTags[t].parentNode.parentNode.id==MenuIDs[i]) //if this is a first level submenu
				ULTags[t].style.left=ULTags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
			else //else if this is a sub level submenu (ul)
				ULTags[t].style.left=ULTags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it

			ULTags[t].parentNode.onmouseover=function(){
				this.getElementsByTagName("ul")[0].style.display="block"
			}

			ULTags[t].parentNode.onmouseout=function(){
				this.getElementsByTagName("ul")[0].style.display="none"
			}
		}

		for (var t=ULTags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
			ULTags[t].style.visibility="visible"
			ULTags[t].style.display="none"
		}
	}
}
*/
//if (window.addEventListener) {
//	window.addEventListener("load", BuildSubMenus, false)
//}
//else if (window.attachEvent) {
////	var doc=window.open('map.htm');
////	doc.document.write(document.getElementById('MenuTree').innerHTML);
//	document.getElementById('MenuTree').innerHTML
//	window.attachEvent("onload", BuildSubMenus)
//}

/*Below: Legacy*/

var offsetTop		=null;
var divs			=new Array('subproduct','category','subcategory');
var cumLeft			=new Array();
var cumTop			=new Array();
var prods			=new Array(1,2,3,24);

/*var divsIndex=new Array();
    divsIndex['subproduct']=0;
    divsIndex['category']=1;
    divsIndex['subcategory']=2;*/
//var prods=new Array(<%=getProducts()%>);

function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
        try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 
        catch (e) {
            try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } 
            catch (E) { xmlhttp = false; }
        }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        try { xmlhttp = new XMLHttpRequest(); } 
        catch (e) { xmlhttp = false; }
    }
    return xmlhttp;
}
function load_productNav(url, tag_id, top, left) {
	//alert(new Array(top, left).join('\n'));
    var xml=getHTTPObject();
    var xmlDoc;
    
    if (tag_id.indexOf('product_')!=-1) {
        //window.open(url);
    }

    //window.open(url);
    xml.open("GET", url, true); 
    xml.onreadystatechange=function() {
        if (xml.readyState==4) {
            if (xml.status!=404) {
                var div=document.getElementById(tag_id)
                div.innerHTML=xml.responseText;
                div.style.position='absolute';
                if (tag_id.indexOf('product_')==-1) {
    	            //hidePopupMenu();
                    div.style.top=top;
                    div.style.left=left;
                }
                else {
                    hidePopupMenu();
                    hideSelected();
                    //defaultBGColor();
                }

                div.style.display='block';
                blnClickOnMenu=false;
                document.body.style.cursor='default';
				/*var menu=document.getElementById('subcategory');
				var bodyHeight;
				var scrolledHeight;
				try {bodyHeight=document.body.clientHeight;}
				catch(e) {bodyHeight=window.innerHeight;}
				try {scrolledHeight=document.body.scrollTop;}
				catch(e) {scrolledHeight=window.pageYOffset;}
				if (menu.offsetTop+menu.offsetHeight+scrolledHeight>bodyHeight) {
					menu.style.top=menu.offsetTop-menu.offsetHeight+17;
				}*/
            }
        }
    }
    xml.send(null);
}
function showAll(level, id, parent, top) {
	window.status=id;
	var ids=id.split(',');
	if (ids[0]>0) show('subproduct', ids[0]+',,,', 'product_'+ids[0]+'_menu', true);
	if (ids[1]>0) show('category', ids[0]+','+ids[1]+',,', 'subproduct_'+ids[1]+'_menu', false);
	if (ids[2]>0) show('subcategory', ids[0]+','+ids[1]+','+ids[2]+',', 'category_'+ids[2]+'_menu', false);
}
function show(level, id, parent, top) {
//	alert('show('+level+', '+id+', '+parent+', '+top+')');
	cumLeft		=new Array();
	cumTop		=new Array();
	var left	=0;
	
    blnClickOnMenu=true;
    //defaultBGColorMenuItems(parent.offsetParent.offsetParent);
    //parent.style.backgroundColor='yellow';
    //parent.style.fontWeight='900';
    //parent.style.color='black';
    hidePopupMenuSubordinate(level);
    //defaultBGColorMenuItems(document.getElementById(parent));
    defaultBGColorMenuItems(document.getElementById(getParent(level)),document.getElementById(parent));
    if (top) offsetTop=null;
    //window.open('ProductNav.aspx?level='+level+'&id='+id);
    parent=document.getElementById(parent);
//	cumTop=new Array();
//	alert(getTopPixels(parent,0));
//	cumTop=new Array();
//	alert(parent.offsetParent.offsetParent.offsetWidth);
	/*
	switch(level) {
		case 'subproduct':
			left=parent.offsetParent.offsetWidth;
			break;
		case 'category':
			left=parent.offsetParent.offsetWidth;
			break;
		case 'subcategory':
			left=parent.offsetParent.offsetParent.offsetWidth;
			break;
	}
	*/
    load_productNav(
        'ProductNav.aspx?level='+level+'&id='+id,
        level, 
        getTopPixels(parent,-3), //getTop(document.getElementById(parent),-3), //-3
        getLeftPixels(parent.offsetParent,parent.offsetWidth) //getLeft(getParent(level),-4) //left
    );
//	alert(cumTop.join('\n'));
//	document.getElementById('RightHeader').innerHTML=cumLeft.join(' ')+'\n'+cumTop.join(' ');
    return(false);
}
function showIndex(level, id, parent, top) {
    blnClickOnMenu=true;
    var node=document.getElementById(parent);
    //alert(node.offsetHeight);
    defaultBGColorMenuItems(node.offsetParent.offsetParent,node);
    var leftPx=36+
		node.offsetWidth+
		node.offsetParent.offsetLeft+
		node.offsetParent.offsetParent.offsetLeft+
		node.offsetParent.offsetParent.offsetParent.offsetLeft;
    var topPx=102+
		node.offsetTop+
		node.offsetParent.offsetTop+
		node.offsetParent.offsetParent.offsetTop;
    load_productNav(
        'ProductNav.aspx?level='+level+'&id='+id,
        level, 
        topPx,
        leftPx
    );
    return(false);
}
function select(product, subproduct, category, subcategory) {
    blnClickOnMenu=false;
    var div=document.getElementById('product_'+product);
    if (div) {
		var id=product+','+subproduct+','+category+','+subcategory;
		//hideSelected();
		load_productNav('ProductSelect.aspx?id='+id,div.id, 0);
		hidePopupMenu();
    }
}
function hideSelected() {
    for (var i=0; i<prods.length;i++) {
	    document.getElementById('product_'+prods[i]).style.display='none';
    }
}
//function hidePopupMenu() {
//    if (!blnClickOnMenu) {
//        for (var i=0; i<divs.length;i++) {
//	        document.getElementById(divs[i]).style.display='none';
//        }
//        var index=document.getElementById('productIndex');
//        if (index!=null) defaultBGColorChild(index);
//        var products=document.getElementById('productHeader');
//        defaultBGColorChild(products);
//        //alert(products.childNodes.length);
//        /*for (var i=0; i<products.childNodes.length;i++) {
//            //alert(products.childNodes[i].innerHTML);
//            if (products.childNodes[i].className!=null) {
//                var child=products.childNodes[i];
//	            defaultBGColorMenuItems(child);
//                if (child.className=='navigator') {
//                    for (var j=0; j<child.childNodes.length;j++) {
//                        if (child.childNodes[j].className!=null) {
//                            defaultBGColorMenuItems(child.childNodes[j]);
//                        }
//                    }
//                }
//            }
//        }*/
//    }
//}
function hideSelectedSubordinate(index) {
    try {
        var div=document.getElementById('product_'+prods[index]);
        div.style.display='none';
        hideSelectedSubordinate(index++);
    }
    catch(e) {}
}
function hidePopupMenuSubordinate(level) {
    var init=(level=='subproduct' ? 1: ((level=='category' ? 2 : 3)));
    for (var i=init; i<divs.length; i++) {
        var div=document.getElementById(divs[i]);
        //if (div.offsetLeft>=left) {
            div.style.display='none';
        //}
    }
/*function hidePopupMenuSubordinate(index) {
    try {
        var div=document.getElementById(prods[index]);
        div.style.display='none';
        hidePopupMenuSubordinate(index++);
    }
    catch(e) {}*/
}
function changeBGColor(obj) {
    switch (obj.style.backgroundColor) {
        case 'white':
            obj.style.backgroundColor='aqua';
            break;
        case 'aqua':
            obj.style.backgroundColor='white';
            break;
        default:
            break;
    }
}
function changeBGColor(obj, normal, hover) {
    switch (obj.style.backgroundColor) {
        case normal:
            obj.style.backgroundColor=hover;
            break;
        case hover:
            obj.style.backgroundColor=normal;
            break;
        default:
            break;
    }
}
function defaultBGColor() {
    for (var i=0; i<prods.length;i++) {
	    document.getElementById('product_'+prods[i]+'_menu').style.backgroundColor='white';
	    document.getElementById('product_'+prods[i]).style.backgroundColor='white';
    }
    for (var i=0; i<divs.length;i++) {
        document.getElementById(divs[i]).style.backgroundColor='white';
    }
}
/*function defaultBGColorMenuItems(obj) {
    if (obj.offsetParent!=null) {
        if (obj.offsetParent.childNodes.length>0) {
            for (var i=0; i<obj.offsetParent.childNodes.length; i++) {
                try {
                    //obj.childNodes[i].style.backgroundColor='white';
                    //obj.childNodes[i].style.fontWeight='normal';
                    //alert(obj.offsetParent.childNodes[i].nodeName);
                    obj.offsetParent.childNodes[i].className=obj.offsetParent.childNodes[i].className.replace('On','Off');
                }
                catch(e) {}
            }
        }
    }
    obj.className=obj.className.replace('Off','On');
}*/
function defaultBGColorMenuItems(parent, obj) {
    if (parent!=null) {
        if (parent.childNodes.length>0) {
            for (var i=0; i<parent.childNodes.length; i++) {
                var child=parent.childNodes[i];
                if (child.className!=null) {
                    child.className=child.className.replace('On','Off');
                }
                if (child.childNodes.length>0) {
                    defaultBGColorMenuItems(child, obj);
                }
            }
        }
    }
    if (obj.className.indexOf('On')==-1) {
        obj.className=obj.className.replace('Off','On');
    }
}
function getParent(level) {
    switch (level) {
        case 'product':
            level=null;
            break;
        case 'subproduct':
            level='product';
            break;
        case 'category':
            level='subproduct';
            break;
        case 'subcategory':
            level='category';
            break;
        default:
            //level=document.getElementById(level).offsetParent.id;
            level=null;
            break;
    }
    return(level);
}
function getChild(level) {
    switch (level) {
        case 'product':
            level='subproduct';
            break;
        case 'subproduct':
            level='category';
            break;
        case 'category':
            level='subcategory';
            break;
        case 'subcategory':
            level=null;
            break;
    }
    return(level);
}
function getLeft(level, init) {
    //alert(init+'\n'+level);
    //init-=4;
    child=document.getElementById(level);
    //alert(child.parentNode.innerHTML);
    if (child!=null) {
		if (child.style.display!='none') {
			try {
				init+=child.offsetWidth;
			}
			catch(e) {
				init+=child.scrollWidth;
			}
		}
		var parent=getParent(level);
		//var parent=level.offsetParent;
		if (parent!=null) {
			init=getLeft(parent,init);
		}
    }
    cumLeft[cumLeft.length]=init;
    return(init);
}
function getTop(parent, init) {
    //alert(parent.offsetTop+'\n'+parent.innerHTML);
    if (offsetTop==null) {
        init+=parent.offsetTop;
        if (parent.offsetParent!=null) {
            init=getTop(parent.offsetParent, init);
        }
        offsetTop=init;
    }
    cumLeft[cumTop.length]=init;
    return(offsetTop);
}
/*function getTop(obj, offsetTop) {
    if (offsetTop==0) {
        var parent=obj.offsetParent;
        offsetTop=obj.offsetTop;
        offsetTop=getTop(parent, offsetTop);
    }
    return(offsetTop);
}*/
function defaultBGColorChild(obj) {
    if (obj.childNodes.length>0) {
        for (var i=0; i<obj.childNodes.length; i++) {
            try {
                defaultBGColorChild(obj.childNodes[i]);
                obj.childNodes[i].className=obj.childNodes[i].className.replace('On','Off');
            }
            catch(e) {}
        }
    }
}
function Shape() {
	this.Top;
	this.Right;
	this.Bottom;
	this.Left;
	this.Width;
	this.Height;
	this.SetDimensions=function(width, height) {
		this.Width		=width;
		this.Height		=height;
	};
	this.SetLocation=function(top,right,bottom,left) {
		this.Top		=top;
		this.Right		=right;
		this.Bottom		=bottom;
		this.Left		=left;
	};
}
function Menu() {
	this.inheritFrom=Shape;
	this.inheritFrom();
}
function getTopPixels(node, init) {
	var out=init;
    try {
		var newTop=node.offsetTop;
		//var newTop=node.scrollTop;
		out+=newTop;
		out=getTopPixels(node.offsetParent, out);
    }
	catch(e) { 
		try {
			out=getTopPixels(node.offsetParent, out);
		} catch(e) { ; }
	}
    return(out);	
}
function getLeftPixels(node, init) {
	var out=init;
    try {
		var newLeft=node.offsetLeft;
		//var newLeft=node.offsetWidth;
		out+=newLeft;
		out=getLeftPixels(node.offsetParent, out);
    }
	catch(e) { 
		try {
			out=getLeftPixels(node.offsetParent, out);
		} catch(e) { ; }
	}
    return(out);	
}
function LoadProductNav() {
    var xml=getHTTPObject();
    var url='/Products.aspx?Navigation=yes';
    xml.open("GET", url, true); 
    xml.onreadystatechange=function() {
        if (xml.readyState==4) {
            if (xml.status==200) {
				$$('MenuTree').innerHTML=xml.responseText;
            }
        }
    }
    xml.send(null);
}