function GetWidth() {
	if (self.innerWidth) {
		return self.innerWidth;
	} else
	if (document.documentElement && document.documentElement.clientHeight) {
		return document.documentElement.clientWidth;
	} else
	if (document.body) {
		return document.body.clientWidth;
	}
}

function ShowHide(id){
if (id != '') {
	var itm = null;
	var pitm= null;
	if (document.getElementById) { 
  		itm = document.getElementById(id); 
	} else if (document.all) { 
		itm = document.all[id]; 
	} else if (document.layers) { 
		itm = document.layers[id]; 
	}
   	if (!itm) { /* do nothing */ 
	} else if (itm.style) {
   		if (itm.style.display == "none") { 
			itm.style.display = "block"; 
		} else { 
			itm.style.display = "none";
		}
    } else { itm.visibility = "show"; }
 }
}
function blockdiv (this_) {
	if (bi(this_) != null ) {
		document.getElementById(this_).style.display = 'block';
	}
}
function nonediv (this_) {
	if (bi(this_) != null ) {
		document.getElementById(this_).style.display = 'none';
	}
}

function ShowMenu(target_) {
	for(var i=0; i<menu.length; i++) {
		if (bi('m'+menu[i]) != null ) {
			if (bi('m'+menu[i]).style.display == 'block' && 'm'+menu[i] != target_) {
				id = setTimeout("nonediv('m"+menu[i]+"')",200);
			}
		}
	}
	blockdiv(target_);
}

function HideMenu() {
	for(var i=0; i<menu.length; i++) {
		if (bi('m'+menu[i]) != null ) {
			if (bi('m'+menu[i]).style.display == 'block') {
				id = setTimeout("nonediv('m"+menu[i]+"')",200);
			}
		}
	}
}
function setnulltext(this_, mess, typ) {
	if (typ == 0) {
		if (this_.value == mess) {this_.value = ""};
	} else {
		if (this_.value == "") {this_.value = mess};
	}
}
function bi (el) {
	return document.getElementById(el);
}