
function editWidget()
{
KEYwebRoot="/";
  window.scrollTo(0, 0);
  var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
	var height = document.documentElement.clientHeight + document.documentElement.scrollTop;

  var layer = document.createElement('div');
  layer.style.zIndex = 2;
  layer.id = 'layer';
  layer.style.position = 'absolute';
  layer.style.top = '0px';
  layer.style.left = '0px';
  layer.style.height = document.documentElement.scrollHeight + 'px';
  layer.style.width = width + 'px';
  layer.style.backgroundColor = 'black';
  layer.style.opacity = '.6';
  layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
  document.body.style.position = 'static';
  document.body.appendChild(layer);  
  
  var size = { 'height': 500, 'width': 550 };
  var iframe = document.createElement('iframe');
  iframe.name = 'Widget Editor';
  iframe.id = 'WidgetEditor';
	iframe.src = KEYwebRoot + 'appointment.aspx';
	iframe.style.height = size.height + 'px';
	iframe.style.width = size.width + 'px';
	iframe.style.position = 'fixed';
	iframe.style.zIndex = 3;
	iframe.style.backgroundColor = 'white';
	iframe.style.border = '4px solid silver';
	iframe.frameborder = '0';	
	
	iframe.style.top = ((height + document.documentElement.scrollTop) / 2) - (size.height / 2) + 'px';
	iframe.style.left = (width / 2) - (size.width / 2) + 'px';	
	
  document.body.appendChild(iframe);  
}


function closeEditor()
{
   var we = document.getElementById("WidgetEditor");
   var ly = document.getElementById("layer");
   
  document.body.removeChild(we);
  document.body.removeChild(ly);
  document.body.style.position = '';
}


function openFLV()
{
KEYwebRoot="/";
  window.scrollTo(0, 0);
  var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
	var height = document.documentElement.clientHeight + document.documentElement.scrollTop;

  var layer = document.createElement('div');
  layer.style.zIndex = 2;
  layer.id = 'layer2';
  layer.style.position = 'absolute';
  layer.style.top = '0px';
  layer.style.left = '0px';
  layer.style.height = document.documentElement.scrollHeight + 'px';
  layer.style.width = width + 'px';
  layer.style.backgroundColor = 'black';
  layer.style.opacity = '.6';
  layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
  document.body.style.position = 'static';
  document.body.appendChild(layer);  
  
  var size = { 'height': 380, 'width': 548 };
  var iframe = document.createElement('iframe');
  iframe.name = 'Player Editor';
  iframe.id = 'PlayerEditor';
	iframe.src = KEYwebRoot + 'player.aspx';
	iframe.style.height = size.height + 'px';
	iframe.style.width = size.width + 'px';
	iframe.style.position = 'fixed';
	iframe.style.zIndex = 3;
	iframe.style.backgroundColor = 'white';
	iframe.style.border = '4px solid silver';
	iframe.frameborder = '0';	
	
	iframe.style.top = ((height + document.documentElement.scrollTop) / 2) - (size.height / 2) + 'px';
	iframe.style.left = (width / 2) - (size.width / 2) + 'px';	
	
  document.body.appendChild(iframe);  
}
function closePlayer()
{
   var we = document.getElementById("PlayerEditor");
   var ly = document.getElementById("layer2");
   
  document.body.removeChild(we);
  document.body.removeChild(ly);
  document.body.style.position = '';
}

function openGeeWiz()
{
KEYwebRoot="/";
  window.scrollTo(0, 0);
  var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
	var height = document.documentElement.clientHeight + document.documentElement.scrollTop;

  var layer = document.createElement('div');
  layer.style.zIndex = 2;
  layer.id = 'layer3';
  layer.style.position = 'absolute';
  layer.style.top = '0px';
  layer.style.left = '0px';
  layer.style.height = document.documentElement.scrollHeight + 'px';
  layer.style.width = width + 'px';
  layer.style.backgroundColor = 'black';
  layer.style.opacity = '.6';
  layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
  document.body.style.position = 'static';
  document.body.appendChild(layer);  
  
  var size = { 'height': 600, 'width': 1080 };
  var iframe = document.createElement('iframe');
  iframe.name = 'GeeWiz Editor';
  iframe.id = 'GeeWizEditor';
	iframe.src = KEYwebRoot + 'geeWiz.aspx';
	iframe.style.height = size.height + 'px';
	iframe.style.width = size.width + 'px';
	iframe.style.position = 'fixed';
	iframe.style.zIndex = 3;
	iframe.style.backgroundColor = 'white';
	iframe.style.border = '4px solid silver';
	iframe.frameborder = '0';	
	
	iframe.style.top = ((height + document.documentElement.scrollTop) / 2) - (size.height / 2) + 'px';
	iframe.style.left = (width / 2) - (size.width / 2) + 'px';	
	
  document.body.appendChild(iframe);  
}
function closeGeeWiz()
{
   var we = document.getElementById("GeeWizEditor");
   var ly = document.getElementById("layer3");
   
  document.body.removeChild(we);
  document.body.removeChild(ly);
  document.body.style.position = '';
}
