function urlencode(str) { str = escape(str); str = str.replace('+','%2B'); str = str.replace('%20','+'); str = str.replace('*','%2A'); str = str.replace('/','%2F'); str = str.replace('@','%40'); return str; }
function SubmitSearchForm(ParentScript) { var tekstas = document.getElementById("SearchQuery").value; var url = ParentScript + "/paieska/" + urlencode(tekstas); if (tekstas.length > 2) { window.location = url; } else { alert("Per trumpa paieškos užklausa."); } }
function QuestionForm(klausimas,yact) { if (document.getElementById("ConfirmationBlock")) { document.getElementById("LoginDiv").removeChild(document.getElementById("ConfirmationBlock")); } var nact = "var d1=document.getElementById('LoginDiv');d1.removeChild(document.getElementById('ConfirmationBlock'));"; newblock = document.createElement("div"); newblock.setAttribute("id","ConfirmationBlock"); newblock.setAttribute("style","position:fixed;width:26%;height:16%;top:42%;left:37%;background:#cfe9ff;border:solid #f5c691 2px;overflow:visible;"); newblock.innerHTML = '<table width="100%" style="height:100%;" cellpadding="10" cellspacing="0"><tr style="height:60%;"><td width="1%" align="left" valign="top"><img src="/ktml_files/img/icon_question.gif" width="28" height="29" border="0" alt="" /></td><td width="98%" align="center" valign="top" style="font-family:Tahoma,Arial,Verdana,Helvetica;font-size:12px;font-weight:bold;">'+klausimas+'</td><td width="1%"><div style="width:28px;"></div></td></tr><tr style="height:40%;"><td colspan="3" align="center" valign="bottom"><input type="button" value="Taip" onclick="'+yact+'" class="ButtonTaip" id="ConfirmButtonTaip" />&nbsp;<input type="button" value="Ne" onclick="'+nact+'" class="ButtonNe" /></td></tr></table>'; document.getElementById("LoginDiv").appendChild(newblock); document.getElementById("ConfirmButtonTaip").focus(); }
function UserTipOn(tekstas) { var divas = '<div style="position:fixed;width:300px;right:10px;bottom:35px;border:solid #444444 1px;background:#cfe9ff;padding:5px;text-align:center;font-family:Tahoma,Arial,Verdana,Helvetica;font-weight:bold;color:#000000;letter-spacing:1px;">'+tekstas+'</div>'; newblock = document.createElement("div"); newblock.setAttribute("id","UserToolTip"); newblock.innerHTML = divas; document.getElementById("LoginDiv").appendChild(newblock); }
function UserTipOut() { document.getElementById("LoginDiv").removeChild(document.getElementById("UserToolTip")); }
function HideCalendar() { document.getElementById("LoginDiv").removeChild(document.getElementById("CalendarBlock")); }
function ChangeCalendar(url) { document.getElementById("CalendarPlace").innerHTML = "<span style='disply:block;color:#808080;text-align:center;font-weight:normal;'><br /><br /><br />Lukterėkite...</span>"; document.getElementById("HiddenCalendar").src = "/servlets/calendar/" + document.getElementById("CalendarYear").value + "/" + document.getElementById("CalendarMonth").value + "/" + url; }
function DisplayCalendar(month,day,url) { if (document.getElementById("CalendarBlock")) { HideCalendar(); } var divas = '<div style="position:fixed;width:200px;height:180px;right:60px;bottom:65px;border:solid #444444 1px;background:#cfe9ff;padding:5px;text-align:center;font-family:Tahoma,Arial,Verdana,Helvetica;font-weight:bold;color:#000000;letter-spacing:1px;"><div style="width:0px;height:0px;overflow:hidden;"><iframe id="HiddenCalendar" src=""></iframe></div><div>'+CalendarContents+'&nbsp;<input type="button" class="CalendarForm" value="X" onclick="HideCalendar();" title="Uždaryti" style="font-weight:bold;padding-left:1px;padding-right:1px;width:22px;"></div><div id="CalendarPlace"></div></div>'; newblock.setAttribute("id","CalendarBlock"); newblock.innerHTML = divas; document.getElementById("LoginDiv").appendChild(newblock); document.getElementById("CalendarYear").value = month; document.getElementById("CalendarMonth").value = day; ChangeCalendar(url); }
function ChangeCalendarContents2(url) { document.getElementById("CalendarPlace2").innerHTML = "<span style='disply:block;color:#808080;text-align:center;font-weight:normal;'><br /><br /><br />Lukterėkite...</span>"; document.getElementById("HiddenCalendar2").src = "/servlets/calendar/" + document.getElementById("CalendarYear").value + "/" + document.getElementById("CalendarMonth").value + "/" + url; }
function DisplayCalendar2(month,day,url) { document.getElementById("CalendarYear").value = month; document.getElementById("CalendarMonth").value = day; ChangeCalendarContents2(url); }
function Display1() { document.getElementById("ComBlock1").style.display = "block"; document.getElementById("ComBlock2").style.display = "none"; setTimeout("Display2();",5000); }
function Display2() { document.getElementById("ComBlock2").style.display = "block"; document.getElementById("ComBlock1").style.display = "none"; setTimeout("Display1();",5000); }
function ShowFacebookFrame() { document.getElementById("FacebookBlock1").style.display = "none"; document.getElementById("FacebookBlock2").style.visibility = "visible"; }
function HideFacebook() { document.getElementById("LoginDiv").removeChild(document.getElementById("FacebookBlock")); }
function DisplayFacebook(month,day,url) { if (document.getElementById("FacebookBlock")) { HideCalendar(); } var divas = '<div style="position:fixed;width:255px;height:350px;right:60px;bottom:65px;border:solid #444444 1px;background:#cfe9ff;padding:5px;text-align:center;font-family:Tahoma,Arial,Verdana,Helvetica;font-weight:bold;color:#000000;letter-spacing:1px;"><div style="text-align:right;height:25px;"><input type="button" class="CalendarForm" value="X" onclick="HideFacebook();" title="Uždaryti" style="font-weight:bold;padding-left:1px;padding-right:1px;width:22px;"></div><div id="FacebookBlock1" style="height:320px;display:block;padding-top:150px;">Lukterėkite...</div><div id="FacebookBlock2" style="height:320px;overflow:hidden;visibility:hidden;"><iframe scrolling="no" frameborder="0" src="http://www.facebook.com/connect/connect.php?id=127575294871&amp;connections=12&amp;stream=0" style="border:none;width:240px;height:320px;" onload="ShowFacebookFrame();"></iframe></div></div>'; newblock.setAttribute("id","FacebookBlock"); newblock.innerHTML = divas; document.getElementById("LoginDiv").appendChild(newblock); document.getElementById("CalendarYear").value = month; document.getElementById("CalendarMonth").value = day; ChangeCalendar(url); }
function langas(puslapis,plotis,aukstis) { var sonas = (screen.width/2)-(plotis/2); var virsus = (screen.height/2)-(aukstis/2); eval("langelis=window.open('"+puslapis+"','langiukas','toolbar=0,scrollbars=1,location=0,status=0,menubars=0,resizable=0,width="+plotis+",height="+aukstis+",top="+virsus+",left="+sonas+"')") }

