
var page;
function pageGetURL() {
	if( this.Server.indexOf("http") == 0) {
	 return this.Server + "/" + this.Path;
	} else {
	 return "http://" + this.Server + "/" + this.Path;
	}
	
}	
	
function pageGetDocumentPath() {
	return getURL() + "/" + this.ID;
}	
	
function pageGetServer() {
	return this.Server;
}

function pageGetID() {
	return this.ID;
}	
	
function pageGetFilePath() {
	return this.Path;
}
	
function Page() {

	var eID = document.getElementById("SiteID");
	var ePath = document.getElementById("SitePATH");
	var eServer = document.getElementById("SiteSERVER");
	
	if(eID) this.ID = eID.value;
	else this.ID = "";
	
	if(ePath) this.Path = ePath.value
	else this.Path = "";
	
	if(eServer) this.Server = eServer.value;
	else this.Server = "";
	
	this.getURL = pageGetURL;
	this.getID = pageGetID;
	this.getFilePath = pageGetFilePath;
	this.getDocumentPath = pageGetDocumentPath;
	this.getServer = pageGetServer;
}


