
		function ygtBulkPush(arrItems, callback){
    		this.arrayItems = arrItems;
    		this.proxyScript = 0;
    		
    		this.getPackages = function() {
    		var qs = "m=bs&count="+this.arrayItems.length;
    			for (i = 0; i < this.arrayItems.length; i++) {
    				qs += "&s" + i + "="+this.arrayItems[i].supplierId+"&t" + i + "="+this.arrayItems[i].tourId+"&p" + i + "="+this.arrayItems[i].packageId+"&c" + i + "="+this.arrayItems[i].maxResults+"&d" + i + "="+this.arrayItems[i].date+"&ele" + i + "="+this.arrayItems[i].targetElement.id+"&n"+i +"=" + this.arrayItems[i].nights+"&r"+i +"=" + this.arrayItems[i].rounds;
    			}
    			var httpReq = CreateXMLHttpRequest();
    			var targInner = this.targetElement;
    			httpReq.onreadystatechange = function() {
    				if (httpReq.readyState == 4) {
    					var response = httpReq.responseText;
    					var itemIsed = response.split("#");
    					
    					for (i = 0; i < itemIsed.length; i++) {
    							var splittter = itemIsed[i].split("|");
    						if (splittter[1] != undefined){
    							document.getElementById(splittter[1]).innerHTML = splittter[0];
    						}
    					}
    					if(callback != null){
    					    callback();
    					}
    				}
    			}
    			RunAsync(qs, httpReq, this.proxyScript);
    		}

    		function CreateXMLHttpRequest() {
    			if (window.XMLHttpRequest) {
    				return new XMLHttpRequest();
    			}
    			else if (window.ActiveXObject) {
    				return new ActiveXObject("Msxml2.XMLHTTP");
    			}
    			alert("Browser doesn't support AJAX");
    			return null;
    		}

    		function RunAsync(postString, httpReq, proxScrip) {
    			if (proxScrip == ""){
    				httpReq.open("GET", "http://api.yourgolftravel.com/developers/script.aspx" + "?a=634122861366890941&" + postString, true);
    			}else{
    				httpReq.open("GET", proxScrip + "?a=634122861366890941&" + postString, true);
    			}
    			httpReq.send(null);
    		}
		}

        function ygt(targElement) {
            ygt(targElement, null);
        }
            
    	function ygt(targElement, callback) {
    		this.user = '';
    		this.proxyScript = '';
    		this.supplierId = 0;
    		this.packageId = 0;
    		this.nights = 0;
    		this.rounds = 0;
    		this.tourId = 0;
    		this.maxResults = 1;
    		this.date = 1;
    		this.targetElement = document.getElementById(targElement);
    		this.getPackages = function() {
    			var httpReq = CreateXMLHttpRequest();
    			var targInner = this.targetElement;
    			httpReq.onreadystatechange = function() {
    				if (httpReq.readyState == 4) {
    					targInner.innerHTML = httpReq.responseText;
    					if(callback != null){
    					    callback();
    					}
    					
    				}

    			}
    			RunAsync("m=gp"+"&s="+this.supplierId+"&t="+this.tourId+"&p="+this.packageId+"&c="+this.maxResults+"&d="+this.date+"&n="+this.nights+"&r="+this.rounds, httpReq, this.proxyScript);
    		}
    		this.DebugInfo = function() {
    			var httpReq = CreateXMLHttpRequest();
    			var targInner = this.targetElement;
    			httpReq.onreadystatechange = function() {
    				if (httpReq.readyState == 4) {
    					alert("Connection Returned Success With: " + httpReq.responseText);
    				}
    			}
    			RunAsync("m=DebugInfo", httpReq, this.proxyScript);
    		}

    		function CreateXMLHttpRequest() {
    			if (window.XMLHttpRequest) {
    				return new XMLHttpRequest();
    			}
    			else if (window.ActiveXObject) {
    				return new ActiveXObject("Msxml2.XMLHTTP");
    			}
    			alert("Browser doesn't support AJAX");
    			return null;
    		}

    		function RunAsync(postString, httpReq, proxScrip) {
    			if (proxScrip == ""){
    				httpReq.open("GET", "http://api.yourgolftravel.com/developers/script.aspx" + "?a=634122861366890941&" + postString, true);
    			}else{
    				httpReq.open("GET", proxScrip + "?a=634122861366890941&" + postString, true);
    			}
    			httpReq.send(null);
    		}
    		
    	}
