<!--

reportbadi = 0

tempX = 0
tempY = 0

function showDiv(objectID) {
var theElementStyle = document.getElementById(objectID);
if(theElementStyle.style.display == "block"){
theElementStyle.style.display = "none";
}else{
theElementStyle.style.display = "block";}
}

function GetXmlHttpObject(handler){	
 var objXMLHttp=null	
 if (window.XMLHttpRequest){	
  objXMLHttp=new XMLHttpRequest()	
 }else if (window.ActiveXObject){	
  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")	
 }	
 return objXMLHttp	
}

sending_div = ""

function reportbad_click_done(){	
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
	var t = xmlHttp.responseText
	var di = document.getElementById(sending_div)
	di.style.visibility = "hidden"
 }	
}

function close_popup(div){
	var di = document.getElementById(div)
	di.style.visibility = "hidden"	
}

function reportbad_click(div,id,outcome,type,time,key){
	sending_div = div
	var di = document.getElementById(div)
	di.innerHTML = 'Thanks alot for your feedback <BR><BR><a href="javascript: close_popup('+"'"+div+"'"+')">[close popup]</a>'
	
	xmlHttp=GetXmlHttpObject()
	var url="/report_bad.php?id="+id+"&type="+type+"&outcome=" + outcome+"&key="+key+"&time="+time
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=reportbad_click_done
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)	
	
}

function reportbad(div,id,name,type){

	reportbadi = reportbadi + 1
	
	var di = document.getElementById(div)
	di.style.visibility = "visible"

	
}



function installSearchEngine() {
 if (window.external && ("AddSearchProvider" in window.external)) {
   // Firefox 2 and IE 7, OpenSearch
   window.external.AddSearchProvider("http://www.100bigcoupons.com/100bc_search.xml");
 }
}


function showSearchExtension(){
	var show_100bc_firefox_search_plugin_add = 'none';
	if (window.external && ("AddSearchProvider" in window.external)) {
	   // Firefox 2 and IE 7, OpenSearch
	  show_100bc_firefox_search_plugin_add = '';
	}
	document.getElementById('100bc_firefox_search_plugin_add').style.display = show_100bc_firefox_search_plugin_add;
}

function Add_To_Favorite() 
{ 
if (window.external) 
// if the browser is IE open the add favorite window
{
external.AddFavorite(location.href, document.title)
// Add the document location and title to the AddFavorite window
}
else 
// Display and alert box for any other browser.
{
alert("Sorry, your browser doesn't support this feature." + 
"\nPlease select Favorites or Bookmarks from your browsers toolbar.");
}
}
// -->
