// prevent this site from being displayed within some other site's frameset
if(self!=self.top) self.parent.location="/";

// provide the function responsible for opening the email popup window 
// a call to this function is written into an aspx page via server-side scripting whenever mail is available for the popup
function ShowPopupEmail(){
  var objDate=new Date();
  var EmailPopup=window.open('/AWC_Common_v2/aspx/Tools/EmailTools/EmailPopup.aspx?t='+objDate.valueOf(),'EmailPopUp','scrollbars=yes,resizable=yes,menubar=no,toolbar=no,left=0,width=720px,height=500px');
  EmailPopup.focus();
  }
  
// function to spawn email client
// pass comma separated strings
// useage: <a href="javascript:js_mail('somesite.com?subject=Website Inquiry','username')">username@somesite.com</a>
var domain;
var id;
function js_mail(domain, id) {
  location.href = "mailto:" + id + "@" + domain;
  }

// generic verification prompt for delete icons
// sample usage: objImageButton.Attributes.Add("onclick", "return DeleteVerificationPrompt();")
function DeleteVerificationPrompt(){
  return window.confirm("You are about to delete this item. Continue?");
  }

//recursively accumulate offset top distances through the DOM container hierarchy until parameter 'container' object is reached
//gives the absolute window y coordinate
function GetOffsetTop(e,container){

  
  var iOffsetTop=e.offsetTop;
  if (container==e) return iOffsetTop;
  if (e.offsetParent) iOffsetTop=iOffsetTop+GetOffsetTop(e.offsetParent,container);
  return iOffsetTop;
  }

//recursively accumulate offset left distances through the DOM container hierarchy until parameter 'container' object is reached
//gives the absolute window x coordinate
function GetOffsetLeft(e,container){
 
  var iOffsetLeft=e.offsetLeft;
  if (container==e) return iOffsetLeft;
  if (e.offsetParent) iOffsetLeft=iOffsetLeft+GetOffsetLeft(e.offsetParent,container);
  return iOffsetLeft;
  }

// function to popup a window
function poptastic_NoMenu(page){
  var poptastic=window.open(page,'Poptastic','scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no,width=760px,height=420px');
  poptastic.focus();
  }

