function IncludeJavaScript(jsFile)
{
   var html_doc=document.getElementsByTagName('head').item(0);
  
   var js=document.createElement('script');
   js.setAttribute('language', 'javascript');
  js.setAttribute('type', 'text/javascript');
  js.setAttribute('src', jsFile);
  html_doc.appendChild(js);
  
  return false; 
}



function stopParent(e){
if (!e) e = window.event;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();}


function ShowNewsletterPanel(fader1,panel1){

var panel = document.getElementById('panel');
if(document.getElementById('fader')){var newdiv=document.getElementById('fader');}
else{var newdiv = document.createElement('div');newdiv.id='fader';document.body.appendChild(newdiv);}

newdiv.onclick=function(){newdiv.style.display = "none";}
panel.onclick=function(e){return stopParent(e);}
newdiv.appendChild(panel);


panel.style.display = 'block';
newdiv.style.display = 'block';

var w=panel.offsetWidth;
var h=panel.offsetHeight;


/* w is a width of the panel*/
if(typeof w == 'undefined'){w = 300;}

/* h is a height of the panel*/
if(typeof h == 'undefined'){h = 300;}

/*get the x and y coordinates to center the newsletter panel*/
var windWidth;
var windHeight;

if(window.innerWidth!=undefined){windWidth = window.innerWidth; windHeight = window.innerHeight;}
else {var D= document.documentElement; if(D){ windWidth=D.clientWidth;windHeight=D.clientHeight;}}

var xc = Math.round((windWidth/2)-(w/2));
var yc = Math.round((windHeight/2)-(h/2));

/* show the panel*/
panel.style.left = xc + "px";
panel.style.top = yc + "px";
}

