var serverName = 'http://www.pricefight.com'

function writeBookmarkLink(url, title, start, end, bookmarkText) {
	if (window.external) {
		document.write(start + '<a class="bookmark" title="Save this page to compare prices later." href="javascript:CreateBookmarkLink(\'' + serverName + url + '\', \'' + title + '\')");">' + bookmarkText + '</a>' + end);
	} else if (window.opera && window.print) {	
		document.write(start + '<a class="bookmark" title="Save this page to compare prices later." href="javascript:CreateBookmarkLink(\'' + serverName + url + '\', \'' + title + '\')");">' + bookmarkText + '</a>' + end);
	}
}

function CreateBookmarkLink(url, title) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title);
	} else if(window.opera && window.print) { // Opera Hotlist
		return true;
	}
}

function writePrintLink(title, start, end) {
	if (window.print) {
		document.write(start + '<a class="print" title="Print product details, reviews and prices." href="javascript:window.print()">Print ' + title + '</a>' + end);
	}
}

function toggleHide(divId) {
	var div = document.getElementById(divId);
	if (div.style.display == 'none') {
		div.style.display = '';
	} else {
		div.style.display = 'none';
	}
}
