function RunPriceNotification()
{
	if ( !get_cookie ( "hidead" ) )
	{
		//wait a couple of seconds before changing onunload
		setTimeout("DisplayPriceNotification()",2000);
	}
	else
	{
		injectad();
	}
}

function DisplayPriceNotification()
{
	

	
	
	if ( get_cookie ( "hidead" ) )
	{
		//alert(get_cookie ( "hidead" ));
		injectad();
	}
	else
	{
		if (sEbayBoxContent != "")
		{
			inlinewin=dhtmlwindow.open("broadcastbox", "inline", sEbayBoxContent+sEbayBoxContentPref, "Stop what you're doing!", "width=350px,height=240px,left=450px,top=175px,resize=1,scrolling=1", "recal");
		}
/*		else
		{
			alert("DisplayPriceNotification [" + sEbayBoxContent + "]");	
		}*/
		//inlinewin=dhtmlwindow.open("broadcastbox", "inline", sEbayBoxContentInterrupt+sEbayBoxContent+sEbayBoxContentPref, "Stop what you're doing!", "width=350px,height=215px,left=450px,top=175px,resize=1,scrolling=1", "recal");
	}

}

function injectad()
{
	if (sEbayBoxContent != "")
	{
		document.getElementById('displayad').innerHTML = sEbayBoxContent;
	}
/*	else
	{
		alert("injectad [" + sEbayBoxContent + "]");	
	}*/	//document.getElementById('checkboxdiv').style.display = 'none';
	//document.getElementById('adinterrupttext').style.display = 'none';
}

function adpref()
{
	if (document.getElementById('adpref').checked == true)
	{
		//alert("you checked the box!");
		var current_date = new Date;
		var cookie_year = current_date.getFullYear ( );
		var cookie_month = current_date.getMonth ( )+3;
		var cookie_day = current_date.getDate ( );
		set_cookie ( "hidead", "true", cookie_year, cookie_month, cookie_day, "/", "wii.rocktheconsole.com");
		inlinewin.hide();
		injectad();
	}
}


