// JScript File
function bookmark()
{
    if (window.external)
    {
        window.external.AddFavorite(location.href, document.title);
    }
    else
    {
        alert("CTRL+D to add a bookmark to this site.");
    }
}


function showVoucher(id, url)
{
	document.getElementById('Voucherhide'+id).style.display='none';
	document.getElementById('Vouchershow'+id).style.display='block';
	new_win = window.open(url,'_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
	new_win.blur();
}

function hideVoucher(id)
{
	document.getElementById('Voucherhide'+id).style.display='block';
	document.getElementById('Vouchershow'+id).style.display='none';
	
}

function showComments(id)
{
	document.getElementById('commentsPanel'+id).style.display='block';		
}

function hideComments(id)
{
	document.getElementById('commentsPanel'+id).style.display='none';		
}

function showAddComments(id)
{
	document.getElementById('addcomments'+id).style.display='block';		
}

function hideAddComments(id)
{
	document.getElementById('addcomments'+id).style.display='none';		
}




function revealAll(url)
{
	limit=document.getElementById('limit').value;
	for(i=1;i<limit;i++)
	{
	  document.getElementById('Voucherhide'+i).style.display='none';
	  document.getElementById('Vouchershow'+i).style.display='block';
	}
	new_win = window.open(url,'_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
	new_win.blur();
	document.getElementById('showall_button').style.display='none';
	document.getElementById('scroll_button').style.display='block';
}

function WorkingClick(id)
{

	window.location('http://www.myukvouchercodes.com/retailer_vouchers.aspx?working=true&oid='+id,'_parent','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');

}

function NotWorkingClick(id)
{

	window.location('http://www.myukvouchercodes.com/retailer_vouchers.aspx?working=false&oid='+id,'_parent','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');

}

function ShowImage(url)
{


//alert(document.aspnetForm.ctl00_ContentPlaceHolder1__offer__image.src)
//alert(url);
	 window.open(document.aspnetForm.ctl00_ContentPlaceHolder1__offer__image.src, '_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=400,height=400');
	

}
