// resize DIV via Javascript
var w3c = (document.getElementById) ? 1:0;
var ns4 = (document.layers) ? 1:0;
var ie4 = (document.all) ? 1:0;
function setHeight(newH){
	//document.getElementById.madrid.style.height = 300+"px";
	var nsLayer = eval("document.bacardi");
	!ns4?document.getElementById("bacardi").style.height=newH:void(0);
 	//myDiv.style.height=300+'px';
}
function setFlashSize(newH){
	setFlashHeight(newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}

//
/* open new centered window with scrolling ability */
/* USAGE: javascript:openWin('filename.html','windowname', width, height); */


function openWin(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=yes,toolbar=no,status=yes,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
        window.status = "";
}




/* open new centered window without scrolling ability */
/* USAGE: javascript:openPop('filename.html','windowname', width, height); */


function openPop(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=no,toolbar=no,status=yes,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
}


// FLASH TRACKING TO WEBTRENDS
var dcs_imgarray = new Array;
var dcs_ptr = 0;
function dcsTrackEvent(URL)
{
	function dcs_createImage(dcs_src)
{
dcs_imgarray[dcs_ptr] = new Image;
dcs_imgarray[dcs_ptr].src = dcs_src;
dcs_ptr++;

}

var P="";
var sCurrent ="";
var dCurrent = new Date();
sCurrent=dCurrent;
// add the new parameters
P += "dcsuri="+escape(URL);
P += "&dcsdat="+escape(sCurrent);

dcs_createImage("./_img/tracking.gif?"+P);
// dcs_createImage("http://www.tacobell.com/_img/tracking.gif?"+P);
}
