/********************************************************
//  FILE:           deteect.js
//  CREATED BY:     Luc Vandal
//  ON:             31/10/2007
//
//
//  DESCRIPTTION:   style sheet detection
//
//  (C) 2007 EDOVIA INC. www.edovia.com
//
********************************************************/

// Contants
var c_common    = "default.css";
var c_cssPath   = "/app/css/";

document.write('<link rel="stylesheet" href="' + c_cssPath + '' + c_common + '" type="text/css">');

var agt=navigator.userAgent.toLowerCase(); 

if (agt.indexOf('opera') != -1) // OPERA
{
    if (agt.indexOf("macintosh") != -1)
    {
        addStyleSheet('opera.css');
    }
    else
    {
        addStyleSheet('operapc.css');
    }
}
else if (agt.indexOf('safari') != -1) // SAFARI  
{
	addStyleSheet('safari.css');
}
else if(agt.indexOf('granparadiso') != -1) // FF3.0
{
	if (agt.indexOf('mac') != -1)
	{
    	//Do nothing
	}
	else
	{
		addStyleSheet('ffpc.css');
	}
}
else if (agt.indexOf('firefox') != -1) // FF
{
	if (agt.indexOf('mac') != -1)
	{
    	//addStyleSheet('ff.css');
	}
	else
	{
		addStyleSheet('ffpc.css');
	}
}
else if (agt.indexOf('msie') != -1) // IE
{
	if (agt.indexOf('msie 7') != -1)
	{
		addStyleSheet('ie7.css');
	}
	else
	{
		addStyleSheet('ie6.css');
	}
}



function addStyleSheet(file)
{
    document.write('<link rel="stylesheet" href="' + c_cssPath + file + '" type="text/css">');
}
