/**********************************************************************************************************************/
/**///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**/
/**/      // WEBDRESSING MEDIA SUPPLY cms - COMMON JS
/**/
/**/      // (c) 2008 webdressing media supply
/**/      // http://www.webdressing.de
/**/      // webmail@webdressing.de
/**/
/**********************************************************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

<!--
var win=null;
function bgOpenWindow(mypage,myname,w,h,pos,infocus){
    if(pos=="random"){
        myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
        mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
    }
    if(pos=="center"){
        myleft=(screen.width)?(screen.width-w)/2:100;
        mytop=(screen.height)?(screen.height-h)/2:100;
    } else if((pos!='center' && pos!="random") || pos==null){
        myleft=0;mytop=20
    }
    settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
    win=window.open(mypage,myname,settings);
win.focus();}
// -->

/**********************************************************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


/**********************************************************************************************************************/
/**////// CLEAR FIELDS ////////////////////////////////////////////////////////////////////////////////////////////////

function clearField(field) {
  if (!field.base) { field.base = field.value; }
  if (field.value == field.base) { field.value = ""; }
  else if (field.value == "") { field.value = field.base; }
}

/**********************************************************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


/**********************************************************************************************************************/
/**////// JQUERY COMMONS //////////////////////////////////////////////////////////////////////////////////////////////

$(document).ready(function() {
  $("#cities").asmSelect( {
    animate: true,
    highlight: true,
    sortable: false
  });
  $("#add_city_btn").click(function() {
    var city = $("#add_city").val();
    var $option = $("<option></option>").text(city).attr("selected", true);
    $("#cities").append($option).change(); $("#add_city").val(''); return false;
  });

});


/**********************************************************************************************************************/

animatedcollapse.addDiv('cmsmessage','fade=1','hide=0')
animatedcollapse.addDiv('sub_hints','fade=1','hide=0')
animatedcollapse.addDiv('repops_show','fade=1','hide=1')
animatedcollapse.addDiv('repera_show','fade=1','hide=1')
animatedcollapse.addDiv('rephol_show','fade=1','hide=1')
animatedcollapse.init()

/**********************************************************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
