function getSWF(swWidth, swHeight, swFile, swWmode, swParam) {
    var str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width=' + swWidth + ' height=' + swHeight + ' VIEWASTEXT>';
    str += '<param name="movie" value="' + swFile + '" />';
    str += '<param name="quality" value="high" />';
    // anasayfaAnket bannerı için
    if (swParam != undefined)
        str += '<param name=FlashVars value="' + swParam + '" />';
    // wmode = window, transparent, opaque
    str += '<param name="wmode" value="' + swWmode + '" />';
    str += '<param name="menu" value="false" />';
    str += '<embed src="' + swFile + '" width=' + swWidth + ' height=' + swHeight + ' menu="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';
    document.write(str);
}
function getMPG(swWidth, swHeight, swFile) {
    var firefoxheight = swHeight + 60;
    var firefoxwidth = swWidth + 60;
    var str = '<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="' + swWidth + '" height="' + swHeight + '" VIEWASTEXT>';
    str += '   <param name="fileName" value="' + swFile + '" > ';
    str += '   <param name="animationatStart" value="false">';
    str += '   <param name="transparentatStart" value="true">';
    str += '   <param name="autoStart" value="true">';
    str += '   <param name="showControls" value="true">';
    str += '   <param name="Volume" value="-450">';
    str += '    <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="' + swFile + '" name="MediaPlayer1" width="' + firefoxwidth + '" height="' + firefoxheight + '" transparentatStart=0 autostart=0 showcontrols=1 volume=-450>';
    str += '  </object> ';
    document.write(str);
}

function getPNG(iconSource, iconWidth, iconHeight) {
    document.write(getPNGforString(iconSource, iconWidth, iconHeight));
}

function getPNGforString(iconSource, iconWidth, iconHeight) {
    var str = '<span style="width:' + iconWidth + 'px;height:' + iconHeight + 'px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + iconSource + '\');"><img style="width:' + iconWidth + 'px;height:' + iconHeight + 'px;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="' + iconSource + '" border="0" alt=""></span>';
    return str;
}
// ##########################################
// #########  DATAGRID HIGHLIGHT  ###########
// ##########################################
var oPrevTd;
function changeBorder(oTd) {
    oTd.className = 'dgLowLights';
    if (oPrevTd && oPrevTd != oTd) {
        oPrevTd.className = 'dgHighLigts';
    }
    oPrevTd = oTd;
}

function changeBorder2(oTd) {
    oTd.className = 'dgHighLigts';
    if (oPrevTd && oPrevTd != oTd) {
        oPrevTd.className = 'dgLowLights';
    }
    oPrevTd = oTd;
}

// ###########################################

function OpenPopup(DosyaAdi, Dosya, Genislik, Yukseklik) {
    leftPos = 0
    topPos = 0
    if (screen) {
        leftPos = parseInt((screen.width - Genislik) / 2)
        topPos = parseInt((screen.height - Yukseklik) / 2)
    }
    var popup = window.open(DosyaAdi, Dosya, 'width=' + Genislik + ',height=' + Yukseklik + ',left=' + leftPos + ',top=' + topPos + ',resizable=no,status=no,scrollbars=no');
    if (popup == null) {
        alert('Tüm sayfalarımıza ulaşmak için açılır pencere engelleyicisini\n(popup blocker) kapatmalısınız');
    }
}


function getURLParam(strParamName) {
    var strReturn = "";
    var strHref = window.location.href;
    if (strHref.indexOf("?") > -1) {
        var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
        var aQueryString = strQueryString.split("&");
        for (var iParam = 0; iParam < aQueryString.length; iParam++) {
            if (aQueryString[iParam].indexOf(strParamName + "=") > -1) {
                var aParam = aQueryString[iParam].split("=");
                strReturn = aParam[1];
                break;
            }
        }
    }
    return strReturn;
}
