var lightboxAction = 0;



var GlobalShareMail=0;



function ismaxlength(obj){
      var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
      if (obj.getAttribute && obj.value.length>mlength)
      obj.value=obj.value.substring(0,mlength)
}






var checkValue="";
function selectList(myType,myName,myDelete){

      var booleanAdd=true;
      var stringSelect = document.getElementById(['add'+myName]).innerHTML;
            
      var stringForm = document.getElementById(myName);
      var stringValue = document.myFormAgenda["frm"+myName].value;
      var stringValueTemp = document.myFormAgenda["frmTemp"+myName].value;
      var strValue = stringForm.options[stringForm.selectedIndex].value;
      var strText = stringForm.options[stringForm.selectedIndex].text;
            
      checkValue =  stringValue.split('#'); 
      checkValueTemp =  stringValueTemp.split('#'); 
      checkValue.pop();
      checkValueTemp.pop();
      
      
   
      /**
       *
       * add Item
       */                    
      if(myType==0){
    
          if(strValue!=0){
            for(i=0;i<checkValue.length;i++){
         
                if(checkValue[i] == strValue || strValue == 0){
                      booleanAdd=false;
                }
            }
           }else{
                 booleanAdd=false;
           } 
            
              
            if(booleanAdd){
                  stringValue += strValue+"#";
                  stringValueTemp+= strText+"#";
                  stringSelect+="<div class=\"cellSelectList\">";
                  stringSelect+="<div class=\"cellSelectList0\">"+strText+"</div>";
                  stringSelect+="<div class=\"cellSelectList1\">";
                  stringSelect+="<a href=\"#\" onclick=\"selectList(1,'"+myName+"','"+strValue+"');return false;\">";
                  stringSelect+="<img src=\"img/elements/login/shopImageDelete.gif\" border=\"0\" alt=\"delete\" />";
                  stringSelect+="</a>";
                  stringSelect+="</div>";
                  stringSelect+="<div class=\"clearAll\"></div>";
                  stringSelect+="</div>";
            }
            
      /**
       *
       * delete Item
       */       
      }else if(myType==1){
            stringValue="";
            stringSelect="";
            stringValueTemp="";
            for(i=0;i<checkValue.length;i++){

                 if(checkValue[i] != myDelete ){
                 
                  stringValue += checkValue[i]+"#";
                  stringValueTemp +=checkValueTemp[i]+"#";
                  

                  stringSelect+="<div class=\"cellSelectList\">";
                  stringSelect+="<div class=\"cellSelectList0\">"+checkValueTemp[i]+"</div>";
                  stringSelect+="<div class=\"cellSelectList1\">";
                  stringSelect+="<a href=\"#\" onclick=\"selectList(1,'"+myName+"','"+checkValue[i]+"');return false;\">";
                  stringSelect+="<img src=\"img/elements/login/shopImageDelete.gif\" border=\"0\" alt=\"delete\" />";
                  stringSelect+="</a>";
                  stringSelect+="</div>";
                  stringSelect+="<div class=\"clearAll\"></div>";
                  stringSelect+="</div>";
                }else{
                
                }
        
            }
     
      }
      document.myFormAgenda["frmTemp"+myName].value = stringValueTemp;
      document.getElementById(['add'+myName]).innerHTML=stringSelect;
      document.myFormAgenda["frm"+myName].value = stringValue;
      
}


ArrayShopImageDelete = new Array("Soll dieses Bild definitiv geloescht werden?","Should this image be deleted definitely","Should this image be deleted definitely");

function ActionUploadShop(myType,myShopId,myMemberId,myImageId,myLanguage){
      var VarSender=true;

      if(myType==1){
            if(myLanguage==0){
                  e=confirm(ArrayShopImageDelete[0])
            }else if (myLanguage==1 || myLanguage==10){
                  e=confirm(ArrayShopImageDelete[1])
            }else if (myLanguage==2){
                  e=confirm(ArrayShopImageDelete[2])
            }

            VarSender=false;   
            if(e){
                  VarSender=true;
            }else{
                  return false;
            }
      }
      //document["myForm"+myId].submit();
      VarGlobalSendType=1;

      if(VarSender){
              DivOut = "boxUploadShop";
              http.open('POST','ajax/AjaxUploadShop.php');
              http.onreadystatechange = handleResponse;
              http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
              http.send('AjVal=jdfeiUU56e3reww&AjType='+myType+'&AjShopId='+myShopId+'&AjMemberId='+myMemberId+'&AjImageId='+myImageId+'&AjLanguage='+myLanguage);
      }
  
}


/**
 *
 * mail function
 */  

function ActionShareMailer(myId,myText){
      document.getElementById("cellMailerShare"+myId).innerHTML=myText;
}



function WinMail(myId,myLanguage,myType,myString){

      var LayoutWindow_width = $(document).width();
      var LayoutWindow_height = $(window).height();
      var LayoutDocument_height = $(document).height();

      
      var LayoutScreenTv_height = $("#boxScreenContent").height();   
      
      $('#boxShareMailerTitle').html(myString)
      $('#boxScreenAlpha').css("width",LayoutWindow_width);
      $('#boxScreenAlpha').css("height",LayoutDocument_height);


      $('#boxShareMailer').fadeIn(400);
      
      DivOut = "boxShareMailerContent";
      http.open('POST','ajax/AjaxShareMailer.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjType='+myType+'&AjId='+myId+'&AjLanguage='+myLanguage);
}


function WinMailClose(myType){
      $('#boxShareMailer').fadeOut(400);
      $('#boxScreenAlpha').css("width",0);
      $('#boxScreenAlpha').css("height",0);
}

var VarGlobalSendType=0;

function ActionMail(myId,myLanguage, myType){
      var VarSender=true;

      
      //--> mail 
      
      //--> Vorname
      var VarHobby = document["myFormShare"].frmHobby.value;
      var VarJob = document["myFormShare"].frmJob.value;
      var VarMessage = document["myFormShare"].frmBemerkungen.value;
    
      
      var VarColorError = "#D5C3C3";
      var VarColorCorrect = "#D4D8DC";

      if(VarHobby == ""){
            VarSender = false;
      
            document.getElementById("Hobby").style.backgroundColor= VarColorError;
      }else if(!document["myFormShare"].frmHobby.value.match(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i)){
            VarSender = false;
               document.getElementById("Hobby").style.backgroundColor = VarColorError;
                  document["myFormShare"].frmHobby.value ="";
      }else{
             document.getElementById("Hobby").style.backgroundColor = VarColorCorrect;
      }
      
      if(VarJob == ""){
            VarSender = false;
            document.getElementById("Job").style.backgroundColor= VarColorError;
      }else if(!document["myFormShare"].frmJob.value.match(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i)){
        
            VarSender = false;
               document.getElementById("Job").style.backgroundColor= VarColorError;
                  document["myFormShare"].frmJob.value ="";
      }else{
             document.getElementById("Job").style.backgroundColor = VarColorCorrect;
      }



      if(VarSender){
      //document["myForm"+myId].submit();
      VarGlobalSendType=1;

              DivOut = "boxShareMailerContent";
              http.open('POST','ajax/AjaxShareMailer.php');
              http.onreadystatechange = handleResponse;
              http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
              http.send('AjVal=jdfeiUU56e3reww&AjType='+myType+'&AjId='+myId+'&AjLanguage='+myLanguage+'&AjHobby='+VarHobby+'&AjJob='+VarJob+'&AjMessage='+VarMessage);
      
      }
}



/**
 *
 * print function
 */  

function printer(){
      this.print();
      this.close();
}

var win;
function WinPrint(myVI,myVL,myId){
      var wt=400;
      var ht=100;
      var lt=(screen.width/2)-(wt/2);
      var tp=(screen.height/2)-(ht/2);
      win=window.open("print/index.php?VSingle="+myVI+"&VL="+myVL, "id","status=yes, scrollbars=yes,menubars=no,resizable=yes,toolbars=no,height="+ht+",width="+wt+",top="+tp+",left="+lt)
      win.focus;
}




 var map; 
 var ew;

 var MapZoomGlobal = 8;
 var MapTypeGlobal;
 var myBGlobal = 47.3780;
 var myLGlobal = 8.5398;  
 
 var insertBGlobal;
 var insertLGlobal;  
 

 
////E window

var varEwinOpenGlobal=0;

var marker;
var mapInsert = null;
var geocoder = null;
    
var arrayPoint = new Array("0");

function actionStartMap(myType) {
      if (GBrowserIsCompatible()) {

            var gmarkers = [];
            var i = 0;
 
            function createMarker(point,html,myId) {
                  if(myType){
                        marker = new GMarker(point, {draggable: false});
                  }else{
                        marker = new GMarker(point, {draggable: true});
                  }
                 

   

            gmarkers[myId] = marker;
            var i = myId
            return marker;
      }   
      
      function myclick(i) {
        GEvent.trigger(gmarkers[i], "click");
      }

      map = new GMap2(document.getElementById("BoxMapMain"+AgendaIdGlobal));
      
      map.addControl(new GLargeMapControl());

      map.setCenter(new GLatLng(myBGlobal ,myLGlobal ), MapZoomGlobal,MapTypeGlobal);
      map.setMapType(G_HYBRID_MAP);
      /*
      GEvent.addListener(map, "moveend", function() {
            var center = map.getCenter();
    
            center = center.toString(); 
            window.status = center;
            strPos1 = center.indexOf("(");
            strPos2 = center.indexOf(",");
            strPos3 = center.indexOf(")");

            myBGlobal = center.slice((strPos1+1),strPos2)
            myLGlobal = center.slice((strPos2+1), strPos3)
            myMapZoomGlobal = map.getZoom();
     });       
    */
      var point =  new GLatLng(myBGlobal ,myLGlobal );
                    //salert("???"+arrayPoint[i][0])
      marker = createMarker(point,'',AgendaIdGlobal);
      map.addOverlay(marker);
    }
    

GEvent.addListener(marker, "dragend", function() {
   document.getElementById("FieldGeoInfo").innerHTML="if position is correct <a href=\"#\" onclick=\"ActionAgendaLocation(0);return false;\">close window</a>";

      //marker.openInfoWindowHtml(VarHtmlContent);
      GlobalPoint = marker.getPoint().toUrlValue();
document.myFormAgenda.frmGeoLatitude.value=GlobalPoint;

  });
}


function showAddressInfo(){
      document.getElementById("FieldGeoInfo").innerHTML="click button go and search";
}
    
function showAddress() {
   document.getElementById("FieldGeoInfo").innerHTML="drag marker to position";
      var geo = new GClientGeocoder(); 
        var search = document.getElementById("agendaSearch").value;
        

        // ====== Perform the Geocoding ======        
        geo.getLocations(search, function (result){ 
            // If that was successful
            if (result.Status.code == G_GEO_SUCCESS) {
              // How many resuts were found
              //document.getElementById("message").innerHTML = "Found " +result.Placemark.length +" results";
              // Loop through the results, placing markers
              for (var i=0; i<1; i++) {
                var p = result.Placemark[i].Point.coordinates;
                //var markerD = new GMarker(new GLatLng(p[1],p[0]));
                //document.getElementById("message").innerHTML += "<br>"+(i+1)+": "+ result.Placemark[i].address + marker.getPoint();
                //map.addOverlay(markerD);
                
             
                marker.setPoint(new GLatLng(p[1],p[0]));
               marker.enableDragging();
                map.setCenter(new GLatLng(p[1],p[0]), 11);
                
               // marker.openInfoWindowHtml(VarHtmlContent);
              }
          
}})}
              
function resetAddress(){
var point = new GLatLng(46.78,8.4);
                markerD.setPoint(point);
                map.setCenter(point, 8);
}


function getDistrict(myB,myL,myZoom,myType){




      MapZoomGlobal = myZoom; 
      map.setCenter(new GLatLng(myBGlobal ,myLGlobal ), MapZoomGlobal ,MapTypeGlobal);
}     
    
    
//getDistrict(47.3720 ,8.5448, 15)

function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer") {
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();


var YearGlobal;
var MonthGlobal=999;;
var RegattaStartGlobal=0;
var KlasseGlobal=0;
var SearchGlobal="";
var AgendaIdGlobal;
var ShowAllGlobal=0;
var win;

function ActionAgendaPrint(myType,myLanguage,myVersionId){
var wt=800;
var ht=700;


lt=(screen.width/2)-(600/wt);
tp=(screen.height/2)-(800/ht);


win=window.open("pdfOut/index.php?vl="+myLanguage+"&AjType="+myType+"&AjVersionId="+myVersionId+"&AjYear="+YearGlobal+"&AjMonth="+MonthGlobal+"&AjRegattaStart="+RegattaStartGlobal+"&AjSearch="+SearchGlobal+"&AjKlasse="+KlasseGlobal+"&AjShowAll="+ShowAllGlobal, "id","status=yes, scrollbars=yes,menubars=no,resizable=yes,toolbars=no,height="+ht+",width="+wt+",top="+tp+",left="+lt)
win.focus;


}

function InnitSingle(myId,myLang,myLat){
AgendaIdGlobal=myId;
            myBGlobal = myLang;
            myLGlobal = myLat; 
                  actionStartMap(1)
                  getDistrict(myBGlobal,myBGlobal,MapZoomGlobal,MapTypeGlobal)


}



function ActionAgendaDisplay(myType,myLanguage,myId,myLang,myLat){
      if(myType==1){
          $('#boxAgendaDisplay'+AgendaIdGlobal).fadeOut(400);
          AgendaIdGlobal="";
      }else{
            if(AgendaIdGlobal!=""){
                  $('#boxAgendaDisplay'+AgendaIdGlobal).fadeOut(400);
            }
            
            
            if(myLang != ""){
                  myBGlobal = myLang;
                  myLGlobal = myLat; 
            }else{
                  myBGlobal = 0;
                  myLGlobal = 0; 
            }
            
      
      
            AgendaIdGlobal=myId;
            DivOut = "boxAgendaDisplay"+AgendaIdGlobal;
                  $('#'+DivOut).fadeIn(400);
            
            
            http.open('POST','ajax/AjaxAgenda.php');
            http.onreadystatechange = handleResponse;
            http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
            http.send('AjVal=jdfeiUU56e3reww&AjLanguage='+myLanguage+'&AjType='+myType+'&AjId='+myId);
      }


}

function ActionAgendaLocation(myType){

if(myType){
      AgendaIdGlobal=10;
      $('#FieldGeo').fadeIn(400);
      actionStartMap(0)
      DivOut = "FieldGeoContent";
}else{

     $('#FieldGeo').fadeOut(400);
}
}





var VarSearch="";
function ActionAgendaSearch(myType,myPageRegatta,myLanguage,myAction, myBwd, myFwd,myFlipType){

      /**
       *
       * Year 
       */                    
      if(myAction==1){
            var VarYear = document.myFormAgenda.frmYear.options[document.myFormAgenda.frmYear.selectedIndex].value
            YearGlobal = VarYear;
      }
      
      /**
       *
       * Month
       */                    
      if(myAction==2){
            var VarMonth = document.myFormAgenda.frmMonth.options[document.myFormAgenda.frmMonth.selectedIndex].value
            MonthGlobal = VarMonth;
      }
      
      /**
       *
       * Regatta Start
       */                    
      if(myAction==3){
            if( document.myFormAgenda.frmRegattaStart[0].checked == true ){
                  VarRegattaStart=0;
            }else{
                  VarRegattaStart=1;
            }
            RegattaStartGlobal =VarRegattaStart;
      }

      /**
       *
       * search field
       */               
            
      if(myAction==4){
      
          VarSearch = document.myFormAgenda.frmAgendaSearch.value;

          
          SearchGlobal = VarSearch;
      }
      
      /**
       *
       * Class select
       */                    
      if(myAction==5){
            var VarKlasse = document.myFormAgenda.frmKlasse.options[document.myFormAgenda.frmKlasse.selectedIndex].value
            KlasseGlobal = VarKlasse;
      }
        /**
       *
       * all / not sailded regaatas
       */                    
      if(myAction==6){
            if( document.myFormAgenda.frmShowAll[0].checked == true ){
                  VarShowAll=0;
            }else{
                  VarShowAll=1;
            }
            ShowAllGlobal =VarShowAll;
      }
      
      /**
       *
       * reset search field
       */                    
      if(myAction==10){
          VarSearch="";
          document.myFormAgenda.frmAgendaSearch.value=VarSearch ;
          SearchGlobal = VarSearch;
      
      
      }
      DivOut = "boxAgenda";
      http.open('POST','ajax/AjaxAgenda.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjLanguage='+myLanguage+'&AjType='+myType+'&AjPageRegatta='+myPageRegatta+'&AjYear='+YearGlobal+'&AjMonth='+MonthGlobal+'&AjShowAll='+ShowAllGlobal+'&AjSearch='+SearchGlobal+'&AjKlasse='+KlasseGlobal+'&AjBwd='+myBwd+'&AjFwd='+myFwd+'&AjFlipType='+myFlipType);
}



function closePluginWindow(myAction){
      $('#boxScreenContent').fadeOut(400);
      $('#boxScreenAlpha').css("width",0);
      $('#boxScreenAlpha').css("height",0);
      
      if(myAction){
            $('#boxScreenTv').fadeOut(400, function() {
                  document.getElementById("boxScreenContentInner").innerHTML="";
            });
      }
}


function  movePluginWindow(myVideo){
     

}

var posTv=0;
function ActionTvMenu(myImageId, myImage, myType,myLanguage) {


      $('#boxScreenTv').css("top",posTv);
      $('#boxScreenTv').fadeIn(400);
      
      DivOut = "boxScreenTvInner";
      
      http.open('POST','ajax/AjaxTvMenu.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjImageId='+myImageId+'&AjImage='+myImage+'&AjType='+myType+'&AjLanguage='+myLanguage);
}


function ActionExternDisplay(myType,myId,myLanguage,myAction,myVersionId) {
            var newPos = 80;
            
            var LayoutWindow_width = $(document).width();
            var LayoutWindow_height = $(window).height();
            var LayoutDocument_height = $(document).height();
            var LayoutScreenTv_height = $("#boxScreenContent").height();   
            
            $('#boxScreenAlpha').css("width",LayoutWindow_width);
            $('#boxScreenAlpha').css("height",LayoutDocument_height);
            //var newPos = (LayoutWindow_height-LayoutScreenTv_height)-120;

            var boxScreenTv_top = LayoutWindow_height-newPos;
              //alert(LayoutWindow_height+"---"+newPos+"---"+boxScreenTv_top)
            $('#boxScreenContent').css("top",newPos);
            posTv=newPos;
      
            $('#boxScreenContent').fadeIn(400);

      DivOut = "boxScreenContentInner";
      http.open('POST','ajax/AjaxExtern.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjId='+myId+'&AjType='+myType+'&AjLanguage='+myLanguage+'&AjVersionId='+myVersionId);

}
/**
 *
 *
 */  
function ActionTvDisplay(myImageId, myImage, myType,myLanguage,myAction,myVersionId) {

      if(!myAction){
            var newPos = 80;
            
            var LayoutWindow_width = $(document).width();
            var LayoutWindow_height = $(window).height();
            var LayoutDocument_height = $(document).height();
            var LayoutScreenTv_height = $("#boxScreenContent").height();   
            
            $('#boxScreenAlpha').css("width",LayoutWindow_width);
            $('#boxScreenAlpha').css("height",LayoutDocument_height);
            //var newPos = (LayoutWindow_height-LayoutScreenTv_height)-120;

            var boxScreenTv_top = LayoutWindow_height-newPos;
              //alert(LayoutWindow_height+"---"+newPos+"---"+boxScreenTv_top)
            $('#boxScreenContent').css("top",newPos);
            posTv=newPos;
      
            $('#boxScreenContent').fadeIn(400);
            setTimeout(function(){ActionTvMenu(myImageId, myImage, myType,myLanguage)},1500);
      }

      DivOut = "boxScreenContentInner";
      http.open('POST','ajax/AjaxTv.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjImageId='+myImageId+'&AjImage='+myImage+'&AjType='+myType+'&AjLanguage='+myLanguage+'&AjVersionId='+myVersionId);

}

/**
 *
 * open Video/Image Window
 */   
function ActionDisplay(myImageId, myImage, myType,myLanguage) {


      var LayoutWindow_width = $(document).width();
      var LayoutWindow_height = $(window).height();
      var LayoutDocument_height = $(document).height();
      
      
      var LayoutScreenTv_height = $("#boxScreenContent").height();   
      
         
      $('#boxScreenAlpha').css("width",LayoutWindow_width);
      $('#boxScreenAlpha').css("height",LayoutDocument_height);
      //var newPos = (LayoutWindow_height-LayoutScreenTv_height)-120;
      var newPos = 40;
      var boxScreenTv_top = LayoutWindow_height-newPos;
        //alert(LayoutWindow_height+"---"+newPos+"---"+boxScreenTv_top)
      $('#boxScreenContent').css("top",newPos);
      posTv=newPos;
      
      $('#boxScreenContent').fadeIn(400);

      DivOut = "boxScreenContentInner";
      http.open('POST','ajax/AjaxImage.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjImageId='+myImageId+'&AjImage='+myImage+'&AjType='+myType+'&AjLanguage='+myLanguage);
}




function  handleResponse() {
      if(http.readyState == 4){
            var response = http.responseText;
            var update = new Array();

            if(response.indexOf('|' != -1)) {
                  update = response.split('|');
            }

            document.getElementById(DivOut).innerHTML = response; 
            
            if(DivOut == "boxShareMailerContent" && VarGlobalSendType==1){
                  setTimeout("WinMailClose()",5600);
                 
            }
            
            if(DivOut=="boxAgendaDisplay"+AgendaIdGlobal && myBGlobal !=0){
                  actionStartMap()
                  getDistrict(myBGlobal,myBGlobal,MapZoomGlobal,MapTypeGlobal)
            }
            
            
	    }
}


function initLightbox(myType) {

var myType=1;


if(myType==1) {
	lightboxAction = 1;
//ActionDisplay();

}


document.getElementById("boxScreenContent").style.top = 120+"px";
document.getElementById("boxScreenContent").style.left = 120+"px";

document.getElementById("boxScreenContent").style.height = 250 +"px"; 
document.getElementById("boxScreenContent").style.width = 300+"px";


if(lightboxAction==1) {


document.getElementById("boxScreenAlpha").style.top = 140+"px";
document.getElementById("boxScreenAlpha").style.left = 198+"px";

document.getElementById("boxScreenAlpha").style.height = 500 +"px"; 
document.getElementById("boxScreenAlpha").style.width = 840+"px";


}


}



function initLightbox(myType) {
var arrayPageSize = this.getPageSize();

		var height = arrayPageSize[1];
		var width = arrayPageSize[0];


		if(myType==1) {
			lightboxAction = 1;
		}

		//document.getElementById("boxScreenContent").style.top = getScrollXY()+"px";





if(lightboxAction==1) {



    var browser = navigator.appName;

    if(browser == "Microsoft Internet Explorer") {
            //document.getElementById("boxScreenAlpha").style.height = document.body.offsetHeight+"px";
    } else {
            
//var height = window.innerHeight;
if( window.scrollMaxY){
//height += window.scrollMaxY;

}




    
}



document.getElementById("boxScreenAlpha").style.top = 0 +"px";
document.getElementById("boxScreenAlpha").style.left = 0 +"px";
document.getElementById("boxScreenAlpha").style.height = height +"px";


document.getElementById("boxScreenContent").style.top = 120+"px";
document.getElementById("boxScreenContent").style.left =  parseInt((width/2)-150)+"px";

document.getElementById("boxScreenContent").style.height = 250 +"px"; 
document.getElementById("boxScreenContent").style.width = 300+"px";


//document.getElementById("boxScreenAlpha").style.width = 590+"px";
document.getElementById("boxScreenAlpha").style.width =  (width)+"px";



window.scrollTo(0,0);









var t = (height/2)-265;

var l = (document.body.offsetWidth/2)-360;





document.getElementById("boxScreenContent").style.display = "block";

}

}

window.onresize = initLightbox; 
//window.onload=initBackground;

