﻿// JScript File
// By Using this Javascript, the link of the CSS File Changes as per the Browser Used to Browse the Site.
// So that the Site will look Unique & Proper in every Browser.



// alert(navigator.appVersion);
 var ua = navigator.userAgent.toLowerCase(); 
 
if ( ua.indexOf( "opera" ) != -1 ) 
	{ 
		alert("opera"); 
	} 
else if ( ua.indexOf( "msie" ) != -1 ) 
	{ 
        var cssforie = document.createElement('link');
        cssforie.type='text/css';
        cssforie.rel='stylesheet';
        cssforie.href='App_Themes/ForIE/StyleSheet.css';
        document.getElementsByTagName('head')[0].appendChild(cssforie);
	} 
else if ( ua.indexOf( "safari" ) != -1 ) 
	{ 
        var cssforsafari = document.createElement('link');
        cssforsafari.type='text/css';
        cssforsafari.rel='stylesheet';
        cssforsafari.href='App_Themes/SafariCSS/StyleSheet.css';
        document.getElementsByTagName('head')[0].appendChild(cssforsafari);
	} 
else if ( ua.indexOf( "mozilla" ) != -1 ) 
	{ 
        if ( ua.indexOf( "firefox" ) != -1 ) 
	    { 
            var cssforfirefox = document.createElement('link');
            cssforfirefox.type='text/css';
            cssforfirefox.rel='stylesheet';
            cssforfirefox.href='App_Themes/MozillaCSS/StyleSheet.css';
            document.getElementsByTagName('head')[0].appendChild(cssforfirefox);
	    } 
        else 	
        { 
             var cssforfirefox = document.createElement('link');
             cssforfirefox.type='text/css';
             cssforfirefox.rel='stylesheet';
             cssforfirefox.href='App_Themes/MozillaCSS/StyleSheet.css';
             document.getElementsByTagName('head')[0].appendChild(cssforfirefox);
    	} 
	} 