var url2 = 'www.baseballcardshopper.com';
function visi(nr)
{
	if (document.layers)
	{
		vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'
		document.layers[nr].visibility = vista;
	}
	else if (document.all)
	{
		vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'	: 'hidden';
		document.all[nr].style.visibility = vista;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.visibility == 'hidden') ? 'visible' : 'hidden';
		document.getElementById(nr).style.visibility = vista;

	}
}

function changeOp(opacity, objectid) {
                    var object = document.getElementById( objectid ).style;
                    object.opacity = (opacity / 100);
                    object.MozOpacity = (opacity / 100);
                    object.KhtmlOpacity = (opacity / 100);
                    object.filter = "alpha(opacity=" + opacity + ")";
}

function forward(url) {

}

function showWarning(url) {
	scroll(0,0);
	url2 = url;
	var winW = 630;
	var winH = 460;
	if (navigator.appName=="Netscape") {
		winW = window.innerWidth;
		winH = window.innerHeight;
	}else if (navigator.appName.indexOf("Microsoft")!=-1) {
		winW = document.body.offsetWidth;
		winH = document.body.offsetHeight;
	}else{
		winW = document.body.offsetWidth;
		winH = document.body.offsetHeight;
	}
	var cenl=(winW/ 2)-175;
	var cent=(winH / 2)-85;
	cenl = cenl + 'px';
	cent = cent + 'px';
	document.getElementById('warning').style.left = cenl;
	document.getElementById('warning').style.top = cent;
	document.getElementById('warning').style.zIndex = '3';
	document.getElementById('dimmer').style.zIndex = '1';
	visi('warning');
	visi('dimmer');
}

function hideWarning() {
	document.getElementById('warning').style.zIndex = '-1';
	document.getElementById('dimmer').style.zIndex = '-1';
	visi('warning');
	visi('dimmer');
}

function forward() {
	var url = 'http://' + url2;
	window.open(url,'name');
	document.getElementById('warning').style.zIndex = '-1';
	document.getElementById('dimmer').style.zIndex = '-1';
}


var myPopupWindow = null;
function popupWindow( url, width, height ) {
		
			var nWidth = width;
			var nHeight = height;
			var x = (screen.width - nWidth) / 3;
			var y = (screen.height - nHeight) / 3;		

			var optionString = "scrollbars=yes,location=no,resizable=yes,status=no,";
			optionString += "height=" + nHeight + ",width=" + nWidth;
			optionString += ",screenX="+ x +",screenY="+ y +",top="+ y +",left="+ x;

		    if (! myPopupWindow || myPopupWindow.closed ) {
		    	myPopupWindow = window.open(url,"myPopupWindow",optionString);
		    } else {
		    	// window already exists, so bring it forward
			    myPopupWindow.location.href=url;
			    myPopupWindow.focus();
			}
		
	}
function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject

function changeObjectDisplay(objectId, newDisplay) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.display = newDisplay;
	return true;
    } else {
	// we couldn't find the object, so we can't change its visibility
	return false;
    }
} // changeObjectVisibility



function inter2(content  ) {
	scroll(0,0);
	//document.getElementById('popupTitle').innerHTML = '';
	showPopWin( content  , 400, 200, 'bogus',300, 50);
	changeOpac(40,'popupMask');
	return false;
}


function changeOpac(opacity, objectid) {
	    var object = document.getElementById( objectid ).style;
	    object.opacity = (opacity / 100); 
	    object.MozOpacity = (opacity / 100); 
	    object.KhtmlOpacity = (opacity / 100); 
	    object.filter = "alpha(opacity=" + opacity + ")";

}	
function doFDA(){  
	  var content= '';  
	  var styleObject = getStyleObject('popupInner');
	  styleObject.border  = "1px solid blue";
  	content += '<div style="margin:30px 10px 10px 10px;width:380px;float:left;text-align:center;">';
   	content += '<p style="color:#000000;font-weight:bold;font-family: Verdana;">You are now leaving XYZAL.com</p><p style="color:#000000;font-weight:normal;font-family: Verdana;">  This link is provided as a service to our Web site visitors. It will take you to a site maintained by a third party who is solely responsible for its content. UCB, Inc. and sanofi-aventis U.S. LLC are not responsible for the contents of any such site or any further links from such site.</p><p style="color:#000000;font-weight:bold;font-family: Verdana;">Click "Yes" to proceed to the third-party Web site or "No" to return to xyzal.com.</p>';
   	content += '<br><p><a href="#" onclick="location.href=\'http://www.fda.gov/medwatch\'" ><img src="/images/continue3_blue.gif" border="0"></a> &nbsp; &nbsp; <a href="#" onclick="hidePopWin();showVideo();return false;"><img src="/images/cancel3_blue.gif" border="0"  ></a></p>';
	
	
	
   			 
	  content += '</div>';
	  inter2( content );
}	

function hideVideo(){
	changeObjectDisplay ( "theVideo", "none");
}
function showVideo(){
	changeObjectDisplay ( "theVideo", "block");
}
