function openBMLWindow() {
	openWindowScroll('https://www.securecheckout.billmelater.com/paycapture-content/fetch?hash=3U227YU2&content=/bmlweb/np90drollingiw.html','503','650');
}


function openImageWindow(URL) {
	openWindowNoScroll(URL,'625','603');
}

function openTVWindow(URL) {
	openWindowNoScroll(URL,'625','530');
}

function openEmailFriend(URL) {
	openWindowNoScroll(URL,'625','600');
}
function openGiftEmail(URL) {
	openWindowNoScroll(URL,'625','650');
}
function openGenericEmail(URL) {
	openWindowNoScroll(URL,'625','600');
}
function openRequestEmail() {
	openWindowNoScroll('RequestAFathead.aspx','625','750');
}
function openPromo99Window() {
	openWindowNoScroll('promo99.html','300','490');
}
function openPromo59Window() {
	openWindowNoScroll('promo59.html','300','590');
}

function openPromoBOGOWindow() {
	openWindowNoScroll('bogo.html','300','590');
}



function openWindowScroll(URL,width,height) {
	popupWin = window.open(URL, 'popup', 'menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable,width='+width+',height='+height+',left=70,top=50')
}

function openWindowNoScroll(URL,width,height) {
	popupWin = window.open(URL, 'popup', 'menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable,width='+width+',height='+height+',left=70,top=50')
//	if (window.focus) {
//		popupWin.focus();
//	}
}

var condText;
function clearTextBoxOnCondition(textBox,conditionText){
		if(textBox.value == conditionText) {
		textBox.value="";
		condText=conditionText;
		}
}

function fillTextBoxOnCondition(textBox){
		if(textBox.value == "") {
		textBox.value=condText;
		}
}


function getFlashMovieObject(movieName)
    {
      if (window.document[movieName]) 
      {
          return window.document[movieName];
      }
      if (navigator.appName.indexOf("Microsoft Internet")==-1)
      {
        if (document.embeds && document.embeds[movieName])
          return document.embeds[movieName]; 
      }
      else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
      {
        return document.getElementById(movieName);
      }
    }
    function resetWidget(objectName, playAfterReset)
	{
	    //Reset the wheel on close
	    var flashobj = getFlashMovieObject(objectName);
	    flashobj.Rewind();
	    flashobj.StopPlay();
	    if (playAfterReset)
	    {
	     flashobj.Play();
	     }
	}
function clickButton(e, buttonid){
    var evt = e ? e : window.event;
    var bt = document.getElementById(buttonid);
    if (bt){
        if (evt.keyCode == 13){
            bt.click();
            return false;
        }
    }
}

function popImage(s)
{
    openWindowNoScroll(s,'1024','768');
}
