function JSONscriptRequest(fullUrl) {
	var get_id = JSONscriptRequest.scriptCounter++
    this.fullUrl = fullUrl; 
    this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
    this.headLoc = document.getElementsByTagName("head").item(0);
    this.scriptId = 'YJscriptId' + get_id;
}

JSONscriptRequest.scriptCounter = 1;

JSONscriptRequest.prototype.buildScriptTag = function () {

    this.scriptObj = document.createElement("script");
    
    this.scriptObj.setAttribute("type", "text/javascript");
    this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE+'&scriptid='+this.scriptId);
    this.scriptObj.setAttribute("id", this.scriptId);
}
 
JSONscriptRequest.prototype.removeScriptTag = function () {
    this.headLoc.removeChild(this.scriptObj);  
}

JSONscriptRequest.prototype.addScriptTag = function () {
    this.headLoc.appendChild(this.scriptObj);
}


function remove_script(x){
	var d = document.getElementsByTagName("head")[0];
	var old = document.getElementById(x);
	if (document.getElementById(x)!=null){
	d.removeChild(old);
	}


}
