﻿function ObjectLoader(objID, url){
	this.id=objID;
	this.width='';
	this.height='';
	this.style='';
	this.classid='';
	this.style='';
	this.Params = new ObjectParameters(url);
	this.PropertiesToString = ObjectLoader_PropertiesToString;
	this.ToString = ObjectLoader_ToString;
	this.load = ObjectLoader_Load;
}

function ObjectLoader_Load(){
	document.write(this.ToString());
}

function ObjectLoader_ToString(){
	var out = "<object ";
	out += this.PropertiesToString();
	out += ">";
	out += this.Params.ToString();
	out += "</object>";

	return(out);
}

function ObjectLoader_PropertiesToString(){
	var out = ''
	for (var prop in this)   {
		if (typeof(this[prop])!= "function" && typeof(this[prop])!= "object"){
			if (this[prop]){
				var propValue = new String(this[prop])
				if(propValue != ''){
					out += prop + '="' + propValue + '" '
				}
			}
		}
	}

	return(out);
}

function ObjectParameters(url){
	this.url=url
	this.ToString=ObjectParameters_ToString
}

function ObjectParameters_ToString(){
	var out = '';
	for (var prop in this)   {
		if (typeof(this[prop])!= "function" && typeof(this[prop])!= "object"){
			if (this[prop]){
				var propValue = new String(this[prop])
				if(propValue != ''){
					out += '<param name="' + prop+ '" value="' + propValue + '">'
				}
			}
		}
	}
	return(out)
}


function myvoid() {}

var popup = '';

function showpopup(message) {
    msgWindow=window.open('','windowname','width=664,height=325');
    msgWindow.document.write('<IMG SRC="' + message + '" WIDTH="664" HEIGHT="325">' );
    msgWindow.document.close();
}

function showpopup2(message) {
    msgWindow=window.open('','windowname','width=287,height=510');
    msgWindow.document.write('<IMG SRC="' + message + '" WIDTH="287" HEIGHT="493">' );
    msgWindow.document.close();
}

function showpopup3(message) {
    msgWindow=window.open('','windowname','width=482,height=360');
    msgWindow.document.write('<IMG SRC="' + message + '" WIDTH="482" HEIGHT="346">' );
    msgWindow.document.close();
}

function showpopup4(message) {
    msgWindow=window.open('','windowname','width=375,height=420');
    msgWindow.document.write('<IMG SRC="' + message + '" WIDTH="375" HEIGHT="406">' );
    msgWindow.document.close();
}

function showpopup5(message) {
    msgWindow=window.open('','windowname','width=562,height=374');
    msgWindow.document.write('<IMG SRC="' + message + '" WIDTH="562" HEIGHT="374">' );
    msgWindow.document.close();
}


function closepopup() {
    if (!msgWindow.closed)
        msgWindow.close();
}




