// 
// Project  Name: fitpregnancy.com
// File / Folder: /docs/2007/buyersguide/js/category.js
// File Language: javascript
// Copyright (C): 2007 Richard Group, Inc.
// First  Author: Liam Bryan
// First Created: 2007.10.24 13:00:19
// Last Modifier: Liam Bryan
// Last Modified: 2007.10.24 13:01:02

function open_sesame (myurl) {
	window.open(myurl,'window_name','menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,location=no,height=620,width=750,dependent=yes');
}
function findSelected(id) {
	switch(id) {
		case '896':
			return 'gadgets';
		case '897':
			return 'carriers';
		case '898':
			return 'strollers';
		case '899':
			return 'carseats';
		case '900':
			return 'nursing';
		case '901':
			return 'diaperbags';
		case '902':
			return 'feeding';
		case '903':
			return 'bathing';
		case '904':
			return 'funstuff';
		case '905':
			return 'petitechic';
		case '906':
			return 'nursery';
		case '907':
			return 'layette';
		default:
			return id;
	}
}
function addItem(id) {
	var saved = getCookie('favorites');
	if(saved == null) {
		document.cookie = 'favorites='+id+'#;path=/';
	}
	else if(saved.indexOf(id+'#') == -1) {
		saved += id+'#';
		document.cookie = 'favorites='+saved+';path=/';
	}
}
function getCookie(name) {
	var cookies = document.cookie.split('; ');
	for(var n = 0; n < cookies.length; ++n) {
		var pos = cookies[n].indexOf('=');
		if(name == cookies[n].substring(0, pos) ) {
			return cookies[n].substring(pos+1);
		}
	}
	return null;
}
