
/**
 * 520x400 Popup Pencere
 * 
 * @param url
 * @param target
 * @returns {Boolean}
 */
function popup520x400(url, target)
{
    var width = 520;
    var height = 400;
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    window.open(url, target, 'width='+width+', height='+height+', top=' + top + ', left=' + left + ', toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
    return false;
}

/**
 * Popup Pencere
 * 
 * @param url
 * @param target
 * @param width
 * @param height
 * @returns {Boolean}
 */
function popup(url, target, width, height)
{
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    window.open(url, target, 'width='+width+', height='+height+', top=' + top + ', left=' + left + ', toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
    return false;
}

/**
 * Sosyal paylaşım sitelerinde paylaşım linkleri
 * 
 * @date: 13.03.2011
 */
function addSharingLinks()
{
    var _title  = document.title;
    var _url    = document.location;
    
    var links = '<a href="http://www.facebook.com/sharer.php?u='+ _url +'" rel="nofollow" title="Facebook "target="_blank"><img src="' + BASE_URL + 'assets/images/social/facebook.png" alt="Facebook" /><span>Facebook</span></a>'
              + '<a href="http://del.icio.us/post?url='+ _url +'&amp;title='+ _title +'" rel="nofollow" title="Del.icio.us "target="_blank"><img src="' + BASE_URL + 'assets/images/social/delicious.png" alt="Delicious" /><span>Delicious</span></a>'
              + '<a href="http://twitter.com/home?status='+ _url +'" rel="nofollow" title="Twitter "target="_blank"><img src="' + BASE_URL + 'assets/images/social/twitter.png" alt="Twitter" /><span>Twitter</span></a>'
              + '<a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk='+ _url +'&amp;title='+ _title +'" rel="nofollow" title="Google "target="_blank"><img src="' + BASE_URL + 'assets/images/social/buzz.png" alt="Buzz" /><span>Buzz</span></a>'
              + '<a href="http://digg.com/submit?url='+ _url +'&amp;title='+ _title +'" rel="nofollow" title="Digg "target="_blank"><img src="' + BASE_URL + 'assets/images/social/digg.png" alt="Digg" /><span>Digg</span></a>'
              + '<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+ _url +'&amp;t='+ _title +'" rel="nofollow" title="Yahoo! MyWeb "target="_blank"><img src="' + BASE_URL + 'assets/images/social/yahoo.png" alt="Yahoo" /><span>Yahoo</span></a>'
              //+ '<a href=""><img src="' + BASE_URL + 'assets/images/social/reddit.png" alt="Reddit" /><span>Reddit</span></a>'
              //+ '<a href=""><img src="' + BASE_URL + 'assets/images/social/myspace.png" alt="MySpace" /><span>MySpace</span></a>'
              + '<a href="http://friendfeed.com/share?url='+ _url +'&title='+_title+'" target="_blank"><img src="' + BASE_URL + 'assets/images/social/friendfeed.png" alt="FriendFeed" /><span>FriendFeed</span></a>';
              //+ '<a href=""><img src="' + BASE_URL + 'assets/images/social/stumbleupon.png" alt="StumbleUpon" /><span>stumbleupon</span></a>';
    
    document.write('<div class="social-links">' + links + '</div>');                   
}

/**
 * font boyutunu değiştir
 *
 * @param boolean isUp
 * @return bool
 */
var fontSize = 16;
function changeFontSize(isUp)
{
    var doc = document.getElementById('detail');
    
    if(isUp == true)
    {
        fontSize = fontSize + 1;
        if(fontSize >= 24)
            fontSize = 24;
    }
    else
    {
        fontSize = fontSize - 1;
        if(fontSize <= 12)
            fontSize = 12;
    }
    doc.style.fontSize = (fontSize)+"px";
    
    return false;
}
