var GSCCCA = new Object();

GSCCCA.mySoapNamespace = "http://tempuri.org/";


//GSCCCA.defaultURL = "http://localhost:3033/xmlacceptor/xmlacceptor.asmx";
//GSCCCA.fileUploadURL = "http://localhost/xmlacceptor/xmlacceptor.aspx";

GSCCCA.defaultURL = "/xmlacceptor/xmlacceptor.asmx";
GSCCCA.fileUploadURL = "http://localhost/xmlacceptor/fileupload.aspx";


function xmlObject() {
	this.toXml=function(myXmlDoc) {
		myXmlDoc = myXmlDoc || new XmlDoc();
		var myElement=myXmlDoc.createElement(this.constructor.toString().match(/ (.*)\(/)[1]);
		for (i in this) {
			if ( this[i] != "") {
				if (typeof this[i] == "object") {
					var e=this[i].toXml(myXmlDoc);
					if (e)
						myElement.appendChild(e);
				} else if (this[i].prototype == undefined){
					var e = myXmlDoc.createElement(i);
					e.appendChild(myXmlDoc.createTextNode(this[i]));
					myElement.appendChild(e);
				}
			}
		}	
		
		if (myElement.hasChildNodes())
			return myElement;
		else
			return null;
	}
}

function dataError() {
	this.description;
	this.element;
}


/* Trim String
 *
 * Does a VB Trim on a String
 */
function trimString(str) {
	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}


/* Date Pad
 *
 * Pads a full entered date to the write slashes
 */
function datePad(element) {
	var strToChk = this.trimString(element.value);
	var nonDigitPosition = strToChk.search(/\D/);
	var slashPosition = strToChk.search(/\//);
	var dashPosition = strToChk.search(/-/);
	if ( (nonDigitPosition == -1) && (strToChk.length == 8) ) {
		var tmpString = strToChk;
		element.value = tmpString.slice(0,2) + "/" + tmpString.slice(2,4) + "/" + tmpString.slice(4);
	}
}