var fullURL = getFullURL();
var cssPath = '/ekmps/shops/vickydavies/resources/Styles/';
var showPageQuery = '?function=WEBPAGE';//had to seperate because & doesn’t validate

var resultArr = getIsHomeAndPageURL();
var isHome  = resultArr[0];
var pageURL = resultArr[1];
var showIntro = resultArr[2];


if( !showIntro )
{
	writeCSSToPage( cssPath + 'global-text.css');
	writeCSSToPage( cssPath + 'header.css');
	writeCSSToPage( cssPath + 'footer.css');
	writeCSSToPage( cssPath + 'side-nav.css');
	writeCSSToPage( cssPath + 'top-nav.css');
}


if( isHome  ||   fullURL.indexOf( '-p.asp' ) != -1 ) // home or projects pages
{
	if( !showIntro )
	{
		writeCSSToPage( cssPath + 'cloud-zoom.css');
	}
}


if( isHome ) // just home
{
	if( showIntro )
	{
		writeCSSToPage( cssPath + 'intro-page.css');
	}
	else
	{
		writeCSSToPage( cssPath + 'main-page.css');
	}
}


if( fullURL.indexOf( '-p.asp' ) != -1 ) // projects pages
{
	writeCSSToPage( cssPath + 'project-page.css');
}


if( fullURL.indexOf( '-c.asp' ) != -1 ) // category pages
{
	writeCSSToPage( cssPath + 'category-page.css');
}


if( pageURL.indexOf(showPageQuery) != -1   &&   pageURL.indexOf('page=23') != -1 ) // intro page
{
	writeCSSToPage( cssPath + 'intro-page.css');
}


if( pageURL.indexOf(showPageQuery) != -1   &&   pageURL.indexOf('page=13') != -1 ) // wholesale
{
	writeCSSToPage( cssPath + 'wholesale.css');
}


if( pageURL.indexOf(showPageQuery) != -1   &&   pageURL.indexOf('page=2') != -1 ) // contact page
{
	writeCSSToPage( cssPath + 'contact-page.css');
}


if( pageURL.indexOf(showPageQuery) != -1   &&   pageURL.indexOf('page=3') != -1 ) // vicky loves
{
	writeCSSToPage( cssPath + 'vicky-loves-page.css');
}


if( pageURL.indexOf(showPageQuery) != -1   &&   pageURL.indexOf( 'page=' ) != -1 ) // generic page
{
	writeCSSToPage( cssPath + 'generic-page.css');
}


if( pageURL.indexOf( '?function=CART' ) != -1 ) // checkout
{
	writeCSSToPage( cssPath + 'checkout.css');
}

