//
//
//
function httpLink(AUrl) {
  location.href = AUrl;
}

function showPortrait(ARoot) {
  /*
  var obj = document.getElementById("artistiframe");
  if (obj == null) {
    obj = document.createElement("iframe");
    obj.id = "artistiframe";
    obj.name = "artistiframe";
    obj.src = ARoot+ "artist/artist.html";

    document.body.appendChild(obj);
  }
  setTimeout("_showPortrait()", 800);
  */
  var wnd = window.open(ARoot+'artist/portraitartist.html','portrait', "width=455,height=545, status=no,toolbar=no,menubar=no,location=no,resizable=no,fullscreen=no,scrollbars=no,titlebar=no,directories=no");
  wnd.focus();

}   /*
    function _showPortrait() {
      if (document.frames["artistiframe"].showPortrait) {
        document.frames["artistiframe"].showPortrait();
      }
      else {
        setTimeout("_showPortrait()", 800);
      }
    }
    */

var previewPath = "";
function quiltPreview(AName, APath) {
  var pPath = APath ? APath : previewPath;
  var wnd = window.open(pPath+"preview/"+AName+".html", "preview"+AName, "width=455,height=545, status=no,toolbar=no,menubar=no,location=no,resizable=no,fullscreen=no,scrollbars=no,titlebar=no,directories=no");
  wnd.focus();
}


var infoPath = "";
function quiltInfo(AName, APath) {
  var IPath = (APath ? APath : infoPath);
  var wnd = window.open(IPath+"info/"+AName+".html", "info"+AName, "width=480,height=550, status=no,toolbar=no,menubar=no,location=no,resizable=no,fullscreen=no,scrollbars=no,titlebar=no,directories=no");
  wnd.focus();
}


var homepagePath = "";
function openHomePage(AHref) {
   
   var href =  homepagePath + (AHref ? AHref : "index.html");

   if (window.opener && !window.opener.closed) {
  window.opener.location.href = href;
    window.opener.focus();
   }
   else {
    wnd = window.open(href,"homepage");
    wnd.focus();
   }
}

var imagesPath=""
function swapImage(AImg, ASrc) {
    var _src = imagesPath;
    if (ASrc) _src += ASrc;
    else      _src += "pix.gif";
    document.images[AImg].src = _src;
}

helpPath="../"
function showHelp(APath) {
  var hPath = APath ? APath : helpPath;
  var wnd = window.open(hPath+"help.html", "helpwindow", "width=455,height=545, status=no,toolbar=no,menubar=no,location=no,resizable=yes,fullscreen=no,scrollbars=no,titlebar=no,directories=no");
  wnd.focus();
}
