//  ============================================================================
function wo() {
  window.open('/sendfriend/?'+ window.location, 'send', 'width=430,height=350,top=100,left=100,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no');
}

//  ============================================================================
function check_city_type(val, type) { // за кръстосано търсене хотели <--> екскурзии
  if ( !val ) { return -1; }
  
  if ( CitiesS[val] && (getFlag(CitiesS[val][opt_index],Imap[type]) == 1) ) {
    return 1;
  }
  
  return 0;
}

//  ============================================================================
function setInput(frm, el, val) {
  document.forms[frm].elements[el].value = val;
}

//  ============================================================================
function write_name(Arr, val) {
  var name = '';
  if ( Arr[val] ) {
    name = Arr[val][1];
  }
  document.write(name);
}
//  ============================================================================
function showSkype() {
  var skypelnk = $('skypelnk');
  if (!skypelnk.win){
    skypelnk.win = new OAT.Window({close:1,max:0,min:0,width:155,height:140,x:0,y:0,title:"SKYPE",resize:0},OAT.WindowData.TYPE_RECT);
    document.body.appendChild(skypelnk.win.div);
    skypelnk.win.onclose = function(){OAT.Dom.hide(skypelnk.win.div)};
    skypelnk.win.content.style.padding="5px";
    //skypelnk.win.div.style.backgroundColor="#FFF8CC";
    skypelnk.win.div.style.zIndex="1002";
    skypelnk.win.content.innerHTML = '';
    skypelnk.win.content.innerHTML += '<a href="skype:posoka.com.1?call" onclick="return skypeCheck();" style="text-decoration:none"><img src="http://mystatus.skype.com/smallicon/posoka%2Ecom.1" style="border: none;" width="16" height="16" alt="" />&nbsp;www.posoka.com.1</a><br/>';
    skypelnk.win.content.innerHTML += '<a href="skype:posoka.com.2?call" onclick="return skypeCheck();" style="text-decoration:none"><img src="http://mystatus.skype.com/smallicon/posoka%2Ecom.2" style="border: none;" width="16" height="16" alt="" />&nbsp;www.posoka.com.2</a><br/>';
    skypelnk.win.content.innerHTML += '<a href="skype:posoka.com.3?call" onclick="return skypeCheck();" style="text-decoration:none"><img src="http://mystatus.skype.com/smallicon/posoka%2Ecom.3" style="border: none;" width="16" height="16" alt="" />&nbsp;www.posoka.com.3</a><br/>';
    skypelnk.win.content.innerHTML += '<a href="skype:posoka.com.4?call" onclick="return skypeCheck();" style="text-decoration:none"><img src="http://mystatus.skype.com/smallicon/posoka%2Ecom.4" style="border: none;" width="16" height="16" alt="" />&nbsp;www.posoka.com.4</a><br/>';
    skypelnk.win.content.innerHTML += '<a href="skype:posoka.com.5?call" onclick="return skypeCheck();" style="text-decoration:none"><img src="http://mystatus.skype.com/smallicon/posoka%2Ecom.5" style="border: none;" width="16" height="16" alt="" />&nbsp;www.posoka.com.5</a>';
    pos = OAT.Dom.position(skypelnk);
    skypelnk.win.anchorTo(pos[0]+90,pos[1]+20);
  } else {
    if(OAT.Style.get(skypelnk.win.div,'display') == 'none') {
      pos = OAT.Dom.position(skypelnk);
      skypelnk.win.anchorTo(pos[0]+90,pos[1]+20);
      OAT.Dom.show(skypelnk.win.div)
    }else{
      OAT.Dom.hide(skypelnk.win.div)
    }
  }
}
