﻿function share_govn() { u = location.href; window.open("http://my.go.vn/share.aspx?url=" + encodeURIComponent(u)); }
function share_twitter() { u = location.href; t = document.title; window.open("http://twitter.com/home?status=" + encodeURIComponent(u)); }
function share_facebook() { u = location.href; t = document.title; window.open("http://www.facebook.com/share.php?u=" + encodeURIComponent(u) + "&t=" + encodeURIComponent(t)); }
function share_google() { u = location.href; t = document.title; window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk=" + encodeURIComponent(u) + "&title=" + t + "&annotation=" + t); }
function share_buzz() { u = location.href; t = document.title; window.open("http://buzz.yahoo.com/buzz?publisherurn=htsvietnam.com&targetUrl=" + encodeURIComponent(u)); }
function share_zingme() { u = location.href; t = document.title; window.open("http://link.apps.zing.vn/pro/view/conn/share?u=" + encodeURIComponent(u)); }
function share_linkhay() { u = location.href; t = document.title; window.open("http://linkhay.com/submit?link_url=" + encodeURIComponent(u)); }
function share_tagvn() { u = location.href; t = document.title; window.open("http://www.tagvn.com/submit?type=submit&source=button&version=0&url=" + encodeURIComponent(u)); }
function PrintPage() { window.print(); }
function SendMail() { u = location.href; t = document.title;showDialog("/htsvietnam/send-mail.htm?HtsUrl=" + u, 450, 410); }
function showDialog(vLink, vWidth, vHeight) {return showWindow(vLink, false, true, true, false, false, false, false, true, true, vWidth, vHeight, 0, 0);}
function showModalDialog(vLink, vWidth, vHeight) { return showWindow(vLink, false, false, false, false, false, false, false, true, true, vWidth, vHeight, 0, 0); }
function showWindow(vLink, vStatus, vResizeable, vScrollbars, vMenubar, vToolbar, vLocation, vFullscreen, vTitlebar, vCentered, vWidth, vHeight, vTop, vLeft) {
    var sLink = (typeof (vLink.href) == 'undefined') ? vLink : vLink.href;
    winDef = '';
    winDef = winDef.concat('status=').concat((vStatus) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('resizable=').concat((vResizeable) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('menubar=').concat((vMenubar) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('scrollbars=').concat((vScrollbars) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('toolbar=').concat((vToolbar) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('location=').concat((vLocation) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('fullscreen=').concat((vFullscreen) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('titlebar=').concat((vTitlebar) ? 'yes' : 'no').concat(',');
    winDef = winDef.concat('height=').concat(vHeight).concat(',');
    winDef = winDef.concat('width=').concat(vWidth).concat(',');
    if (vCentered) {
        winDef = winDef.concat('top=').concat((screen.height - vHeight) / 2).concat(',');
        winDef = winDef.concat('left=').concat((screen.width - vWidth) / 2);
    }
    else {
        winDef = winDef.concat('top=').concat(vTop).concat(',');
        winDef = winDef.concat('left=').concat(vLeft);
    }
    open(sLink, '_blank', winDef);
    if (typeof (vLink.href) != 'undefined') {return false;}
}

