 



var A_TPL4v;

function customOnLoad( strPageName ) {
	
	if( strPageName == "home" )
		InitialiseScrollableArea();
}

/* Extension written by David G. Miles (http://www.z3roadster.net/dreamweaver/) 
based in part on code written by Thomas Brattli (http://www.bratta.com)*/
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/

function verifyCompatibleBrowser(){ 
	this.ver=navigator.appVersion 
	this.dom=document.getElementById?1:0 
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
	this.ie4=(document.all && !this.dom)?1:0; 
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0; 
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
	return this 
} 
bw=new verifyCompatibleBrowser() 
  
var speed=50 
var loop = false, timer 
 
function ConstructObject(obj,nest){ 
	nest=(!nest) ? '':'document.'+nest+'.' 
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
	this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
	this.up=MoveAreaUp;this.down=MoveAreaDown; 
	this.MoveArea=MoveArea; this.x; this.y; 
	this.obj = obj + "Object" 
	eval(this.obj + "=this") 
	return this 
} 
function MoveArea(x,y){ 
	this.x=x;this.y=y 
	this.css.left=this.x 
	this.css.top=this.y 
} 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
	this.MoveArea(0,this.y-move) 
	if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
	this.MoveArea(0,this.y-move) 
	if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
function PerformScroll(speed){ 
	if(initialised){ 
		//loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
function CeaseScroll(){ 
	loop=false 
	if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
	objContainer=new ConstructObject('divContainer') 
	objScroller=new ConstructObject('divContent','divContainer') 
	objScroller.MoveArea(0,0) 
	objContainer.css.visibility='visible' 
	initialised=true; 

} 

function displayStatusMsg(msgStr) { 
  status=msgStr;
  document.returnValue = true;
}

function preloadImages() { 
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
	var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swapImgRestore() { 
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
}

function swapImage() { 
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);


function mainOnLoad(){
	preloadImagesNav();
	
	if( A_TPL4v != null )
		InitialiseScrollableArea();
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	
	if (document.images /*&& (preloadFlag == true)*/) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_03_over = newImage("images/nav_03-over.jpg");
		nav_04_over = newImage("images/nav_04-over.jpg");
		nav_06_over = newImage("images/nav_06-over.jpg");
		nav_07_over = newImage("images/nav_07-over.jpg");
		nav_08_over = newImage("images/nav_08-over.jpg");
		nav_09_over = newImage("images/nav_09-over.jpg");
		nav_10_over = newImage("images/nav_10-over.jpg");
		
		home_webinars_01_over = newImage("images/home_webinars_01-over.gif");
		
		home_bottom_03_over = newImage("images/home_bottom_03-over.jpg");
		home_bottom_05_over = newImage("images/home_bottom_05-over.jpg");
		home_bottom_07_over = newImage("images/home_bottom_07-over.jpg");
		
		btn_submit_over 	= newImage("images/btn_submit-over.gif");
		
		preloadFlag = true;
	}
}




function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
	obj.visibility=v; }
}


	
function toggle( objRadio, divName, radioOnValue ) {
	
	if ( ( obj = MM_findObj( divName ) ) != null ) {
	
		if (obj.style)
			obj=obj.style; 
	
		if( objRadio.value == radioOnValue ) {			 
			v = 'visible';	
			d = "inline";
		}	
		else {
			v = 'hidden'
			d = "none";
		}	
		
		obj.display = d;
		obj.visibility = v; 
		
	}
}

function showHide( divName, boolShow ) {
	
	if ( ( obj = MM_findObj( divName ) ) != null ) {
	
		try {
		if (obj.style)
			obj=obj.style; 
		}
		catch(e){}
		
		if( boolShow ) {			 
			v = 'visible';	
			d = "inline";
		}	
		else {
			v = 'hidden'
			d = "none";
		}	
		
		
		if( typeof arguments[2] != "undefined")  {
			setTimeout( 'obj.display = d;obj.visibility = v;', arguments[2] );
		}
		else {
			obj.display = d;
			obj.visibility = v;
		}
		
	}
}

function showHideGroup( divNameShow, strDivs ) {
	
	aryDivs = strDivs.split( "," );
	
	for ( i=0; i<aryDivs.length; i++ ) {
		
		boolShowHide = ( divNameShow == aryDivs[i] );
						
		showHide( aryDivs[i], boolShowHide );
	}
}


var aryUserVals = new Array();
	
function showHideWithImage( divName, objA, divNameHead, txtHead ) {

	if( aryUserVals[divName] == undefined )
		aryUserVals[divName] = false;
		
	aryUserVals[divName] = !aryUserVals[divName];
	
	showHide( divName, aryUserVals[divName] );
	
	objNameHead = MM_findObj( divNameHead );
	
	if( aryUserVals[divName] ) {
		
		objA.innerHTML = "<img src=\"site/images/minus_sign.jpg\" border=\"0\" />";	
		objNameHead.innerHTML = "<font color=\"#fb0f00\" />" + txtHead + "</font>";
	}
	else {
		
		objA.innerHTML = "<img src=\"site/images/plus_sign.jpg\" border=\"0\" />";
		objNameHead.innerHTML = "<font color=\"#282828\" />" + txtHead + "</font>";
	}
	
	//objA.innerHTML = ( aryUserVals[divName] ) ? "<img src=\"images/minus_sign.jpg\" border=\"0\" />" : "<img src=\"images/plus_sign.jpg\" border=\"0\" />";
}


function changeSelects( valSel1, valToEnable, div ) {
	
	var boolDisable = ( valSel1 != valToEnable );
	var strShowHide = ( !boolDisable ) ? "show" : "hide";
	
	MM_showHideLayers( div, '', strShowHide );
				
	return boolDisable;
}

function jumpTO( strURL ) {

	if( strURL != "" )
		window.location.href = strURL;
}

function submitForm( valSel1, valToEnable, sel2, div ) {

	var boolDisable = changeSelects( valSel1, valToEnable, div );
	
	if( valSel1 != "" ) {
		
		var strURL = ( boolDisable ) ? valSel1 : sel2.value;
		
		jumpTO( strURL );
		
	}
}

function confirmDelete( strImageName ) {
	return confirm( "Are you sure you want to delete " + strImageName + "?" ) ;
}


var newWin = null; 
function popUp(strURL, strType, strHeight, strWidth) { 
 if (newWin != null && !newWin.closed) 
   newWin.close(); 
 var strOptions=""; 
 if (strType=="console") 
   strOptions="resizable,height="+ 
	 strHeight+",width="+strWidth; 
 if (strType=="fixed") 
   strOptions="status,height="+ 
	 strHeight+",width="+strWidth; 
 if (strType=="elastic") 
   strOptions="toolbar,menubar,scrollbars,"+ 
	 "resizable,location,height="+ 
	 strHeight+",width="+strWidth; 
 newWin = window.open(strURL, 'newWin', strOptions); 
 newWin.focus(); 
}


function fixPNG(myImage) 
{
   var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
   
   if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}



function buildNav() {
  if (!document.getElementsByTagName) return;
  
  var try5 = document.getElementById("nav5");
  try5.className = "hide";
  
  var table = document.createElement("table");
  table.className = "nav2";
  var tbody = document.createElement("tbody");
  table.appendChild(tbody);
  var tr = document.createElement("tr");
  tbody.appendChild(tr);
  
  var lis = try5.getElementsByTagName("li");
  var tds = new Array();
  for (var i=0; i<lis.length; i++) {
      tds[i] = document.createElement("td");
	  if (lis[i].className) {
	  	tds[i].className = lis[i].className;
	  }
	  tds[i].appendChild(lis[i].removeChild(lis[i].firstChild));
      tr.appendChild(tds[i]);
  }
  try5.parentNode.replaceChild(table,try5);

}

function fileNameToString( strFileName ) {
	
	if( strFileName.lastIndexOf('/') == -1 ) //w in
		strFileName = strFileName.substring(strFileName.lastIndexOf('\\')+1,strFileName.lastIndexOf('.'));
	else // mac, linux
		strFileName = strFileName.substring(strFileName.lastIndexOf('/')+1,strFileName.lastIndexOf('.'));
	
	strFileName = strFileName.replace(/_/g,' ');
	strFileName = strFileName.replace(/-/g,' ');
	strFileName = toTitleCase( strFileName );
	
	return strFileName;
}

function toTitleCase(str) {
	
    return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}

function CreateBookmarkLink( title, url ) {

if (window.sidebar) { // Mozilla Firefox Bookmark
	window.sidebar.addPanel(title, url,"");
} 
else if( window.external ) { // IE Favorite
	window.external.AddFavorite( url, title); }
else if(window.opera && window.print) { // Opera Hotlist
	return true; }
}

aryCustomInputs = new Array();

function inputPlaceholder( objInput, strPlaceholderVal ) {
	
	if( aryCustomInputs[objInput.name] == undefined ) 
		aryCustomInputs[objInput.name] = {"strPlaceholderVal":strPlaceholderVal,"objInput":objInput};
		
	if( objInput.value == "" )
		objInput.value = strPlaceholderVal;
	
	objInput.title = strPlaceholderVal;
	
	if( document.all ) {	
		$(objInput.name).addClass('TipsInput' );
		objInput.onfocusout = function (e) {
		  if( objInput.value == "" )
			objInput.value = strPlaceholderVal;
		}	
		objInput.onfocusin = function (e) {
		  if( objInput.value == strPlaceholderVal )
			objInput.value = "";
		  
		  if( objInput.value != strPlaceholderVal && objInput.name=='password') {
		  	objInput.focus();
			var input2= objInput.cloneNode(false); 
			input2.type='password'; 
			objInput.parentNode.replaceChild(input2,objInput); 
			input2.focus();
			//objInput.setAttribute( 'type','password');
		  	objInput.onfocusout = null;
		  }
		}
		/*
		objInput.onkeypress = function (e) {
		  if( objInput.value != strPlaceholderVal && objInput.name=='password') {
		  	var input2= objInput.cloneNode(false); 
			input2.type='password'; 
			objInput.parentNode.replaceChild(input2,objInput); 
			objInput.focus();
			//objInput.setAttribute( 'type','password');
		  	//objInput.onfocusout = null;
		  }
		}*/
	}
	else {	
		objInput.addClass('TipsInput' );
		objInput.addEventListener( 'blur',function (e) {
		  if( objInput.value == "" )
			objInput.value = strPlaceholderVal;
		},false);
		objInput.addEventListener( 'focus',function (e) {
		  if( objInput.value == strPlaceholderVal )
			objInput.value = "";
		},false);
		objInput.addEventListener( 'keydown',function (e) {
		  if( objInput.value != strPlaceholderVal && objInput.name=='password') {
		  	objInput.type='password';
			objInput.removeEventListener( 'blur' );
		  }
		},false);
	}
}


function submitFormPlaceholder( frm, boolAutoSubmit ) {
	
	var value, obj;
		
	for( var i in aryCustomInputs ) {
		
		value 	= aryCustomInputs[i].strPlaceholderVal;
		obj 	= aryCustomInputs[i].objInput;
		
		if( typeof( aryCustomInputs[i] ) != "function" && obj != undefined && obj.value == value )  {
			//alert( value );
			obj.value = "";
		}
	}
	
	if( boolAutoSubmit )
		frm.submit();
}

function formatPhone( str ) {

	var newphone = str.replace(/[^\d]/g, "");
	var phonematches = newphone.match(/^(\d{0,3})(\d{0,3})(\d{0,4})/);
	
	if (phonematches[1].length > 0) 
		newphone = "" + phonematches[1];
	
	if (phonematches[1].length == 3) {
	  
	  newphone += "-" + phonematches[2];
	  
	  if (phonematches[2].length == 3)
		newphone += "-" + phonematches[3];
	}
	
	return newphone;
}	

function formatDate( str ) {

	var newdate = str.replace(/[^\d]/g, "");
	var datematches = newdate.match(/^(\d{0,2})(\d{0,2})(\d{0,4})/);
	
	if (datematches[1].length > 0) 
		newdate = "" + datematches[1];
	
	if (datematches[1].length == 2) {
	  
	  newdate += "/" + datematches[2];
	  
	  if (datematches[2].length == 2)
		newdate += "/" + datematches[3];
	}
	
	return newdate;
}	

function isValidEmail( strEmail ) {
	var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	return filter.test(strEmail);
}

function fbs_click_force( u ) {
        t=document.title;
        window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
        return false;
}

var downStrokeField;
	
function autojump(fieldName,nextFieldName,fakeMaxLength) {
	
	var myForm=document.forms[document.forms.length - 1];
	var myField=myForm.elements[fieldName];
	myField.nextField=myForm.elements[nextFieldName];
	
	if (myField.maxLength == null)
	   myField.maxLength=fakeMaxLength;
	
	myField.onkeydown=autojump_keyDown;
	myField.onkeyup=autojump_keyUp;
}

function autojump_keyDown() {
	this.beforeLength=this.value.length;
	downStrokeField=this;
}

function autojump_keyUp() {
	if (
	   (this == downStrokeField) && 
	   (this.value.length > this.beforeLength) && 
	   (this.value.length >= this.maxLength)
	   ) {
	   this.nextField.focus();
	}
	downStrokeField=null;
}


var baseHref = window.location.href;

function getBaseURL() {

	var baseHref;
	var aryHref = top.location.href.split( '#' );
	
	if( aryHref.length ) 
		baseHref = aryHref[0];	
	else
		baseHref = top.location.href;
		
	return baseHref;
}
	
function loadVideo( siteRoot, videoID, videoName ) {
	
	window.location.href = getBaseURL() + '#/video/' + videoID + '/' + videoName;
	Mediabox.open( siteRoot + '/support_group_video/id/' + videoID, 'video', '635 634' );
}

function loadUpload( siteRoot, boolRedirect ) {

	Mediabox.open( siteRoot + '/video_upload/redirect/' + boolRedirect, 'video', '635 704');
}
	
function loadVideoBurritoBoredom( siteRoot, videoID ) {
	
	//var aryVideoID = elementID.split( '_' );
	//var videoID = aryVideoID[1];
	
	window.location.href = baseHref + '#/video/' + videoID;
	Mediabox.open( siteRoot + '/video/id/' + videoID, 'video', '644 733' );
}
	
function loadVideoBurritoBoredomInternal( siteRoot, videoID ) {
	
	//var aryVideoID = elementID.split( '_' );
	//var videoID = aryVideoID[1];
	
	window.location.href = siteRoot + '/video/id/' + videoID;
}
	
function closeVideoInit() {
	
	var aryHref = top.location.href.split( '#' );
	
	if( aryHref.length > 1 ) {
		var baseHref = aryHref[0];		
		window.history.back();
		//top.location.href = baseHref;
	}
	
	return false;
}
	
function closeVideo() {
	
	closeVideoInit();
	top.Mediabox.close();
	
	return false;
}

function loadSend2Friend( siteRoot, boolRedirect, strType ) {

	top.Mediabox.open( siteRoot + '/Send_to_a_Friend/redirect/' + boolRedirect + '/stfType/' + strType, 'send2friend', '635 601');
	addGoogleEvent( strType, "SendToFriend" );
}

function addGoogleEvent( category, action ) {
	
	try {
	
	if( $defined( pageTracker ) )
		pageTracker._trackEvent( category, action );
	}
	catch( e ) {}
}

function addToFacebook( t, u ) {
		
	//t = t.replace( '?', '&63;' );
	u = u.replace( '?', '*question*' );
	//t=document.title=origTitle;
	u=u +  '/c/' + new Date().getTime();
	//alert(u);
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
}

function addToFacebookSupportGroup( u ) {
		
	//t=document.title=origTitle;
	t = "Join the zillions of Burrito Boredom sufferers in their pursuit of a cure today! We're making it easy to search for a cure, and even giving away burritos for a year!";
	addToFacebook( t, u + '/t/' + t );	
	addGoogleEvent( "SupportGroup", "Facebook" );
}	

function addToFacebookFooter( u ) {
		
	//t=document.title=origTitle;
	t = "If your definition of quality Mexican food starts with 'beans' and ends with 'rice,' you're probably suffering from Burrito Boredom. It's okay; zillions of Americans are affected by this dull disorder. And there's hope! Food Lovers Fighting Burrito Boredom (FLFBB) is putting an end to Burrito Boredom, for your sake. Get your diagnosis, find a cure by crafting an entree and getting a Qdoba coupon, and then enter to win burritos for a year by uploading your own survival story!";
	addToFacebook( t, u + '/t/' + t );	
	addGoogleEvent( "Footer", "Facebook" );
}	

function addToTwitter( t ) {
	
	window.open('http://twitter.com/home?status=' + encodeURIComponent(t),'twitter','toolbar=0,status=0,width=800,height=600');		
}

function addToTwitterSupportGroup( u ) {
	
	addToTwitter( 'Are you suffering from Burrito Boredom? There is a support group that can help you. Find out more here: ' + u );
	addGoogleEvent( "SupportGroup", "Twitter" );
}

function addToTwitterFooter( u ) {
	
	addToTwitter( 'Burrito Boredom affects zillions, but FLFBB is providing hope to many. Find out how you can overcome it today: ' + u );
	addGoogleEvent( "Footer", "Twitter" );
}			
		
function showCoupon( u ) {

	u = u.replace("coupon","Coupon");
	//top.Mediabox.close();
	top.Mediabox.open(u, 'Coupon', '652 588');
	addGoogleEvent( "Results", "Coupon" );
}

function getCouponImage( email, name, receiveEmails, menuitem, base, mainingredients, addins, salsas, sauce ) {

	email 			= scrubCouponVar( email );
	name 			= scrubCouponVar( name );
	receiveEmails 	= scrubCouponVar( receiveEmails );
	menuitem 		= scrubCouponVar( menuitem );
	base 			= scrubCouponVar( base );
	mainingredients = scrubCouponVar( mainingredients );
	addins 			= scrubCouponVar( addins );
	salsas 			= scrubCouponVar( salsas );
	sauce 			= scrubCouponVar( sauce );

	// to test
	// http://www.denverwebcollective.com/client/motive/burritoboredom/coupon/email/info@collectivesessions.com/item/aa/base/bb/ingredients/cc/addins/dd/salsas/ee/sauce/ff

	u = 'http://www.denverwebcollective.com/client/motive/burritoboredom/coupon/email/' + email + '/name/' + name + '/receiveEmails/' + receiveEmails + '/item/'+menuitem+'/base/'+base+'/ingredients/'+mainingredients+'/addins/'+addins+'/salsas/'+salsas+'/sauce/'+ sauce;

	//top.frames[0].src = u;
	top.Mediabox.setup( false );
	//window.open(u);
	//alert( u );
	showCoupon( u ); 
			
	//alert (  + "\n" +  base + "\n" +  mainingredients + "\n" +  addins + "\n" +  salsas + "\n" +  sauce );
	//alert ( menuitem + "\n" +  base + "\n" +  mainingredients + "\n" +  addins + "\n" +  salsas + "\n" +  sauce );
}

function getCoupon( menuitem, base, mainingredients, addins, salsas, sauce ) {

	menuitem 		= scrubCouponVar( menuitem );
	base 			= scrubCouponVar( base );
	mainingredients = scrubCouponVar( mainingredients );
	addins 			= scrubCouponVar( addins );
	salsas 			= scrubCouponVar( salsas );
	sauce 			= scrubCouponVar( sauce );

	u = 'http://www.denverwebcollective.com/client/motive/burritoboredom/Get_Coupon/item/'+menuitem+'/base/'+base+'/ingredients/'+mainingredients+'/addins/'+addins+'/salsas/'+salsas+'/sauce/'+ sauce;
	
	top.Mediabox.open( u, 'get_coupon', '635 292');
	//getCouponImage( menuitem, base, mainingredients, addins, salsas, sauce )
}

function scrubCouponVar( varCoupon ) {

	if( varCoupon == "" )
		varCoupon = " ";
	else
		varCoupon = encodeURIComponent( varCoupon );

	return varCoupon;
}
	
function addShareInline( parent, videoID ) {
	parent.grab( $('share_inline'), 'top' );
	$('share_inline').setStyle( 'display', 'inline' );
	currentShareVideoID = videoID;
}

function loadSend2FriendShare ( id, siteRoot, boolRedirect ) {
	
	closeVideoInit();
	//top.Mediabox.stop();
	loadSend2Friend( siteRoot, boolRedirect, 'support-video' );
}

function addToFacebookShare ( id, u ) {
	t = "Join the zillions of Burrito Boredom sufferers in their pursuit of a cure today! We're making it easy to search for a cure, and even giving away burritos for a year!";
	addToFacebook( t, u + '/t/' + t );	
	addGoogleEvent( "SupportGroupVideo", "Facebook" );
}

function addToTwitterShare ( u ) {
	
	addToTwitter( 'Are you suffering from Burrito Boredom? There is a support group that can help you. Find out more here: ' + u );
	addGoogleEvent( "SupportGroupVideo", "Twitter" );
}


