

function GoUrl(file, url) {

    window.location = url.concat(file.value);
}

function doPrint(article_id, atype) {

    window.open("http://includes.iparenting.com/layout/article_print.php?aid=" + article_id + "&type=" + atype, 
        null, "height = 800, width = 600, status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes");

    return true;
}

function doPrintRecipe(article_id, atype) {

    window.open("http://includes.iparenting.com/layout/recipe_print.php?aid=" + article_id + "&type=" + atype, 
        null, "height = 800, width = 600, status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes");

    return true;
}

function doEmail(article_url, article_title, atype) {

	var w = 1024;
	var h = 800;

if (document.all) {
   /* the following is only available after onLoad */
   w = document.body.clientWidth;
   h = document.body.clientHeight;
}
else if (document.layers) {
   w = window.innerWidth;
   h = window.innerHeight;
}

var popW = 450, popH = 600;

var leftPos = (w-popW)/2, topPos = (h-popH)/2;

    window.open("http://includes.iparenting.com/layout/article_email.php?url=" + article_url + "&title=" + article_title + "&type=" + atype, 
        null, "height = "+ popH +", width = "+ popW + ", top = "+ topPos +", left = "+ leftPos +", status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes");

    return true; 
}

function openWindow(url) {

    window.open(url, null, "height = 800, width = 495, status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes");
    return true;
}

function doFavs(article_id,type) {
	/**

        if (!oXmlHttp)
            var oXmlHttp = zXmlHttp.createRequest();
        else
            oXmlHttp.abort();

        oXmlHttp.open("GET", "bookmark.php?aid=" + article_id, true);

        oXmlHttp.onreadystatechange = function () {

            if (oXmlHttp.readyState == 4) {

                if (oXmlHttp.status == 200) {

                    var mdata = oXmlHttp.responseText.split("\n");
                    var output = document.getElementById("message");
                    output.innerHTML = "";

                    for (var i = 0; i < mdata.length; i++)
                        output.innerHTML += mdata[i];
                }
            }
        }

        oXmlHttp.send(null);
		*/

        var output = document.getElementById("message");
	    output.innerHTML = "<iframe style=\"border: 1px solid #ddd; background-color: #ffc; margin-top: 10px;\" src=\"http://www.iparenting.com/bookmark.php?artid=" 
            + article_id + "&type=" + type + "\" width=\"98%\" height=\"50\" scrolling=\"no\" frameborder=\"0\"></iframe>";
		
		//populate div 'message' using innerHTML
		
		//innerHTML will contain an iframe from iparenting.com/users/bookmarks.php
		
		//it will check to see if logged in - if so  -- you have bookmarked click to close this window
		
		//if not it will prompt a register or login - all links target _PARENT or _TOP
		
		//make div 'message' visible
}

/*
function doFavs(recipe_id) {

        var output = document.getElementById("message");
	    output.innerHTML = "<iframe style=\"border: 1px solid #ddd; background-color: #ffc; margin-top: 10px;\" src=\"http://www.iparenting.com/bookmark.php?artid=" 
            + recipe_id + "&type=3\" width=\"98%\" height=\"50\" scrolling=\"no\" frameborder=\"0\"></iframe>";
}
*/