document.write('<div style=" line-height:15px;background-color:#FFFFFF; width:350px; height:200px; border:#ccc 1px solid; padding:10px; text-align:left; color:#666666; position:absolute; z-index:1000; left: 12px; display:none;" id="s_div_2"><div style="float:right; width:40px; height:20px; border:#ccc 1px solid; line-height:20px; text-align:center "><a href="javascript:hiden_div_2();" style="color:#990033;">關 閉</a></div><br /><strong style="color:#990033">歡迎索取：美國商業週刊-EDGE 高階主管訓練_網上企管課程。中英對照-免費試閱版</strong><br />------------------------------------------------------------------<br /><br />請提供您的E--mail,我們將寄送試閱資訊給您。<br /><br /><br /><form method="post" action="send_email.php?type=2" onsubmit="return check_email_2();" ><input type="hidden" name="member" id="member_2" />E-mail:<input name="email" id="email_2" type="text" style="width:250px; border:#ccc 1px solid; "/><br /><br /><br /><div align="right"><input type="submit" value="確定送出" style="border:#333 1px solid; background:#990000; line-height:20px;height:23px; color:#fff;" />  <input name="button" type="reset" value="取消" onclick="hiden_div_2()" style="border:#333 1px solid; background:#666; line-height:20px;height:23px; color:#fff;"  /></div></form></div><div style="background-color:#CCCCCC; position:absolute; top:0px; left:0px; z-index:88; display:none;-moz-opacity:0.5;filter:alpha(opacity=50);opacity:0.5;" id="bg_2" onclick="hiden_div_2()"></div>');
function getPageSize(){      
  var xScroll, yScroll;      
  if (window.innerHeight && window.scrollMaxY) {      
    xScroll = document.body.scrollWidth;    
    yScroll = window.innerHeight + window.scrollMaxY;    
  } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac    
    xScroll = document.body.scrollWidth;    
    yScroll = document.body.scrollHeight;    
  } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari    
    xScroll = document.body.offsetWidth;    
    yScroll = document.body.offsetHeight;    
  }    
   
  var windowWidth, windowHeight;    
  if (self.innerHeight) {  // all except Explorer    
    windowWidth = self.innerWidth;    
    windowHeight = self.innerHeight;    
  } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode    
    windowWidth = document.documentElement.clientWidth;    
    windowHeight = document.documentElement.clientHeight;    
  } else if (document.body) { // other Explorers    
    windowWidth = document.body.clientWidth;    
    windowHeight = document.body.clientHeight;    
  }      
      
  // for small pages with total height less then height of the viewport    
  if(yScroll < windowHeight){    
    pageHeight = windowHeight;    
  } else {     
    pageHeight = yScroll;    
  }    
   
  if(xScroll < windowWidth){      
    pageWidth = windowWidth;    
  } else {    
    pageWidth = xScroll;    
  }    
   
  arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)     
  return arrayPageSize;    
}
function getPageScroll() {
			var xScroll, yScroll;
			if (self.pageYOffset) {
				yScroll = self.pageYOffset;
				xScroll = self.pageXOffset;
			} else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
				yScroll = document.documentElement.scrollTop;
				xScroll = document.documentElement.scrollLeft;
			} else if (document.body) {// all other Explorers
				yScroll = document.body.scrollTop;
				xScroll = document.body.scrollLeft;	
			}
			arrayPageScroll = new Array(xScroll,yScroll);
			return arrayPageScroll;
		};

a=getPageSize();
var bg_2 = document.getElementById("bg_2");

bg_2.style.height=a[1]+'px';
bg_2.style.width=a[0]+'px';

bgObj_2 = document.getElementById("s_div_2");
function show_div_2(member_2)
{
  bgObj_2.style.display = "none";
  bg_2.style.display = "none";
  
  document.getElementById("email_2").value = '';
  document.getElementById("member_2").value = member_2;
  a=getPageSize();
  var b = getPageScroll();
  
  bg_2.style.height=a[1]+'px';
  bg_2.style.width=a[0]+'px';
  bgObj_2.style.top=(a[3]-150)/2+b[1]+'px';
  bgObj_2.style.left=(a[2]-350)/2+b[0]+'px';
  bgObj_2.style.display = "";
  bg_2.style.display = "";
  document.getElementById("email_2").focus();
}
function hiden_div_2()
{
  bgObj_2.style.display = "none";
  bg_2.style.display = "none";
}
function check_email_2()
{
  var email_2 = document.getElementById("email_2").value;
  if(email_2 == "")
  {
    alert("пJ E-mailC");
   document.getElementById("email_2").focus();
    return false;
  }

  re = new RegExp("(.+)@(.+[.].+)");

  if(email_2.search(re) == -1)
  {
    alert("E-mail 榡~C");
    document.getElementById("email_2").focus();
	document.getElementById("email_2").select();
    return false;
  }
   return true;
}
