// SUPERVISOR EN GEBRUIKER
$int = String.fromCharCode(248);
$ini = String.fromCharCode(247);
offset = 0;
winkelwagen = $int;
kopiewagen = $int;
supervisor = 0;
was_supervisor = 0;
article_owner = 0;
anoniem=0;
gewijzigd = 0;
is_editor = 0;
preview = 0;
zwart = "";
site_layout = "";
cookie("gewijzigd=0");
//alert(document.cookie);
cook = document.cookie.split(";");
if ( document.cookie != "" ) {
for ( ic in cook ) {
s = cook[ic].split("=");
if ( s[0] == "" ) continue;
s = s[0] + "='" + s[1].replace("%2F", "/") + "'";
eval(s);
}
}
function cookie(txt) {
document.cookie = txt + "; Path=/";
cook = document.cookie.split(";");
if ( cook != "" ) {
for ( ic in cook ) {
s = cook[ic].split("=");
if ( s[0] == "" ) continue;
s = s[0] + "='" + s[1].replace("%2F", "/") + "'";
eval(s);
}
}
}
function seteigenaar() {
if (document.all) {
if ( typeof document.all['movieframe'] != "object" ) return;
document.all['movieframe'].style.left=0;
document.all['movieframe'].style.top=0;
} else if (document.layers) {
document.layers['movieframe'].style.left=0;
document.layers['movieframe'].style.top=0;
} else if (document.getElementById) {
document.getElementById('movieframe').style.left=0;
document.getElementById('movieframe').style.top=0;
}
if ( winkelwagen.length > 2 ) zetorder();
if ( typeof document.all['mail_test_0'] == "object" ) {
voermailtest();
}
if ( window.name == "littleframe" ) {
cookie("little=1");
parent.instylen = new Array();
document.body.style.fontSize = 6;
$d = document.body.all;
for ( $ic in $d ) {
if ( typeof $d[$ic].className == "string" ) {
if ( $d[$ic].className != "" ) {
parent.instylen["." + $d[$ic].className] = $d[$ic];
}
}
$m = $d[$ic].tagName;
if ( $m == "IMG" ) {
$w = $d[$ic].offsetWidth;
while ( true ) {
$w = $w / 2;
if ( $w < 100 ) break;
}
$d[$ic].style.height = "";
$d[$ic].style.width = $w;
}
$mm = ",TD,H1,INPUT,DIV,SPAN,FONT,P,B,I,";
if ( $mm.indexOf("," + $m + ",") == -1 ) continue;
$d[$ic].style.fontSize = 8;
}
parent.zetlittle();
} else {
cookie("little=0");
}
return;
cookie("eigenaar=" + document.frm.eigenaar.value);
}
function orderinfo($zet) {
if (leesvalue('infopage') == "true" ) return;
if (leesvalue('rekening') == "false" ) return;
if ( !document.all ) return;
if ( supervisor > 0 ) return;
if ( typeof document.all['orderframe'] != "object" ) return;
//if ( $zet || document.all['orderframe'].style.height < 50 ) zetorder();
document.all['orderframe'].src = "artikelen/ordershow.php?winkelwagen=" + winkelwagen + "&eigenaar=" + leesvalue("eigenaar") + "&scrbar=" + leesvalue("scrbar").substr(1);
}
function zetorder() {
return;
x = document.body.offsetWidth - 280;
if ( x < 0 ) x = 0;
}
pos=10;
scrolltel = 0;
function schuiforder() {
return;
if ( !document.all ) return;
if ( document.all['orderframe'].style.height < 10 ) return;
document.all['orderframe'].style.top = pos+(document.body.scrollTop*1);
}
function leesvalue(id) {
if (document.all) {
x = document.all[id].value;
} else if (document.layers) {
x = document.layers[id].value;
} else if (document.getElementById) {
x = document.getElementById(id).value;
}
return x;
}
function schrijfvalue(id, text) {
if (document.all) {
document.all[id].value = text;
} else if (document.layers) {
document.layers[id].value = text;
} else if (document.getElementById) {
document.getElementById(id).value = text;
}
}
function act(id, text) {
if (document.all) {
document.all[id].action = text;
} else if (document.layers) {
document.layers[id].action = text;
} else if (document.getElementById) {
document.getElementById(id).action = text;
}
}
function sub(id) {
if (document.all) {
document.all[id].submit();
} else if (document.layers) {
document.layers[id].submit();
} else if (document.getElementById) {
document.getElementById(id).submit();
}
}
function mkwz() {
cookie("gewijzigd=1");
}
function kijkwz() {
if ( gewijzigd == 1 ) {
if ( !confirm("Wilt u de wijzigingen niet eerst opslaan") ) return true;
return false;
}
return true;
}
function setoffset($off) {
return;
if ( Math.abs($off) == 1 ) {
cookie("offset=" + (offset*1 + leesvalue('limit')*$off));
sub('frm');
} else {
cookie("offset=" + $off);
}
}
function send($obj, $name, $groep) {
if ( !document.all ) {
if ( typeof $obj == "object" ) return;
} else {
if ( typeof $obj == "object" ) {
if ( window.event.keyCode != 13 ) return;
}
}
if ( $obj.value == "" ) return;
schrijfvalue('sbgroep', $obj.value);
schrijfvalue('groep', $groep);
schrijfvalue('aktie', $name);
sub('frm');
}
function art($sid, $subsid, $h) {
cookie("offset=0");
cookie("groepsid=" + $sid);
cookie("subgroepsid=" + $subsid);
if ( !$h ) {
act('frm', "fotolist.html");
sub('frm');
}
}
function inwagen($obj, $sid, $grsid) {
if ( typeof $grsid == "number" ) {
if ( $grsid < 0 ) {
$grsid = Math.abs($grsid);
if ( $obj.value > $grsid ) {
alert("Sorry, the maximum is " + $grsid);
if ( document.all ) {
if ( typeof document.all['aant_' + $sid] == "object" ) {
document.all['aant_' + $sid].value = 0;
}
}
return;
}
$grsid=0;
}
} else $grsid = 0;
cookie("ctrl=1");
if ( ctrl != 1 ) {
alert("U heeft uw javascript sessie cookies uitstaan.\nDerhalve is het niet mogelijk te bestellen.\nU kunt deze instellingen in uw browser wijzigen:\nExtra\nPrivacy\nGeavanceerd.\nHet aanzetten van de sessie cookies heeft geen invloed op uw privacy.");
return;
}
if ( typeof $obj == "object" ) {
if ( $obj.value < 0 ) {
alert("not allowed");
return;
}
$aant = $obj.value;
} else {
$aant = $obj;
}
$aant = $aant*1;
if ( $aant > 0 ) {
a=1;
} else {
$aant = 0;
}
if ( typeof $aant != "number" ) $aant = 0;
if ( document.all ) {
if ( typeof document.all['aant_' + $sid] == "object" ) {
if ( $aant == 0 ) $a = ""; else $a = $aant;
document.all['aant_' + $sid].value = $a;
}
}
$nw = "";
$s = new Array();
if ( winkelwagen.length > 1 ) {
$w = winkelwagen.split($int);
for ( $ic in $w ) {
$k = $w[$ic].split($ini);
$s[$k[0]] = $k[1];
}
}
$s[$sid] = $aant + "-" + $grsid;
for ( $ic in $s ) {
$a = $s[$ic].split("-");
if ( $a[0] < 1 ) continue;
$nw += $int + $ic + $ini + $s[$ic];
}
if ( $nw == "" ) $nw = $int + $int;
cookie("winkelwagen=" + $nw.substr(1));
if ( window.location.href.indexOf("order.html") > 1 ) {
document.location.reload();
} else {
orderinfo(false);
}
}
function uitwagen(aantal, sid, artikel) {
if ( !confirm(aantal + " x " + artikel + " uit de winkelwagen verwijderen?") ) return;
inwagen(0, sid);
document.location.reload();
}
function orderwagen($sid) {
if ( supervisor > 0 ) return;
if ( winkelwagen.indexOf($sid+$ini) == -1 ) {
if ( winkelwagen.length > 1 ) cookie("winkelwagen=" + winkelwagen + $int + $sid + $ini + "1");
else cookie("winkelwagen=" + $sid + $ini + "1");
}
}
function showimage($obj) {
if ( typeof document.images['showfoto'] != "object" ) return;
document.images['showfoto'].src = $obj.src;
document.images['showfoto'].style.visibility = "visible";
}
//if ( document.frm[$verplicht[$ic]].value.length < 2 ) {
function sendorder() {
/*
if ( window.location.host.indexOf(.web-services.nl") > -1 ) {
alert("Sorry, dit is slechts een voorbeeldsite.\n\nDeze site is bedoeld om de webwinkel te promoten.\nU kunt hier dus niets bestellen.");
return;
}
*/
$verplicht = "naam,adres,postcode,woonplaats,telefoon,email";
$verplicht = $verplicht.split(",");
for ( $ic in $verplicht ) {
if ( leesvalue($verplicht[$ic]).length < 2 ) {
alert("U bent vergeten uw " + $verplicht[$ic] + " in te vullen");
return;
}
}
sub('frm');
}
function leegmaken($vraag) {
if ( $vraag ) {
if ( !confirm("Winkelwagen leegmaken?") ) return;
}
cookie("winkelwagen=" + $int);
if ( $vraag ) {
//cookie("showartikelen=home");
act('frm', "index.html");
sub('frm');
}
}
function ctrlwagen() {
if ( winkelwagen.length < 2 ) {
alert("U heeft nog geen artikelen in de winkelwagen");
return false;
}
return true;
}
function home() {
//cookie("showartikelen=home");
}
function zoek($obj, $ctrl) {
if ( $ctrl ) {
if ( !document.all ) return;
if ( window.event.keyCode != 13 ) return;
}
if ( leesvalue('zoeken') == "" ) return;
cookie("offset=0");
cookie("groepsid=0");
cookie("subgroepsid=0");
act('frm', "zoeken" + leesvalue('usetaal') + ".html");
sub('frm');
}
function klant($ctrl) {
if ( $ctrl ) {
if ( !document.all ) return;
if ( window.event.keyCode != 13 ) return;
}
if ( leesvalue('klantcode') == "" ) return;
if ( leesvalue('klantcode').indexOf("@") == -1 ) {
alert("ongeldige klantcode");
return;
}
if ( leesvalue('klantcode').indexOf(".") == -1 ) {
alert("ongeldige klantcode");
return;
}
if ( leesvalue('klantcode').indexOf("#") == -1 ) {
alert("ongeldige klantcode");
return;
}
leesvalue('aktie') = "klant";
sub('frm');
}
function verzend($obj) {
if ( $obj.value == "creditcard" ) {
alert("Creditcard betaaloptie is nog niet gekoppeld");
return;
}
schrijfvalue('aktie', "zend");
sub('frm');
}
function listaktie() {
schrijfvalue('aktie', "listaktie");
sub('frm');
}
function autologin($bedrijf, $login, $password) {
if ( !document.all ) {
alert("Sorry, u heeft Internet Explorer nodig voor het beheer");
return;
}
document.location = "index.html?login=" + $login + "&password=" + $password;
}
function superlogin($obj, $ctrl) {
if ( !document.all ) {
alert("Sorry, u heeft Internet Explorer nodig voor het beheer");
return;
}
if ( $ctrl ) {
if ( window.event.keyCode != 13 ) return;
}
if ( leesvalue('password') == "" || leesvalue('login') == "" ) return;
sub('frm');
}
function logout() {
cookie("anoniem=0");
cookie("was_supervisor=0");
cookie("supervisor=0");
cookie("article_owner=0");
cookie("taal=nl");
document.location = "index.html";
}
function setsuper($sup) {
cookie("supervisor=" + $sup)
}
function setowner($sup) {
cookie("article_owner=" + $sup)
}
function zettaal($tl) {
cookie("taal=" + $tl);
sub('frm');
}
function sendinfo() {
$e = leesvalue('send_email');
$meld = "";
if ( $e.indexOf("@") == -1 ) $meld = "Incorrect emailadres";
if ( $e.indexOf(".") == -1 ) $meld = "Incorrect emailadres";
if ( $e.indexOf(" ") > -1 ) $meld = "Incorrect emailadres";
if ( $meld != "" ) {
alert($meld);
return;
}
schrijfvalue('aktie', "sendinfo");
sub('frm');
}
function vertaal(tl) {
cookie("taal=uk");
document.location = "http://216.239.39.104/translate_c?hl=fr&u=http://www.costadelsol-rentals.nl/index.html?taal=uk";
}
function strreplace(obj, s1, s2) {
while ( obj.indexOf(s1) > -1 ) obj = obj.replace(s1, s2);
return obj;
}
function cheigenaar() {
if ( !document.all ) return;
if ( !window.event.altKey ) return;
if ( window.location.href.indexOf("www.web-services.nl") == -1 && window.location.href.indexOf("localhost") == -1 ) return;
$is = (window.event.keyCode-48);
//if ( $is != 0 && $is != 2 && $is != 5 && $is != 6 && $is != 7 ) return;
if ( $is == 0 ) {
if ( site_layout == "" || site_layout == 1 ) {
alert("2");
cookie("site_layout=2");
} else {
cookie("site_layout=1");
}
} else {
cookie("aktueelstyle=" + $is);
}
document.location = "index.html";
}
function gfpage($url) {
act('frm', $url);
sub('frm');
}
function ctrlshow() {
if ( !document.all ) {
alert("Sorry, u gebruikt geen internet explorer");
return false;
}
return true;
}
function geeflist($obj) {
if ( $obj.checked ) cookie("list=1");
else cookie("list=0");
document.location.reload();
}
ordersave="";
function vrp() {
return;
if ( !document.body.schuiven ) return;
f = document.body.aktframe;
x1 = document.all[f].style.left.replace("px", "")*1;
y1 = document.all[f].style.top.replace("px", "")*1;
document.all[f].style.left = x1 + (frames[f].window.event.clientX) - document.body.mouseX;
document.all[f].style.top = y1 + (frames[f].window.event.clientY) - document.body.mouseY;
pos = document.all[f].style.top.replace("px", "")*1;
}
// schuif aanzetten
function mvr($frame, verplaatsen) {
return;
document.body.aktframe = $frame;
document.body.schuiven = verplaatsen;
if ( !verplaatsen ) {
if ( ordersave == "" ) return;
frames[$frame].document.body.innerHTML = ordersave;
ordersave = "";
return;
} else {
ordersave = frames[$frame].document.body.innerHTML;
}
document.body.mouseX = frames[$frame].window.event.clientX;
document.body.mouseY = frames[$frame].window.event.clientY;
}
function movieshow() {
if ( !document.all ) {
alert("alleen toegankelijk met Internet Explorer");
return;
}
document.all['movieframe'].style.position="absolute";
document.all['moviediv'].style.overflow="visible";
frames['movieframe'].location = "artikelen/movieshow.php?eigenaar=" + leesvalue("eigenaar");
//frames['movieframe'].startmedia(film);
}
function scherm(nr) {
cookie("resolutie=" + nr);
document.location.reload();
}
function winkelier() {
verplicht = "bedrijf,contact,adres,postcode,plaats,telefoon,email";
verplicht = verplicht.split(",");
for ( $ic in verplicht ) {
if ( leesvalue("save_" + verplicht[$ic]) == "" ) {
alert("Vul a.u.b. veld " + verplicht[$ic] + " in");
return;
}
}
sub("frm");
}
function artikel_print(sid) {
if ( supervisor > 0 ) return;
schrijfvalue("artikelprint", sid);
schrijfvalue("artikelmeerinfo", 0);
if ( confirm("Printen met alle foto's?") ) {
schrijfvalue("foos", 1);
}
sub("frm");
}
function artikel_mail(sid) {
if ( supervisor > 0 ) return;
schrijfvalue("artikelprint", sid);
schrijfvalue("artikelmail", sid);
schrijfvalue("artikelmeerinfo", 0);
schrijfvalue("artikelurl", window.location.href);
sub("frm");
}
function ssup() {
if ( supervisor > 0 ) return false;
else return true;
}
function artikel_prints(sid) {
schrijfvalue("artikelprint", sid);
schrijfvalue("artikelmeerinfo", 1);
sub("frm");
}
function artikel_mails(sid) {
schrijfvalue("artikelprint", sid);
schrijfvalue("artikelmail", sid);
schrijfvalue("artikelmeerinfo", 1);
schrijfvalue("artikelurl", window.location.href);
sub("frm");
}
function pr() {
if ( window.print() ) window.print();
window.history.back();
}
function terugnaar(url) {
document.location = url;
}
function verzendartikel() {
e = leesvalue("sendmail");
$meld = "";
if ( e.indexOf("@") == -1 ) $meld = "Er zit geen @ in het emailadres";
if ( e.indexOf(".") == -1 ) $meld = "Er zit geen dot (.) in het emailadres";
e = leesvalue("afzend");
if ( e == "" ) $meld = "Vul a.u.b. de afzender in";
if ( $meld != "" ) {
alert($meld);
return;
}
schrijfvalue("vmail", 1);
sub("frm");
}
function favorieten() {
window.external.AddFavorite("http://" + window.location.host, "Webwinkel " + window.location.host);
}
function setsel($obj) {
if ( supervisor > 0 ) return;
if ( $obj.value == "" ) cookie(leesvalue("aktsubgroep") + "=leeg");
else cookie(leesvalue("aktsubgroep") + "=" + $obj.value);
sub("frm");
}
function loganoniem() {
if ( !document.all ) {
alert("Sorry, het beheer werkt alleen in Internet Explorer");
return;
}
cookie("supervisor=1");
cookie("anoniem=1");
alert("Welkom.\n\nU kunt overal in het beheer tondkijken.\nU kunt alleen geen wijzigingen opslaan.");
sub("frm");
}
function fssel(nr) {
cookie("ssel=" + nr);
document.location.reload();
}
function showsamen($sid) {
window.open("artikelen/showsamen.php?sid=" + $sid + "&eigenaar=" + leesvalue('eigenaar') + "&usetaal=" + leesvalue('usetaal'), "_blank", "width=600, height=600, scrolling=on");
}
function gsm($aktie) {
cookie("g_aktie=" + $aktie);
pauze();
document.location = "index.html";
}
function gsm_art($obj, nr) {
if ( $obj.value == "" ) return;
//alert($obj.value + " - " + nr);
if ( nr == 1 ) cookie("gsm_artikelen=" + $obj.value);
else if ( nr == 2 ) cookie("gsm_artikel=" + $obj.value);
pauze();
document.location = "index.html";
}
function home() {
cookie("gsm_artikel=0");
cookie("gsm_artikelen=0");
pauze();
document.location = "index.html";
}
function pauze() {
return;
$tx = "Momentje.....
";
$tx += "De nieuwe pagina voor Windows Mobile wordt geladen
";
$tx += "Webmaster: http://www.web-services.nl";
document.all['bldiv'].writeln("Momentje");
}
function gprs() {
alert("U kunt ons ook ontvangen met uw Windows mobile");
}
function bkey() {
if ( !document.all ) return;
if ( zwart == "l" ) zwart = "";
if ( window.event.keyCode == 83 ) {
cookie("zwart=l");
} else {
cookie("zwart=" + zwart + String.fromCharCode(window.event.keyCode));
}
}
function voermailtest() {
$d = document.body.all;
for ( $i = 0; $i < 100; $i ++ ) {
if ( typeof document.all['mail_test_' + $i] != "object" ) break;
$t = document.all['div_test_' + $i].innerHTML;
$t = $t.replace("", "