// Javascript file: include.js



function onFirstLoad() {
	window.resizeTo(1024,screen.height - 50)
	onAnyLoad()
}

function onAnyLoad() {
	// display social bookmarks only if javascript enabled
	document.getElementById('social_bookmarks_wrapper').style.display = 'block'; 
}

// currently not used
function is_cookiesEnabled() {
	var cookieEnabled=(navigator.cookieEnabled)? true : false
	//if not IE4+ nor NS6+
	if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ 
		document.cookie="testcookie"
		cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false
	}
	return cookieEnabled;
}

function routeToShoppingCart() {
	window.location="review_cart.php";
}

function rollImage(img_name, img_src)      {
   document[img_name].src = img_src;
}

function cellOverEffect(object) {
  if (object.className == 'dataTableHeadingCell') object.className = 'dataTableHeadingCellOver';
}

function cellOutEffect(object) {
  if (object.className == 'dataTableHeadingCellOver') object.className = 'dataTableHeadingCell';
}

function rowOverEffect(object) {
  if (object.className == 'dataTableRow') object.className = 'dataTableRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'dataTableRowOver') object.className = 'dataTableRow';
}

//http://labnol.blogspot.com/2006/01/add-to-favorites-ie-bookmark-firefox.html

 function CreateBookmarkLink(title, url) {
 	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 onLoad_loginPage()  {
	//document.write('inside function onLoad_loginPage');
	document.cookie="BAtestcookie";
	cookieEnabled=(document.cookie.indexOf("BAtestcookie")!=-1)? true : false;
	
	//document.getElementByID("wrapLeftColumn").style.width = a + "px";
	//document.getElementByID("wrapContent").style.width = b + "px";
	
	if (cookieEnabled) {
		document.getElementById("login_form").style.display = 'block';	
		document.getElementById("no_cookies_java").style.display = 'none';
	} else {
		document.getElementById("login_form").style.display = 'none';	
		document.getElementById("no_cookies_java").style.display = 'block';
	}
}