var strPageName

function relocateMe(strPageName) {
	self.location = strPageName;
}

function relocateMeWithConfirm(strPageName,strQuestion) {
	var x = window.confirm(strQuestion)
	
	if (x) 
		self.location = strPageName;
}

function myOpenWindow() {
    window.open('blank.asp','myWindowName','width=300,height=200');
}

function showpic(strUrl,intWindowWidth,intWindowHeight){
	var strOptions = 'toolbar=0,location=0,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + intWindowWidth + ',height=' + intWindowHeight;
	PicWin = window.open(strUrl,'Myndir',strOptions);
}
	
function closePopup() {
    window.close();
    return true;
}

function openSenda() {
window.open('http://www.gjtravel.is/senda/senda.asp?strURL=' + escape(document.URL),'Send','height=400,width=400,resizable=no,location=no,menubar=no,scrollbars=no,status=no,titlebar=yes');
}

function openTellafriend() {
window.open('http://www.gjtravel.is/tellafriend/tellafriend.asp?strURL=' + escape(document.URL),'Send','height=400,width=400,resizable=no,location=no,menubar=no,scrollbars=no,status=no,titlebar=yes');
}


window.onerror = null;

var winp=null;var win=null;
var isHTMLMode=false
var colour;

function cmdExec(cmd,opt)
	{
  	if (isHTMLMode){alert("xxx");return;}
	frmPublication.focus();
  	frmPublication.document.execCommand(cmd,"",opt);
	frmPublication.focus();
	}
function setMode(bMode)
	{
	var sTmp;
  	isHTMLMode = bMode;
  	if (isHTMLMode)
	{
		sTmp=frmPublication.innerHTML;
		frmPublication.innerText=sTmp;
	}
	else
	{
			sTmp=frmPublication.innerText;
			frmPublication.innerHTML=sTmp;
	}
  	frmPublication.focus();
	}

function foreColor()

       {

       var arr = showModalDialog("selcolor.htm","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:34em: status=no" );

       if (arr != null) cmdExec("ForeColor",arr);

       }
       
 function help()
 
        {
 
        var arr = showModalDialog("hjalp.htm","","font-family:Verdana; font-size:12; dialogWidth:60em; dialogHeight:50em: status=no" );
 
        if (arr != null) cmdExec("help",arr);
 
        }

  function about()
  
         {
  
         var arr = showModalDialog("about.htm","","font-family:Verdana; font-size:12; dialogWidth:35em; dialogHeight:20em; status=no" );
  
         if (arr != null) cmdExec("about",arr);
  
         }
         

function createlink() 

	{
	var cursor = editableStrPublMaintext.document.selection.createRange();
	var myTitle = "";
	var myText = showModalDialog("tenglar.asp",
	myTitle, "target is new Window: status=no");
	if (myText) { cursor.pasteHTML(unescape( myText) ); }
	
 }
 
function tableDialog()
{
   //----- Creates A Table Dialog And Passes Values To createTable() -----
   var rtNumRows = null;
   var rtNumCols = null;
   var rtTblAlign = null;
   var rtTblWidth = null;
   showModalDialog("table.htm",window,"status:false;dialogWidth:16em;dialogHeight:13em");
}

function createTable()
{
   //----- Creates User Defined Tables -----
   var cursor = editableStrPublMaintext.document.selection.createRange();
   if (rtNumRows == "" || rtNumRows == "0")
   {
      rtNumRows = "1";
   }
   if (rtNumCols == "" || rtNumCols == "0")
   {
      rtNumCols = "1";
   }
   var rttrnum=1
   var rttdnum=1
   var rtNewTable = "<table border='1' align='" + rtTblAlign + "' cellpadding='0' cellspacing='0' width='" + rtTblWidth + "'>"
   while (rttrnum <= rtNumRows)
   {
      rttrnum=rttrnum+1
      rtNewTable = rtNewTable + "<tr>"
      while (rttdnum <= rtNumCols)
      {
         rtNewTable = rtNewTable + "<td>&nbsp;</td>"
         rttdnum=rttdnum+1
      }
      rttdnum=1
      rtNewTable = rtNewTable + "</tr>"
   }
   rtNewTable = rtNewTable + "</table>"
   editableStrPublMaintext.focus();
   cursor.pasteHTML(rtNewTable);
}

