/*Process for Set Div*/
/*
  var theHandle = document.getElementById("root");
  var theRoot   = document.getElementById("root");
  var lyr1   = '';
  var iMyWidth = (window.screen.width/2) - (355);
  var iMyHeight = (window.screen.height/2) - (350);
  theRoot.style.left = iMyWidth+"px";
  theRoot.style.top = iMyHeight+"px";
  Drag.init(theHandle, theRoot);
  */
 function showdiv(div){
  var theHandle = document.getElementById(div);
  var theRoot   = document.getElementById(div);
  var lyr1   = '';
  var iMyWidth = (window.screen.width/2) - (parseInt(theHandle.style.width)/2);
//  var iMyHeight = (window.screen.height/2) - (parseInt(theHandle.style.height)/2);
  var iMyHeight = (window.screen.height/2) - (parseInt(theHandle.style.height)/2);
   yScroll = document.body.scrollTop || document.documentElement.scrollTop;
	var screenheight = document.body.clientHeight;
	var cromeheight = parseInt(theHandle.style.height);
	var diffheight = (screenheight - cromeheight)/3;
	theRoot.style.left = iMyWidth+"px";
    theRoot.style.top = yScroll+diffheight-50+"px";
    Drag.init(theHandle, theRoot);
	theRoot.style.display = "block";
	dv = document.createElement('div'); 
	dv.setAttribute('id',"lyr1"); 
	dv.className="lyr1";
	dv.innerHTML ='.';
	dv.style.height ="900px";
	document.body.appendChild(dv);
	document.getElementById("lyr1").style.width=window.screen.width+"px";
//	document.getElementById("lyr1").style.height=window.screen.height+"px";
	document.getElementById("lyr1").style.zIndex = "1001";
	document.getElementById(div).style.zIndex = "1002";
	document.getElementById("lyr1").style.height="900px";
 }
 function hidew(div){
  var theHandle = document.getElementById(div);
  var theRoot   = document.getElementById(div);
  var lyr1   = '';
  var iMyWidth = (window.screen.width/2) - (355);
  var iMyHeight = (window.screen.height/2) - (350);
  	theRoot.style.display = "none";
	theRoot.style.left = iMyWidth+"px";
	theRoot.style.top = iMyHeight+"px";
	var olddiv = document.getElementById("lyr1");
	document.body.removeChild(olddiv);

 }
  window.onload = function()
  {
      settings = {
          tl: { radius: 5 },
          tr: { radius: 5 },
          bl: { radius: 5 },
          br: { radius: 5 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
      var myBoxObject = new curvyCorners(settings, "myBox");
      myBoxObject.applyCornersToAll();
  }
  /*Patched for browser*/
	browser_version= parseInt(navigator.appVersion);
	browser_type = navigator.appName;
	if(browser_type == "Microsoft Internet Explorer"){
		document.getElementById("sc").style.position="relative";
	}
function ClearError() { //hide error symbol from status bar
window.status = "Done";
return true;
}
window.onerror = ClearError;