// useStyleSheet.js
// write the right CSS entry depending on the entry page
//		the entryRef will be in the query string the first time, from the redirects' index.html
//				such as /a/illustrator/index.html
//		after than it'll only be in the cookie, so all the pages for that person look the same
//		to kill the cookie, have to put "admin" or "reset" in the querystring, or go to masterfolio/a/index.html

switch ((queryString('entryRef')))
{
	case 'illustrator':
			writeCookie('entryRef','illustrator',365);
			break;    
	case 'animator':
			writeCookie('entryRef','animator',365);
			break;    
	case 'writer':
			writeCookie('entryRef','writer',365);
			break;    
	case 'painter':
			writeCookie('entryRef','painter',365);
			break;    
	case 'reset':
			killCookie('entryRef');
		  	break;
	case 'admin':
			killCookie('entryRef');
		  	break;
	default:
}

switch ((readCookie('entryRef')))
{
case 'illustrator':
	document.write('<link rel="stylesheet" type="text/css" href="/css/illustrator.css">');
	break;    
	case 'animator':
		document.write('<link rel="stylesheet" type="text/css" href="/css/animator.css">');
		break;    
	case 'writer':
		document.write('<link rel="stylesheet" type="text/css" href="/css/writer.css">');
		break;    
	case 'painter':
		document.write('<link rel="stylesheet" type="text/css" href="/css/painter.css">');
		break;    
	default:
	  document.write('<link rel="stylesheet" type="text/css" href="/css/masterfolio.css">');
}
