function echoCSSLink(ieCSSName, ie7CSSName, geckoCSSName, safariCSSName, etcCSSName, mediaType)
{
    var isWin = navigator.userAgent.indexOf("Win") > -1;
    var isMac = navigator.userAgent.indexOf("Mac") > -1;
    var isIE = navigator.userAgent.indexOf("MSIE") > -1;
    var isIE7 = navigator.userAgent.indexOf("MSIE 7.0") > -1;
    var isGecko = navigator.userAgent.indexOf("Gecko") > -1;
    var isSafari = navigator.userAgent.indexOf("Safari") > -1;
    
    if (isWin && isIE7) {
       document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"" + ie7CSSName + "\" media=\"" + mediaType + "\" />");
    } else if (isWin && isIE) {
       document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"" + ieCSSName + "\" media=\"" + mediaType + "\" />");
    } else if (isSafari) {
       // SafariのUserAgentにもlike Geckoという文字列が含まれているため、Safariが先
       document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"" + safariCSSName + "\" media=\"" + mediaType + "\" />");
    } else if (isGecko) {
       document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"" + geckoCSSName + "\" media=\"" + mediaType + "\" />");
    } else {
       document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"" + etcCSSName + "\" media=\"" + mediaType + "\" />");
    }
}

