    //test an attribute to see if it's empty, then build code around it
    function makeCodeFrmXML(node,attribute,beforecode,aftercode,defaultvalue) {
    	var codeoutput;
    	
    	if (!beforecode) {
    	beforecode = "";
    	}
    	
    	if (!aftercode) {
    	aftercode = "";
    	}
    	
    	if (node.getAttribute(attribute) != "") {
    	codeoutput = beforecode + cleanupText(node.getAttribute(attribute)) + aftercode;
    	}
    	else {
    		if (defaultvalue) {
    		codeoutput = defaultvalue;
    		}
    		else {
    			codeoutput = "";
    		}
    	}
    	return codeoutput;
    }
    
    function cleanupText(input) {
    	//var output = input.replace(/\\'/g,"'");
    	var output = input;
    	return output;
    }
