var $ = function (el) {return typeof(el) === "string" ? document.getElementById(el) : el;};
 

window.onload = function () {
  /*
  with (document.documentElement) {
	  var _w = clientWidth;
		var _h = clientHeight;
	}
	
	with (document.getElementById("layout").style) {
      height = _h + "px";
	}
	*/
};

/*
window.onresize = function () {
  with (document.documentElement) {
	  var _w = clientWidth;
	  var _h = clientHeight;
  }

  with (document.getElementById("layout").style) {
    width = Math.max(625, _w) + "px";
  }
};
*/
var popupDiv = function (id, flag) {
  $(id).style.display = (flag) ? "block" : "none";
};

var smtForm = function (oForm, act) {
  document.forms[oForm].action = act + ".asp";
  document.forms[oForm].submit();
};
var goback = function (act) {
  window.history.go(act);
};

var setValue = function (elname, val) {
	$(elname).value = val;
};

var flash = function (ur,w,h){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+ur+'">');
	document.write('<param name="quality" value="high"> ');
	document.write('<param name="wmode" value="transparent"> ');
	document.write('<param name="menu" value="false"> ');
	document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">');
	document.write('</embed>');
	document.write('</object>');
}

var chkform = function (msg) {
		alert(msg);
};