<!--

var winUrl = null;
var childWindow = null;
var pollingChild = 0;

function faqWin(page,section) {
		 if (page) {
		  //check to see if user clicked an anchored link
		  if (! section) {
		  //if not, default to top
		  section = "top";
		  }
		  //define window parameters - url, window name and window attributes
		  winUrl = "http://www.discovercard.com/discover/data/customer/faq/" + page + ".shtml#" + section;
		  var winName = "faq";
		  var winAttributes = "width=560,height=484,scrollbars,status";
		 		 
		  //launch the new window and capture a reference to that window
		  childWindow = window.open(winUrl,winName,winAttributes);
		 	 
		  //bring "focus" to the new window so it appears on top of the window stack
		  childWindow.focus();
		  	
		var bName = navigator.appName;
		if (bName.substring(0,9) == "Microsoft")
		{
			var useragent = navigator.userAgent;
			var pos = useragent.indexOf('MSIE');
			if (pos > -1) {
				bVer = useragent.substring(pos + 5);
				var pos = bVer.indexOf(';');
				var bVer = bVer.substring(0,pos);
			}
			if (bVer == "5.5" || bVer == "6.0")
			{
				pollingChild = 0;
				goToAnchor();
			}
		}
	 }	 
}

function goToAnchor() {
	pollingChild = pollingChild + 1;
	if (childWindow == null)
	{
		return true;
	}
        window.onerror = errorHandler;
	childWindow.location = winUrl;
	if (pollingChild > 2)
	{
		return true;
	}		
	setTimeout("goToAnchor()", 1000);
}

function errorHandler()
{
	return true;
}

//-->


