﻿function PopupWindow(WindowName, Width, Height, Title)
{
    window.open(WindowName, '_blank', 'left=100,top=100,width=' + Width + ',height=' + Height + ',status=0,resizable=1');
/*    var oWnd = window.radopen(WindowName, "LocalWindow");
    oWnd.SetSize (Width, Height);
    oWnd.SetTitle (Title);*/
}		

function PopupContent(KeyWord, Width, Height)
{
    window.open('../Misc/PopupGlossary.aspx?KeyWord=' + KeyWord, '_blank', 'left=100,top=100,width=' + Width + ',height=' + Height + ',status=0,resizable=1');
/*    var oWnd = window.radopen('../Misc/PopupGlossary.aspx?KeyWord=' + KeyWord, "LocalWindow");
    oWnd.SetSize (Width, Height);*/
}

function ShowContent(KeyWord, RightCol)
{
    var link = window.location.pathname + '?Keyword=' + KeyWord;
    if (RightCol != null) {
        link = link + '&RightCol=' + RightCol;
    }
    window.location.href = link;
}

function ShowPage(PageName)
{
    var Path
    Path=unescape(window.location.pathname);
    Path=Path.substr(0,Path.lastIndexOf('/')+1);
    window.location.href = Path + 'Default.aspx?Page=' + PageName;
}

function ShowURL(Url)
{
    window.location = Url;
}

function ConfirmMsgBox(Message)
{
  if (confirm(Message)==true)
    return true;
  else
    return false;
}

function GetRadWindow()
{
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
} 

function CloseForm() 
{
    var oWindow = GetRadWindow();
    oWindow.Close();
}

function CloseFormWithArg() 
{    
    var oWindow = GetRadWindow();
    var arg = new Object();					
	arg.Saved = 1;
    oWindow.Argument = arg;
    oWindow.Close();
}

function protect(name, address, display)
{
	var link = name + "@" + address
	if(!display) { display = link; }
	document.write("<a href='mailto:" + link + "'>" + display + "</a>");
}

function FriendlyPrint(sIDToPrint, sIDCopyright)
{ 
  var disp_setting="toolbar=1,location=1,directories=1,menubar=1,resizable=1,"; 
      disp_setting+="scrollbars=1, width=715, height=600, left=50, top=25,"; 
  var content_vlue = document.getElementById(sIDToPrint).innerHTML; 
  var content_copyright = ""
  
  if(sIDCopyright != ""){
    document.getElementById(sIDCopyright).innerHTML; 
  }
  
  var docprint=window.open("","",disp_setting); 
   docprint.document.open(); 
   docprint.document.write('<html><head><title>MarkoSim</title>'); 
   docprint.document.write('<link href="../App_Themes/sub/sub.css" type="text/css" rel="stylesheet" />');
   //docprint.document.write('<link href="../App_Themes/msTheme/msTheme.css" type="text/css" rel="stylesheet" />');
   docprint.document.write('</head><body style="background:white" onLoad="self.print()"><div style="text-align:justify;">');          
   docprint.document.write(content_vlue);          
   docprint.document.write('<br /><br />');    
   docprint.document.write(content_copyright);  
   docprint.document.write('</div>');        
   docprint.document.write('</body></html>'); 
   docprint.document.close(); 
   docprint.focus(); 
}

