﻿function EmailToFriend(BlogID, BlogEntryID, Title)
    {
    var page = "/Blog/Popup/EmailToFriend.aspx?BlogID=" + BlogID + "&BEID=" + BlogEntryID + "&Title=" + Title;
    var win_name = "EmailToFriend";
    var width = 200;
    var height = 100;
    openNewWin(page, win_name, width, height) 
    } 

function RateThisEntry(BlogID, BlogEntryID, UserID)
    {
        var page = "/Blog/Popup/RateThisEntry.aspx?BlogID=" + BlogID + "&BEID=" + BlogEntryID + "&UID=" + UserID;
        var win_name = "RateThisEntry";
        var width = 200;
        var height = 100;
        openNewWin(page, win_name, width, height);
    }
    
function openNewWin(page, win_name, width, height) 
	{
	var bName = navigator.appName;
	var version = parseInt(navigator.appVersion);
	var bWidth; 
	var bHeight;
	var Width;
	var Height

	if (bName == "Netscape" && version >= 4) {
		bWidth = (197 + width);
		bHeight = (140 + height);
	}
	if (bName == "Netscape" && version < 4) {
		bWidth = (219 + width);	 
		bHeight = (179 + height);
	}
	if (bName == "Microsoft Internet Explorer" && version >= 4) {
		bWidth = (200 + width);
		bHeight = (140 + height); 	
	}
	if (bName == "Microsoft Internet Explorer" && version < 4) {
		bWidth = (210 + width);	 
		bHeight = (156 + height);
	}
	this.window.name = "opener";
	var remote = window.open(page,win_name,"width=" + bWidth + ",height=" + bHeight + ",scrollbars=no,resizable=no");
	this.window.name = "opener";
	}    

