function Flashwrite(url,w,h,id,bg,vars){
    var str="";
    if(w!="") str+= "width='"+w+"'";
    if(h!="") str += "height='"+h+"'";
    var flashStr=
    "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
    "<param name='allowScriptAccess' value='always' />"+
    "<param name='movie' value='"+url+"' />"+
    "<param name='FlashVars' value='"+vars+"' />"+
    "<param name='wmode' value='transparent' />"+
    "<param name='menu' value='false' />"+
    "<param name='quality' value='high' />"+
    "<embed src='"+url+"' FlashVars='"+vars+"' wmode='transparent' menu='false' quality='high' " + str + " allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
    "</object>";
    document.write(flashStr);
}
function LogoFlash(url,w,h,id,bg,vars){
    var str="";
    if(w!="") str+= "width='"+w+"'";
    if(h!="") str += "height='"+h+"'";
    var flashStr=
    "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
    "<param name='allowScriptAccess' value='always' />"+
    "<param name='movie' value='"+url+"' />"+
    "<param name='FlashVars' value='"+vars+"' />"+
    "<param name='wmode' value='transparent' />"+
    "<param name='menu' value='false' />"+
    "<param name='quality' value='high' />"+
    "<embed src='"+url+"' FlashVars='"+vars+"' wmode='transparent' menu='false' quality='high' " + str + " allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
    "</object>";
    return flashStr;
}

function showLogo(path, file, link, pos, w, h)
{
    var size='';
    if(w!="") size += "width='"+w+"'";
    if(h!="") size += "height='"+h+"'";;
    if(file != null && file != '')
    {
        var extend = file.substring(file.length-3,file.length);
        if(extend == 'swf' || extend == 'SWF')
        {
            Flashwrite(path+file,w,h);
        }
        else
        {
            document.write('<a href="' + link + '" target="_blank"><img src="' + path + file + '" alt="" title="" ' + size + ' border=0></a>');
        }
    }
}

function showHaftLogo(path, file, link, pos, w, h)
{
    var size='';
    if(w!="") size += "width='"+w+"'";
    if(h!="") size += "height='"+h+"'";;
    if(file != null && file != '')
    {
        var extend = file.substring(file.length-3,file.length);
        if(extend == 'swf' || extend == 'SWF')
        {
            Flashwrite(path+file,w,h);
        }
        else
        {
            document.write('<a href="' + link + '"><img src="' + path + file + '" alt="" title="" ' + size + ' border=0></a>');
        }
    }
}

function showLogoNews(path, file, link, pos, w, h)
{
    var size='';
    if(w!="") size+= "width='"+w+"'";
    if(h!="") size += "height='"+h+"'";;
    if(file != null && file != '')
    {
        var extend = file.substring(file.length-4,3);
        if(extend == 'swf' || extend == 'SWF')
        {
            document.write('<table cellpadding="0" cellspacing="1" border="0" with="1"><tr><td>' + LogoFlash(path+file,w,h) + '</td></tr></table>');
        }
        else
        {
            document.write('<table cellpadding="0" cellspacing="1" border="0" with="1"><tr><td><a href="' + link + '"><img src="' + path + file + '" alt="" title="" ' + size + ' border=0></a></td></tr></table>');
        }
    }
}
function showLogoNewsDetail(path, file, link, pos, w, h)
{
    var size='';
    if(w!="") size+= "width='"+w+"'";
    if(h!="") size += "height='"+h+"'";;
    if(file == null || file == '')
    {
        path="/Libraries/Images/";
        file="Nophoto.jpg";
    }
    var extend = file.substring(file.length-4,3);
    if(extend == 'swf' || extend == 'SWF')
    {
        document.write('<table cellpadding="0" cellspacing="1" border="0" with="1"><tr><td valign=middle align=center>' + LogoFlash(path+file,w,h) + '</td></tr></table>');
    }
    else
    {
        document.write('<table cellpadding="0" cellspacing="1" border="0" with="1"><tr><td valign=middle align=center><a href="' + link + '" ><img src="' + path + file + '" alt="" title="" ' + size + ' class=imgdetail></a></td></tr></table>');
        //onmouseover="displayLargerImg()" onmouseout="hiddenLargerImg()"
        //<div id="dimg" style=" width:500px; height:500px; border:solid 1px #eaeaea; padding:5px; display:none; overview:visible"><img src="' + path + file + '" width=480 height=480 alt="" /></div>
    }
}

