defaultStatus = 'Butoruzlet.hu'



var alternate=0
var standardbrowser=!document.all&&!document.getElementById
if (standardbrowser)
document.write('<form name="tick"><input type="text" name="tock" size="11"></form>')
function show(){
if (!standardbrowser)
var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var dn="AM"
if (hours==12) dn="PM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0) hours=12
if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes
if (standardbrowser){
if (alternate==0)
document.tick.tock.value=hours+" : "+minutes+" "+dn
else
document.tick.tock.value=hours+"   "+minutes+" "+dn
}
else{
if (alternate==0)
clockobj.innerHTML=hours+"<font color='white'>&nbsp;:&nbsp;</font>"+minutes+" "+"<sup style='font-size:10px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<font color='black'>&nbsp;:&nbsp;</font>"+minutes+" "+"<sup style='font-size:10px'>"+dn+"</sup>"
}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)
}
window.onload=show





/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["diary", "diary_day", "diary_select", "partner", "partner_diary", "partner_work", "partner_card", "advisor", "advisor_contact", "message_menu", "message_list", "message_send", "stats_menu", "stats_data", "settings_menu", "settings_data", "partner_decide", "partner_install_order", "partner_installer", "partner_install", "store_menu", "store_main", "partner_lose","partner_task"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 20 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller







var oldtrcolor

function rowOver(i, nColor) {
  if (!nColor) nColor = "#ECECD9";
  var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
  if (nameObj != null) {
	  oldtrcolor=nameObj.style.background;	  
	  nameObj.style.background=nColor;
	  }
}

function rowOut(i, nColor) {
  var trObj = (document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']");
  var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
  if (trObj == null || trObj.style.display=="none") nameObj.style.background=oldtrcolor;
}


function setallinstall() {

   var asd=document.form.setallinstall.value;

   for (var c = 0; c < form.elements.length; c++)
   if (form.elements[c].type == 'text')
      form.elements[c].value = asd;
}


function sendForm(target){
   // the next 3 lines are the main lines of this script
   //remember to leave action field blank when defining the form!
   if (target == 0) document.form1.action="?func=message_arc";
   if (target == 1) document.form1.action="?func=message_trash";
   if (target == 2) document.form1.action="?func=partner&noset=1";
   if (target == 3) document.form1.action="?func=partner&noset=0";   
   if (target == 4) document.form1.action="?func=diary_add";   
   if (target == 5) document.form1.action="?func=diary_add_partner";   
   if (target == 6) document.form1.action="?func=install_order_give2";   
   if (target == 7) document.form1.action="?func=store_move_ware3";   
   if (target == 8) document.form1.action="?func=store_barcode_gen2";
   if (target == 9) document.form1.action="?func=store_install_ware2";
   if (target == 10) document.form1.action="?func=store_repair_ware2";
   if (target == 11) document.form1.action="?func=supply_order_new2";
   if (target == 12) document.form1.action="?func=store_edit_pages3";
   document.form1.submit();
}

function sendForma(target, param){
   if (target == 0) {
	document.form1.action="?func=diary_add&diary_partner_id=" + param;
	}
   document.form1.submit();
}

function expandcollapse (postid) { 

   whichpost = document.getElementById(postid); 
   
   if (whichpost.className=="postshown") { 
      whichpost.className="posthidden"; 
   } 
   else { 
      whichpost.className="postshown"; 
   } 
} 

function citysearch(param)
{
  ablak = open("index.php?func=citysearch&country_id=" + param, "cegablak", "width=400,height=400,status=no,menubar=no,scrollbars=yes, screenx=0, screeny=0");
}

function waresearch()
{
  ablak = open("index.php?func=waresearch", "cegablak", "width=400,height=400,status=no,menubar=no,scrollbars=yes, screenx=0, screeny=0");
}

function fillcity(param)
{
   opener.document.form1.city.value=param;
   close();
}

function fillware(param)
{
   opener.document.form.moving_ids.value= opener.document.form.moving_ids.value + param + "\n";
   close();
}


function open_help(url)
{
  ablak = open(url, "Management-help", "width=600,height=550,status=no,menubar=no,scrollbars=yes, screenx=0, screeny=0");
}

function open_xls(url)
{
  ablak = open(url, "Management-xls", "width=10,height=10,status=no,menubar=no,scrollbars=yes, screenx=0, screeny=0");
}

