function popup(url, gen, yuk){
	EWin = eval(window.open("","quoted","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=" + gen + ",height=" + yuk + ",screenX=5,screenY=5,top=5,left=5"));
	EWin.location.href = url;
	EWin.focus();
}

function popup_toolbar(url, gen, yuk){
	EWin = eval(window.open("","quoted","toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=" + gen + ",height=" + yuk + ",screenX=5,screenY=5,top=5,left=5"));
	EWin.location.href = url;
	EWin.focus();
}

function popup_disclaimer(url){
	if(! confirm('You are about to visit a website outside of the Body1 network. Neither Body1, Inc. nor its sponsors can be held responsible or liable for any content found on other sites. Please familiarize yourself with this other website\047s Privacy Policy as it differs from ours.  To return to MedTech1.com, click the \047Cancel\047 button.')) return;
	EWin = eval(window.open("","quoted","toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizeable=1"));
	EWin.location.href = url;
	EWin.focus();
}

// Called by index.cfm

function newAdPopUp()
{
	adwindow=window.open("http://www.reflux1.com/include/ad_reflux.cfm", 'vidwin', "scrollbars=no,menubar=no,toolbar=no,status=no,width=200,height=230,resizable=no")
}


function newSurveyPopUp()
{
	surveywindow=window.open("http://www.body1.com/common/regsurvey.cfm", 'surveywin', "scrollbars=yes,menubar=no,toolbar=no,status=no,width=488,height=550,resizable=no")
}


function takePoll(){

window.open('/poll/Poll10.cfm', 'pollwin', 'width=300,height=275');

}

// survey popups called in research_center/cond20.cfm

function newSurveyPopUp2()
{
	surveywindow=window.open("http://www.wounds1.com/care/survey10.cfm", 'surveywin', "scrollbars=yes,menubar=no,toolbar=no,status=no,width=488,height=500,resizable=no")
}

function newSurveyPopUp3()
{
	surveywindow=window.open("http://www.wounds1.com/care/dfu_surv10.cfm", 'surveywin', "scrollbars=yes,menubar=no,toolbar=no,status=no,width=488,height=500,resizable=no")
}



// called by genzdiag

function newPopUp(url,name)       
{    
pressWin = window.open(url,name,"scrollbars=no,menubar=no,toolbar=no,status=no,width=315,height=250,resizable=no")
} 

function newPopUp2(url,name)       
{    
pressWin = window.open(url,name,"scrollbars=no,menubar=no,toolbar=yes,status=no,width=315,height=535,resizable=no")
} 

function newPopUp3(url,name)       
{    
pressWin = window.open(url,name,"scrollbars=no,menubar=no,toolbar=yes,status=no,width=315,height=350,resizable=no")
}

function popup_chat( site ) {
	var link = 'http://www.body1.com/ModeratedChat/Audience/Initialize.cfm?SiteName=' + site;
	var height = 600;
	var width = 700;
	EWin = eval(window.open("chat","quoted","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=" + width + ",height=" + height + ",screenX=5,screenY=5,top=5,left=5"));
	EWin.location.href = link;
	EWin.focus();
}


function videoPopUp(url,name)       
{    
pressWin = window.open(url,name,"scrollbars=no,menubar=no,toolbar=no,status=no,width=500,height=550,resizable=no")
} 

function newVideoPopUp(url, gen, yuk)       
{
	pressWin = eval(window.open("","quoted","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=" + gen + ",height=" + yuk + ",screenX=5,screenY=5,top=5,left=5"));
	pressWin.location.href = url;
	pressWin.focus();    
} 

//PopUp
// Specify the width and height of new popunder window (in pixels).
var width = '250'; 
var height = '250';


// Load new PopUnder only once per browser session? (0=no, 1=yes)
// Putting 0 will cause the Popunder to load every time page is loaded
// Specifying 1 will cause it to load only once per session
var one_time=1

// That's it! Don't edit the code below unless you're really good. :-P //

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if the cookie exists
      offset += search.length
      //set the index of beginning value
      end = document.cookie.indexOf(";", offset);
      
    if (end == -1) // set the index of the end of cookie value
         end = document.cookie.length;
         returnvalue = unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
// instantiate date
var date = new Date();
// set timeout to 30 minutes
var burn = date.setTime(date.getTime()+(30*60*1000));
var expires=";expires="+date.toUTCString();


if (get_cookie('popunder')==''){
load_pop_power()
document.cookie="popunder=yes" + expires;
}

//if (get_cookie('popover')==''){
//load_pop_power2()
//document.cookie="popover=yes" + expires;
//}


}

function load_pop_power(){
win2 = window.open("http://www.uterus1.com/include/zipcode/u1zipcode.html", "bw", 'scrollbars=yes, resizable=yes, toolbar=no,' + 'menubar=no, status=yes, location=no, left=85, top=20, height= '+ height +' , width='+ width)
win2.blur()
window.focus()
}

function load_pop_power2(){
win3 = window.open("http://www.fibroids1.com/survey/quickpoll10content.cfm?init=1", "bw2", 'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=0, width=275, height=239, left=50, top=50')
}

/*
if (one_time==0)
load_pop_power()
else
loadornot()
*/
