var text = ""; var main = this; var wLattes = null; var wInfo = null; var IE4 = (document.all && !document.getElementById) ? true : false; var NS4 = (document.layers) ? true : false; var IE5 = (document.all && document.getElementById) ? true : false; var NS6 = (document.getElementById && !document.all) ? true : false; var language = ""; /***************************************************************************************************************** function OpenLattesWindow () Opens a 200x200 resizable+scrollbars window in the upper-right corner of the screen for the data of Lattes System. The contents of the new window is present in the text variable (no url is passed). The content of the text variable is available after the call of the following functions: CreateWindowHeader(), InsertAuthor() and CreateWindowFooter(). Parameters: None Return Value: None *****************************************************************************************************************/ function OpenLattesWindow () { if ( text == "" ) return; var left = screen.availWidth - 200; if ( wLattes && !wLattes.closed ) { wLattes.focus(); return; } wLattes = OpenWindow ( "_Lattes", 0, left, 200, 200, "" ); wLattes.document.open (); wLattes.document.write ( text ); wLattes.document.close (); } /***************************************************************************************************************** function CloseLattesWindow () Close the Lattes Window. Parameters: None Return Value: None *****************************************************************************************************************/ function CloseLattesWindow () { CloseWindow ( wLattes ); } /***************************************************************************************************************** function CreateWindowHeader () Creates the header of the Lattes window. Parameters: title: Title of the window imgsrc: Source (uri) of the lattes image lng: Interface Language Return Value: None *****************************************************************************************************************/ function CreateWindowHeader(title, imgsrc, lng) { text = "\n"; text += " \n"; text += " " + title + "\n"; text += " \n"; text += " \n"; text += "
\n"; text += " \n"; text += " \n"; text += " \n"; text += " \n"; text += " \n"; text += "
\n"; text += " \n"; text += " " switch (language) { case 'es': text += "Cerrar"; break; case 'pt': text += "Fechar"; break; default: text += "Close"; } text += "\n" text += " \n"; text += "

\n"; text += " \n"; language = lng; } /***************************************************************************************************************** function InsertAuthor () Inserts an author in the Lattes window. Parameters: author: Name of the author url: Url of the curriculum Return Value: None *****************************************************************************************************************/ function InsertAuthor ( author, url ) { text += " \n"; text += " \n"; text += " \n"; text += " \n"; } /***************************************************************************************************************** function CreateWindowHeader () Creates the footer of the Lattes window. Parameters: None Return Value: None *****************************************************************************************************************/ function CreateWindowFooter () { text += "
· \n"; text += " \n"; text += " "; text += author; text += "\n"; text += " \n"; text += "
\n"; text += "
\n"; text += " \n"; text += "\n"; } /***************************************************************************************************************** function OpenArticleInfoWindow () Opens the window of Informations about the article. Parameters: wHeight: Height of the window (pixels) wWidth: Width of the window (pixels) url: URL to load Return Value: none *****************************************************************************************************************/ function OpenArticleInfoWindow ( wWidth, wHeight, url ) { if ( wInfo && !wInfo.closed ) { wInfo.focus(); /* return; */ } wInfo = OpenWindow ( "_Info", 0, 0, wWidth, wHeight, url ); } /***************************************************************************************************************** function CloseArticleInfoWindow () Closes the Article's Info Window. Parameters: None Return Value: None *****************************************************************************************************************/ function CloseArticleInfoWindow () { CloseWindow ( wInfo ); } /***************************************************************************************************************** function OpenWindow () Opens a resizable+scrollbars window. Parameters: name: Window name wTop: Coordinate of top of the window (screen coordinate) wLeft: Coordinate of left edge of the window (screen coordinate) wHeight: Height of the window (pixels) wWidth: Width of the window (pixels) url: URL to load Return value: Window reference *****************************************************************************************************************/ function OpenWindow ( name, wTop, wLeft, wWidth, wHeight, url ) { var w = null; features = "resizable=1,scrollbars=1,height=" + wHeight + ",width=" + wWidth; if ( NS4 || NS6 ) { features += ",screenY=" + wTop + ",screenX=" + wLeft; } else { features += ",top=" + wTop + ",left=" + wLeft; } w = open ( url, name, features ); return w; } /***************************************************************************************************************** function CloseWindow () Try to close a window if its handle is not null and the window is not closed. Parameters: w: Window reference *****************************************************************************************************************/ function CloseWindow ( w ) { if ( w && !w.closed ) { w.close(); } }