var DHTML=0, DOM=0, MS=0, NS=0, OP=0;

function DHTML_init(){
	if(window.opera)OP=1;
	if(document.getElementById){DHTML=1;DOM=1;}
	if(document.all && !OP){DHTML=1;MS=1;}
	if(window.netscape && window.screen && !DOM && !OP){DHTML=1;NS=1;}
}

function oID(ID){
	if(DOM){
		if(typeof document.getElementById(ID)=="object")return(document.getElementById(ID));
		else return(void(0));
	}else if(MS){
		if(typeof document.all[ID]=="object")return(document.all[ID]);
		else return(void(0));
	}else if(NS){
		if(typeof document[ID]=="object")return(document[ID]);
		else return(void(0));
	}
}

function oName(Name){
	if(Name=='VName')alert(document.getElementsByName(Name));
	if(DOM){
		if(typeof document.getElementsByName(Name)=='object')return(document.getElementsByName(Name)[0]);
		else return(void(0));
	}else if(MS){
		if(typeof document[Name]=='object')return(document[Name]);
		else return(void(0));
	}else if(NS){
		if(typeof document[Name]=='object')return(document[Name]);
		else return(void(0));
	}
}
DHTML_init();

function oWIN(){
	this.Width;
	this.Height;
	this.init=_oWIN_init;
	this.resize2min=_oWIN_resize2min;
}

function _oWIN_init(){
	if((document.all)&&!OP){
		this.Width=document.all.bodyId.offsetWidth;
		this.Height=document.all.bodyId.offsetHeight;
	}else{
		this.Width=window.innerWidth;
		this.Height=window.innerHeight+3;
	}
	if(typeof this.Width=="string")this.Width=parseInt(this.Width);
	if(typeof this.Height=="string")this.Width=parseInt(this.Width);
}

function _old_oWIN_init(){
	if((document.all)&&!SAFARI){
		this.Width=document.all.bodyId.offsetWidth;
		this.Height=document.all.bodyId.offsetHeight;
	}else{
		this.Width=window.innerWidth;
		this.Height=window.innerHeight;
	}
	if(typeof this.Width=="string")this.Width=parseInt(this.Width);
	if(typeof this.Height=="string")this.Width=parseInt(this.Width);
}

function _oWIN_resize2min(minWidth,minHeight){
	if(this.Width < minWidth){
		window.resizeBy(minWidth-this.Width,0);
	}
	if(this.Height<minHeight){
		window.resizeBy(0,minHeight-this.Height);
	}
	this.init();
}

function LoadIFrame(target,file){
	if(window.opera){
		oID('Atarget').target=target;
		oID('Atarget').href=file;
		oID('Atarget').click();
	}else{
		oID(target).src=file;
	}
}

