$(document).ready(function(){
var ajaxloader = "./pics/icons/ajax-loader.gif";
// At a Glance
$(".Navi input").hover(
function () {
if (!$(this).hasClass("Selected")) {
$(this).removeAttr("class");
$(this).addClass("Mouseover");
}
},
function () {
if (!$(this).hasClass("Selected")) {
$(this).removeAttr("class");
$(this).addClass("Mouseout");
}
}
);
$(".vorliebenCheckbox").hover(
function () {
$(this).css({"borderBottom":"1px solid black"});
},
function () {
$(this).css({"borderBottom":"0px"});
}
);
$("#submitFreischaltCode").click(function() {
var Code = $("#InputFreischaltCode").val();
var AZID = $(this).attr("name");
//alert(AZID);
$.get("./php/inc/calendar.freischalt.code.php?Val="+Code, function(data) {
//alert(data);
if (data) {
$("#freischaltcodeinfo").html("Ihr Guthaben wurde Gut geschrieben");
//alert(document.getElementById("calinfo2").innerHTML);
var AktuellDatum = new Date();
ShowCalender(AZID, AktuellDatum.getMonth(), AktuellDatum.getFullYear(), 0);
}
else {
$("#freischaltcodeinfo").html("Der Code stimmt entweder nicht oder er ist abgelaufen");
}
});
});
//infotext
$("#infotext_bausteine").hide();
//$("#konto_data").corner("corner 5px");
$("#radioService01").click( function(){
GetInfoText();
});
$("#radioService02").click( function(){
GetInfoText();
});
$("#infotext_baustein_service_show").click(function(){
if ($("#infotext_baustein_service").is(":hidden")) {
$("#bg_infotextbaustein_kontakt_bottom_open").hide();
$("#bg_infotextbaustein_kontakt_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_open").hide();
$("#bg_infotextbaustein_body_bottom_close").show();
$("#bg_infotextbaustein_service_bottom_close").hide();
$("#bg_infotextbaustein_service_bottom_open").show();
$("#infotext_baustein_service_show").find("img:first").attr("src", "./pics/icons/minus.gif");
$("#infotext_baustein_kontakt_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_body_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_body").hide();
$("#infotext_baustein_kontakt").hide();
$("#infotext_baustein_service").animate({
"height": "toggle", "opacity": "show"
}, { "duration": "slow" }
);
//$(".textbaustein").corner();
}
else {
$("#bg_infotextbaustein_kontakt_bottom_open").hide();
$("#bg_infotextbaustein_kontakt_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_open").hide();
$("#bg_infotextbaustein_body_bottom_close").show();
$("#bg_infotextbaustein_service_bottom_close").show();
$("#bg_infotextbaustein_service_bottom_open").hide();
$("#infotext_baustein_service_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_service").hide();
}
});
$("#infotext_baustein_body_show").click(function(){
if ($("#infotext_baustein_body").is(":hidden")) {
$("#itextBody").css({"backgroundColor":"red"});
$("#bg_infotextbaustein_kontakt_bottom_close").show();
$("#bg_infotextbaustein_kontakt_bottom_open").hide();
$("#bg_infotextbaustein_service_bottom_close").show();
$("#bg_infotextbaustein_service_bottom_open").hide();
$("#bg_infotextbaustein_body_bottom_close").hide();
$("#bg_infotextbaustein_body_bottom_open").show();
$("#infotext_baustein_body_show").find("img:first").attr("src", "./pics/icons/minus.gif");
$("#infotext_baustein_kontakt_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_service_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_service").hide();
$("#infotext_baustein_kontakt").hide();
$("#infotext_baustein_body").animate({
"height": "toggle", "opacity": "show"
}, { "duration": "slow" }
);
//$(".textbaustein").corner();
}
else {
$("#bg_infotextbaustein_service_bottom_open").hide();
$("#bg_infotextbaustein_service_bottom_close").show();
$("#bg_infotextbaustein_kontakt_bottom_open").hide();
$("#bg_infotextbaustein_kontakt_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_open").hide();
$("#infotext_baustein_body_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_body").hide();
}
});
$("#infotext_baustein_kontakt_show").click(function(){
if ($("#infotext_baustein_kontakt").is(":hidden")) {
$("#bg_infotextbaustein_kontakt_bottom_close").hide();
$("#bg_infotextbaustein_kontakt_bottom_open").show();
$("#bg_infotextbaustein_service_bottom_close").show();
$("#bg_infotextbaustein_service_bottom_open").hide();
$("#bg_infotextbaustein_body_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_open").hide();
$("#infotext_baustein_kontakt_show").find("img:first").attr("src", "./pics/icons/minus.gif");
$("#infotext_baustein_service_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_body_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_body").hide();
$("#infotext_baustein_service").hide();
$("#infotext_baustein_kontakt").animate({
"height": "toggle", "opacity": "show"
}, { "duration": "slow" }
);
//$(".textbaustein").corner();
}
else {
$("#bg_infotextbaustein_service_bottom_open").hide();
$("#bg_infotextbaustein_service_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_close").show();
$("#bg_infotextbaustein_body_bottom_open").hide();
$("#bg_infotextbaustein_kontakt_bottom_open").hide();
$("#bg_infotextbaustein_kontakt_bottom_close").show();
$("#infotext_baustein_kontakt_show").find("img:first").attr("src", "./pics/icons/plus.gif");
$("#infotext_baustein_kontakt").hide();
}
});
$("#show_infotext_bausteine").click(function() {
if ($("#infotext_bausteine").is(":hidden")) {
$("#show_infotext_bausteine span img").attr("src", "./pics/icons/down.gif");
$("#bg_infotextbaustein_bottom_close").hide();
$("#bg_infotextbaustein_bottom_open").show();
$("#infotext_bausteine").slideDown();
}
else {
$("#show_infotext_bausteine span img").attr("src", "./pics/icons/right2.gif");
$("#bg_infotextbaustein_bottom_close").show();
$("#bg_infotextbaustein_bottom_open").hide();
$("#infotext_bausteine").slideUp();
}
});
// $(".calwidthheight").hide();
$("#btnSearchExternAZ").click(function() {
var SName = escape($("#SName").val());
var SRegion = escape($("#SRegion").val());
var SGebiet = escape($("#SGebiet").val());
$.post("./php/content.konto.anzeigen.group.extern.search.php", {SName: SName, SRegion: SRegion, SGebiet: SGebiet }, function(entries) {
$("#ExternAZ").html(entries);
});
});
if ($("#externeAnzeigen")) {
$.post("./php/content.konto.anzeigen.group.extern.entries.php", function(entries) {
$("#externeAnzeigen").html(entries);
});
}
if ($("#externeAnfragen")) {
$.post("./php/content.konto.anzeigen.group.extern.anfragen.php", function(entries) {
$("#externeAnfragen").html(entries);
});
}
$(".PDatenInput").blur(function() {
$(this).next().remove();
});
$(".PDatenInput").keyup(function() {
var textar = $(this).val();
var max = $(this).attr("maxlength");
var DivObj = $(this).parents();
DivObj = DivObj[0];
if (textar.length >= max && max > 0 && max) {
$(this).val(textar.substring(0,max));
textar = textar.substring(0,max);
}
if ($(DivObj).find("div").length == 0 && max > 0 && max) {
$(this).after("
");
}
if (max > 0 && max) $(DivObj).find("div").text((textar.length)+"/"+max);
} );
/* Hover */
$("#liVorgemerkt").hover(
function() {
if ($(this).find("img").attr("src") == "./pics/freischaltung/freischaltungen.jpg") {
$(this).find("img").attr("src","./pics/freischaltung/freischaltungen_mouseover.jpg");}
},
function() {
if ($(this).find("img").attr("src") == "./pics/freischaltung/freischaltungen_mouseover.jpg") {
$(this).find("img").attr("src","./pics/freischaltung/freischaltungen.jpg");}
}
);
$("#liFreigeschalten").hover(
function() {
if ($(this).find("img").attr("src") == "./pics/freischaltung/freischaltungen.jpg") {
$(this).find("img").attr("src","./pics/freischaltung/freischaltungen_mouseover.jpg");}
},
function() {
if ($(this).find("img").attr("src") == "./pics/freischaltung/freischaltungen_mouseover.jpg") {
$(this).find("img").attr("src","./pics/freischaltung/freischaltungen.jpg");}
}
);
$(".calwidthheight").mouseleave(
function () {
if (TageVorgemerktCount() == 0) {
if ($("#AlertActivation").is(":visible")) $("#AlertActivation").fadeOut(7000);
//jquery-ui-personalized-1.6rc6.js
/*
$("#calinfo2 button").effect("pulsate", { times:1 }, 800);
var Dest = "#calinfo2 button";
$(this).effect("transfer", {
to: Dest
},
1000
);*/
}
}
);
ShowKontoNavi();
});
function RKontoNaviAnzeigen () {
$("#NaviRAnzeigen").toggle();
}
function ShowKontoNavi() {
$.getJSON("./php/inc/konto.navigation.php",
function(data){
var output = '';
var objbox = $('#KontoNaviBox #NaviRAnzeigen');
$(objbox).html("");
//output += '\n';
var count = 0;
var disp = "display:block; ";//"display:none; ";
//alert(data[0].Freigeschalten);
//alert(print_r(data, 0));
for (p in data) {
count++;
var form = "";
var css = "font-weight:normal; ";
var out = data[p].AnzeigeName;
var azid = data[p].Anzeigen_ID;
var uid = data[p].User_ID;
var picid = data[p].Pic_Name;
var picpath = "./customer_pics/"+uid+"/"+azid+"/thumbnail/"+picid;
if (data[p]._Selected) var css = "font-weight:bold;";
form="';
$(objbox).append(form);
}
if (count == 0) $(objbox).append("");
GetOnlineStatus($('#online_status'), "");
//$('#KontoNaviBox').html(output);
//ShowTreffer();
});
}
function TransferInfoText (uoc) {
var it = $("#tmp_infotext").html();
//alert(it);
it = it.replace(/
/g, "\n");
it = it.replace(/
/g, "\n");
it = it.replace(/<[^>]*>/g, "");
//it = it.replace(//g, "");
//it = it.replace(//g, "");
//it = it.replace(/<\/span>/g, "");
//it = it.replace(/<\/SPAN>/g, "");
//it = it.replace(//g, "");
//it = it.replace(/<\/div>/g, "");
//alert(it);
$("#tmp_infotext").effect("transfer", {
to: "#infotext"
},
800
);
if (uoc == "o") {
it+=$("#infotext").val();
$("#infotext").val(it);
}
if (uoc == "u") {
it = $("#infotext").val() + it;
$("#infotext").val(it);
}
ShowSaveButton('13');
}
function GetInfoText(ID) {
//Body
var AZName = $("#infotextAZName").html();
var Dest = "#"+ID+"_tmp";
$("#"+ID).effect("transfer", {
to: Dest
},
800
);
infotext = "" + AZName.toUpperCase() + "
"
+ AZName + " "
+ "" + $("#infotext00").val() + " "
+ "" + $("#infotext01").val() + " "
+ "" + $("#infotext02").val() + " "
+ "" + $("#infotext03").val() + " "
+ "" + $("#infotext04").val() + " "
+ "" + $("#infotext05").text() + " "
+ "" + $("#infotext06").val() + " "
+ "" + $("#infotext07").text() + " ";
infotext+="
";
infotext+= "" + $("#infotext10").val() + " "
+ "" + $("#infotext11").val() + " "
+ "" + $("#infotext12").val() + " "
+ "" + $("#infotext13").text() + " "
+ "" + $("#infotext14").val() + " "
+ "" + $("#infotext15").val() + " "
+ "" + $("#infotext16").text() + " "
+ "" + $("#infotext17").val() + " "
+ "" + $("#infotext18").val() + " ";
infotext+="
";
infotext+= "" + $("#infotext20").text() + " "
+ "" + $("#infotext21").text() + " "
+ "" + $("#infotext22").text() + " "
+ "" + $("#infotext23").val() + " "
+ "" + $("#infotext24").text() + " "
+ "" + $("#infotext25").val() + " ";
infotext+="
";
//Service
//if ($("#radioService01").attr("checked") == true) {
infotext+= "" + $("#infotext30").val() + " "
+ "" + $("#infotext31").val() + ", "
+ "" + $("#infotext32").val() + ", "
+ "" + $("#infotext33").val() + " "
+ "" + $("#infotext34").val() + " ";
//}
/*
if ($("#radioService02").attr("checked") == true) {
infotext+= $("#infotext40").text() + " "
+ $("#infotext41").val() + " "
+ $("#infotext42").html() + " "
+ $("#infotext43").html() + " "
+ $("#infotext44").val() + " ";
}
*/
infotext+="
";
//Kontakt
infotext+= "" + $("#infotext50").val() + " ";
infotext+="
";
infotext+= "" + $("#infotext60").val() + " "
+ "" + $("#infotext61").text() + " "
+ "" + $("#infotext62").text() + " "
+ "" + $("#infotext63").val() + " "
+ "" + $("#infotext64").text() + " "
+ "" + $("#infotext65").val() + " "
+ "" + $("#infotext66").text() + " "
+ "" + $("#infotext67").val() + " "
+ "" + $("#infotext68").text() + " "
+ "" + $("#infotext69").val() + " "
+ "" + $("#infotext610").text() + " ";
//infotext+="
";
//infotext+= $("#infotext70").text() + " "
//+ $("#infotext71").val() + " ";
$("#tmp_infotext").html(infotext);
}
function GetNext(TrefferProSite, Position, Range) {
$.post("./php/content.konto.anzeigen.group.extern.entries.php",
{TrefferProSite: TrefferProSite, Position: Position, Range: Range }, function(entries) {
$("#externeAnzeigen").html(entries);
});
}
function GetNextAnfrage(TrefferProSite, Position, Range) {
$.post("./php/content.konto.anzeigen.group.extern.anfragen.php",
{TrefferProSite: TrefferProSite, Position: Position, Range: Range }, function(entries) {
$("#externeAnfragen").html(entries);
});
}
function GetNextSearchEntry(TrefferProSite, Position, Range) {
var SName = escape($("#SName").val());
var SRegion = escape($("#SRegion").val());
var SGebiet = escape($("#SGebiet").val());
$.post("./php/content.konto.anzeigen.group.extern.search.php",
{TrefferProSite: TrefferProSite, Position: Position, Range: Range,
SName: SName, SRegion: SRegion, SGebiet: SGebiet }, function(entries) {
$("#ExternAZ").html(entries);
});
}
function SaveGroupAnzeige(SourceAZ, AZ, ExternIntern, Status) {
$.post("./php/inc/save.az.group.php", {SAZID: SourceAZ, AZID: AZ, ExternIntern: ExternIntern, Status: Status }, function(sql) {
$.post("./php/content.konto.anzeigen.group.extern.anfragen.php", function(anfragen) {
$("#externeAnfragen").html(anfragen);
if (Status > 0 || Status == -1) {
$.post("./php/content.konto.anzeigen.group.extern.entries.php", function(entries) {
$("#externeAnzeigen").html(entries);
});
}
});
});
}
function SubmitForm(Link) {
//document.UserDatFormular.action = "index.php?Section=Konto.Anzeigen.Detail";
document.getElementById('UserDatFormular').action = Link;
document.getElementById('UserDatFormular').submit();
}
function AnzeigenThumb(Link) {
$.get("./php/inc/anzeigen.thumbnails.php?"+Link, function(text){
if (text != "") {
document.getElementById("AnzeigenThumbnail").innerHTML = text;
}
});
}
function ShowSaveButton(ID) {
$("#"+ID).fadeIn();
//document.getElementById(ID).style.display = "inline";
}
/********************************************************************/
/********************************************************************/
/********************************************************************/
/* Kalender Funktionen */
/********************************************************************/
/********************************************************************/
/********************************************************************/
var ids = new Array();
var KWKlick_Arr = new Array();
var AjaxLoaderImg = "
";
var FoV = 1;
var UseGuthaben = true;
var infotext = "";
function ShowCalender(AZ, month, year, NewAZ) {
NewAZ = 0;
/*if (NewAZ == 0) {
ids = new Array();
FoV = 1;
infotext = "";
$("#cont"+AZ).hide();
$(".calwidthheight").hide();
}*/
var CalCount = document.getElementsByName("cal").length;
if (CalCount > 0) CalCount--;
for (i=0; i<=CalCount; i++) {
if (document.getElementsByName("cal")[i]) {
id = document.getElementsByName("cal")[i].id
if (document.getElementById(id)) {
document.getElementById(id).innerHTML = "";
}
}
}
if (document.getElementById(AZ)) {
document.getElementById(AZ).innerHTML = AjaxLoaderImg;
}
$.get("./php/konto/aktivieren/kalender/inc/calendar.php?AZ="+AZ+"&month="+month+"&year="+year+"&FoV="+FoV,
function(text){
if (text != "") {
document.getElementById(AZ).innerHTML = text;
//$("#cont"+AZ+":hidden:first").fadeIn("slow");
$("#cont"+AZ).show();
$.get("./php/inc/get.guthaben.php", function(text) {
document.getElementById("Guthaben").value = text;
setSelectedDays(month, year, AZ, NewAZ);
});
}
});
//window.setTimeout("setSelectedDays("+month+", "+year+", '"+AZ+"')", 300);
}
function CalTableMouseOut(Obje) {
var TableTD = $(Obje).parents();
TableTD = TableTD[1];
alert($(TableTD).attr("id"));
}
function setSelectedDays(month, year, AZ, NewAZ) {
for (var id_u_KW in ids) {
//obj = document.getElementById(id);
//alert(id);
var id = id_u_KW.split("@");
id = id[0];
if (ids[id] && document.getElementById(id)) {
//document.getElementById(id).style.backgroundColor = "red";
var TableTD = $("#"+id).parents();
TableTD = TableTD[0];
$(TableTD).css("backgroundColor", "red");
$(TableTD).find("div").css("color", "white");
//$("#"+id).find("div").css("backgroundColor", "red");
}
}
ShowVorgemerkt(month, year, AZ, NewAZ);
/*
if (document.getElementById("calinfo")) {
document.getElementById("calinfo").innerHTML = TageVorgemerktCount() + " Tage vorgemerkt";
}
PrintInfoText(month, year, AZ);
*/
}
function ChangeColor(ID) {
var txt = $("#"+ID).find("div").css("backgroundColor");
txt = txt.replace(/ /g, "");
if (txt == "rgb(222,223,210)") {
$("#"+ID).find("div").css("backgroundColor", "red");
}
else {
//document.getElementById(ID).style.backgroundColor = "rgb(222, 223, 210)";
$("#"+ID).find("div").css("backgroundColor", "rgb(222, 223, 210)");
}
}
function SelectDay(Day, month, year, AZ) {
var DatumSegmente = Day.split("-");
var KWKlick = kalenderwoche(Number(DatumSegmente[2]), Number(DatumSegmente[1]),Number(DatumSegmente[0]));
var TableTD = $("#"+Day).parents();
var ID = Day;
TableTD = TableTD[0];
// $(TableTD).css("backgroundColor", "blue");
//var txt = document.getElementById(ID).style.backgroundColor;
var txt = $(TableTD).css("backgroundColor");
txt = txt.replace(/ /g, "");
//alert(txt + " Zeile: 873");
if (txt == "rgb(222,223,210)") {
//document.getElementById(ID).style.backgroundColor = "red";
$(TableTD).css("background-color","red");
$(TableTD).find("div").css("color","white");
ids[ID] = ID+"@"+KWKlick;
}
else {
//document.getElementById(ID).style.backgroundColor = "rgb(222, 223, 210)";
$(TableTD).css("backgroundColor", "rgb(222, 223, 210)");
$(TableTD).find("div").css("color","black");
delete ids[ID];
}
ShowVorgemerkt(month, year, AZ, 0);
}
/* Funktion "SelectWeek" momentan nicht aktiv - ist dazu da, wenn auf einen Tag geklickt wird
dann wird autom die ganze KW selektiert */
function SelectWeek(Monday, month, year, AZ) {
var DatumSegmente = Monday.split("-");
var Datum = new Date(DatumSegmente[2], DatumSegmente[1]-1, DatumSegmente[0]);
var AktuellDatum = new Date();
AktuellDatum = DateAdd("d", 0 , AktuellDatum);
var KWAktuell = kalenderwoche(AktuellDatum.getFullYear(), AktuellDatum.getMonth()+1,AktuellDatum.getDate());
var KWKlick = kalenderwoche(Number(DatumSegmente[2]), Number(DatumSegmente[1]),Number(DatumSegmente[0]));
if (KWAktuell == KWKlick && AktuellDatum.getFullYear() == Datum.getFullYear()) {
if ((Datum.getDay()-1) < 0) DOW = 0;
else
DOW = 7 - Datum.getDay();
}
else {
DOW = 6;
if ((Datum.getDay()-1) < 0) {
//Sonntag wird hier berücksichtigt
Datum = DateAdd("d", -6, Datum);
}
else {
Datum = DateAdd("d", -(Datum.getDay()-1), Datum);
}
}
for(var x = 0; x <= DOW; x++) {
Datum2 = DateAdd("d", x, Datum);
ID = Datum2.getDate() +"-"+ (Datum2.getMonth()+1) +"-"+ Datum2.getFullYear();
var TableTD = $("#"+ID).parents();
if (TableTD.length > 0) {
TableTD = TableTD[0];
var txt = $(TableTD).css("backgroundColor");
txt = txt.replace(/ /g, "");
//alert(txt + " Zeile: 873");
if (x == DOW) {
LastDayOfWeek = Datum2;
}
if (KWAktuell == KWKlick && AktuellDatum.getFullYear() == Datum.getFullYear()) {
if (x==0) var regColor = txt;
if (regColor == "rgb(0,0,0)") {
//document.getElementById(ID).style.backgroundColor = "red";
$(TableTD).css("backgroundColor", "red");
ids[ID] = ID+"@"+KWKlick;
}
else {
var xy = 7;
var Datum3 = DateAdd("d", (xy*-1), Datum);
var id_tmp = Datum3.getDate() +"-"+ (Datum3.getMonth()+1) +"-"+ Datum3.getFullYear();
while (Datum3 < Datum) {
if (document.getElementById(id_tmp)) {
//document.getElementById(id_tmp).style.backgroundColor = "rgb(222, 223, 210)";
var TableTD_tmp = $("#"+id_tmp).parents();
TableTD_tmp = TableTD_tmp[0];
$(TableTD_tmp).css("backgroundColor", "rgb(222, 223, 210)");
delete ids[id_tmp];
}
xy--;
Datum3 = DateAdd("d", (xy*-1), Datum);
id_tmp = Datum3.getDate() +"-"+ (Datum3.getMonth()+1) +"-"+ Datum3.getFullYear();
}
//document.getElementById(ID).style.backgroundColor = "rgb(222, 223, 210)";
$(TableTD).css("backgroundColor", "rgb(222, 223, 210)");
delete ids[ID];
}
}
else {
if (txt == "rgb(0,0,0)") {
//document.getElementById(ID).style.backgroundColor = "red";
$(TableTD).css("background-color","red");
ids[ID] = ID+"@"+KWKlick;
}
else {
//document.getElementById(ID).style.backgroundColor = "rgb(222, 223, 210)";
$(TableTD).css("backgroundColor", "rgb(0, 0, 0)");
delete ids[ID];
}
}
}
}
ShowVorgemerkt(month, year, AZ, 0);
// PrintInfoText(month, year, AZ);
//
}
function SelectWeekBorder(MouseInOut, Obje) {
var debug = $(Obje).parents()
.map(function () {
return this.tagName;
})
.get().join(", ");
//alert(debug);
var jvar = $(Obje).parents()
jvar = jvar[0];
if (MouseInOut == "in") {
$(jvar).find("td").each(function (i) {
//alert($(this).css("backgroundColor"));
var bgvar = $(this).css("backgroundColor");
bgvar = bgvar.replace(/ /g, "");
if (bgvar == "rgb(222,223,210)") {
$(this).css("backgroundColor", "rgb(0, 0, 0)");
$(this).find("div").css("color", "rgb(255, 255, 255)");
}
});
}
else {
$(jvar).find("td").each(function (i) {
var bgvar = $(this).css("backgroundColor");
bgvar = bgvar.replace(/ /g, "");
if (bgvar == "rgb(0,0,0)") {
$(this).css("backgroundColor", "rgb(222, 223, 210)");
$(this).find("div").css("color", "rgb(0, 0, 0)");
}
});
}
}
function GetUebersicht() {
var KW_tmp = "";
var day_tmp = "";
var month_tmp = "";
var year_tmp = "";
var count = 1;
var Uebersicht = new Array();
var tmp_str = "";
for (var str in ids) {
//alert(ids[str]);
var KW_u_Day = ids[str];
KW_u_Day = KW_u_Day.split("@");
var KW = KW_u_Day[1];
var day_with_minus = KW_u_Day[0];
var day = day_with_minus.split("-");
var Timerange = dateDiff(month_tmp+"/"+day_tmp+"/"+year_tmp, day[1]+"/"+day[0]+"/"+day[2]);
if (KW_tmp != KW || Timerange > 1) {
if (KW_tmp != "") {
tmp_str = year_tmp;
if (KW_tmp.length == 1) tmp_str+= "0"+KW_tmp;
else tmp_str+=KW_tmp;
tmp_str = String(tmp_str) + String(count);
Uebersicht.push(tmp_str);
//infotext+= "KW:"+KW_tmp+"=>Y:"+year_tmp+"=>T"+count+"
";
}
KW_tmp = KW;
count = 0;
}
//infotext+= "KW:"+KW_tmp+"=>Y:"+year_tmp+"=>M:"+month_tmp+"=>T"+day_tmp+"
";
day_tmp = day[0];
month_tmp = day[1];
year_tmp = day[2];
count++;
}
if (KW_tmp != "") {
tmp_str = year_tmp;
if (KW_tmp.length == 1) tmp_str+= "0"+KW_tmp;
else tmp_str+=KW_tmp;
tmp_str = String(tmp_str) + String(count);
Uebersicht.push(tmp_str);
//infotext+= "KW:"+KW_tmp+"=>Y:"+year_tmp+"=>M:"+month_tmp+"=>T"+count+"
";
}
return(Uebersicht);
}
function PrintInfoText(month, year, AZ, NewAZ) {
var SELECTDAYS = TageVorgemerktCount();
if (document.getElementById("calinfo")) {
infotext = "" + SELECTDAYS + " Tage vorgemerkt.
";
infotext+= "";
var Uebersicht = GetUebersicht();
var Summe = 0;
if (Uebersicht.length > 0) {
year_tmp = "";
Uebersicht.sort();
infotext+= "
";
//infotext+="";
}
var SummeWithoutGuthaben = Summe;
var Guthaben = parseFloat(document.getElementById("Guthaben").value);
var GuthabenTmp = 0;
if (UseGuthaben && NewAZ == 0) {
if (Guthaben-Summe >=0)
GuthabenTmp = Guthaben-Summe;
else GuthabenTmp = 0;
}
else GuthabenTmp = Guthaben;
infotext2 = "Guthaben: "+String(GuthabenTmp)+" €
";
if (UseGuthaben) {
var checked = "checked";
//UseGuthaben = true;
}
else {
var checked = "";
}
infotext2+= " Guthaben verwenden
";
infotext2+= "
";
if (UseGuthaben) {
if (Summe-Guthaben >= 0) {
printSumme=Math.round((Summe-Guthaben)*100)/100;
}
else printSumme = 0;
}
else printSumme = Summe;
infotext2+= "Summe: "+printSumme+" €
";//printSumme+" €
";
//infotext2+= "