Column = function(head, hposition, rows, rposition) { this.head = head; this.rows = rows; this.hposition = hposition; this.rposition = rposition; this.over = false; } XYCoord = function(xc, yc) { this.xc = xc; this.yc = yc; } LanguageButton = function(source1, source2, url) { this.source1 = source1; this.source2 = source2; this.url = url; this.attach = function(element) { a = document.createElement('a'); a.href = this.url; a.target = '_parent'; img = document.createElement('img'); img.style.border = '0px solid #FFF'; img.style.cursor = 'pointer'; img.src = this.source1; img.src1 = this.source1; img.src2 = this.source2; img.onmouseover = function() { this.src = this.src2; menu.languageMenu.over = true; } img.onmouseout = function() { this.src = this.src1; menu.languageMenu.over = false; } a.appendChild(img); element.appendChild(a); element.appendChild(document.createElement('br')); } } LanguageMenu = function(source1, source2, url, coord, coordMenu) { this.source1 = source1; this.source2 = source2; this.coord = coord; this.coordMenu = coordMenu; this.url = url; this.menuDiv = null; this.over = false; this.attach = function(element) { headDiv = document.createElement('div'); headDiv.style.position = 'absolute'; headDiv.style.left = this.coord.xc; headDiv.style.top = this.coord.yc; headA = document.createElement('a'); headA.href = this.url; headA.target = '_parent'; img = document.createElement('img'); img.style.border = '0px solid #FFF'; img.style.cursor = 'pointer'; img.src = this.source1; img.src1 = this.source1; img.src2 = this.source2; img.onmouseover = function() { this.src = this.src2; menu.languageMenu.menuDiv.style.visibility = 'visible'; } img.onmouseout = function() { this.src = this.src1; if(!menu.languageMenu.over) menu.languageMenu.menuDiv.style.visibility = 'hidden'; } headA.appendChild(img); headDiv.appendChild(headA); element.appendChild(headDiv); this.menuDiv = document.createElement('div'); this.menuDiv.style.position = 'absolute'; this.menuDiv.style.left = this.coordMenu.xc; this.menuDiv.style.top = this.coordMenu.yc; this.menuDiv.style.visibility = 'hidden'; this.menuDiv.onmouseover = function() { this.style.visibility = 'visible'; menu.languageMenu.over = true; } this.menuDiv.onmouseout = function() { menu.languageMenu.over = false; this.style.visibility = 'hidden'; } new LanguageButton('/bilder-staffel7/menue-sprache2.gif', '/bilder-staffel7/sub-menue-sprache2.gif', 'http://www.plainpicture.com').attach(this.menuDiv); new LanguageButton('/en/bilder-staffel7/menue-sprache3.gif', '/en/bilder-staffel7/sub-menue-sprache3.gif', 'http://www.plainpicture.fr').attach(this.menuDiv); new LanguageButton('/en/bilder-staffel7/menue-sprache4.gif', '/en/bilder-staffel7/sub-menue-sprache4.gif', 'http://www.plainpicture.dk').attach(this.menuDiv); element.appendChild(this.menuDiv); menu.languageMenu = this; } } ImageButton = function(source, url, target, clickon, coord) { this.source = source; this.url = url; this.coord = coord; this.clickon = clickon; this.target = target; this.create = function() { res = document.createElement('div'); res.style.position = 'absolute'; res.style.left = coord.xc; res.style.top = coord.yc; a = document.createElement('a'); a.href = url; a.onclick = clickon; a.target = this.target; img = document.createElement('img'); img.src = source; img.style.border = '0px solid #FFF'; a.appendChild(img); res.appendChild(a); return res; } } MenuButton = function(img1, img2, url, target) { this.img1 = img1; this.img2 = img2; this.url = url; this.img = null; this.target = target; } Menu = function() { this.columns = new Array(); this.languageMenu = null; this.findMenuButton = function(img) { for(i = 0; i < this.columns.length; i++) { for(u = 0; u < this.columns[i].rows.length; u++) { if(img == this.columns[i].rows[u].img1) return this.columns[i].rows[u].img2; else if(img == this.columns[i].rows[u].img2) return this.columns[i].rows[u].img1; } } return null; } this.findHeadUrl = function(img) { for(i = 0; i < this.columns.length; i++) { if(this.columns[i].head.img1 == img || this.columns[i].head.img2 == img) return this.columns[i].head.url; } return null; } this.findColumn = function(img) { for(i = 0; i < this.columns.length; i++) { for(u = 0; u < this.columns[i].rows.length; u++) { if(img == this.columns[i].rows[u].img1 || img == this.columns[i].rows[u].img2) return i; } } } this.unmarkColumn = function(index) { for(i = 0; i < this.columns[index].rows.length; i++) { this.columns[index].rows[i].img.src = this.columns[index].rows[i].img1; } } this.findHeadTarget = function(img) { for(i = 0; i < this.columns.length; i++) { if(this.columns[i].head.img1 == img || this.columns[i].head.img2 == img) return this.columns[i].head.target; } return null; } this.findUrl = function(img) { for(i = 0; i < this.columns.length; i++) { for(u = 0; u < this.columns[i].rows.length; u++) { if(img == this.columns[i].rows[u].img1 || img == this.columns[i].rows[u].img2) return this.columns[i].rows[u].url; } } return null; } this.findTarget = function(img) { for(i = 0; i < this.columns.length; i++) { for(u = 0; u < this.columns[i].rows.length; u++) { if(img == this.columns[i].rows[u].img1 || img == this.columns[i].rows[u].img2) return this.columns[i].rows[u].target; } } return null; } /************************************************************************/ this.create = function() { this.columns = new Array( new Column( new MenuButton('http://www.plainpicture.de/bilder-staffel7/menue-plainpicture.jpg', 'http://www.plainpicture.de/bilder-staffel7/menue-plainpicture-dkl.jpg', 'http://www.plainpicture.de/index.html', 'parent'), new XYCoord(255, 38), new Array( new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-ueberuns.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-ueberuns-dkl.gif', 'http://www.plainpicture.de/ueberuns.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-news.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-news-dkl.gif', 'http://www.plainpicture.de/news/index.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-gallery.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-gallery-dkl.gif', 'http://www.plainpicture.de/gallery/', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-partner.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-partner-dkl.gif', 'http://www.plainpicture.de/partneragenturen.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-presse.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-presse-dkl.gif', 'http://www.plainpicture.de/presse.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-jobs.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-jobs-dkl.gif', 'http://www.plainpicture.de/jobs.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-kontakt.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-kontakt-dkl.gif', 'http://www.plainpicture.de/kontakt.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-agb.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-agb-dkl.gif', 'http://www.plainpicture.de/agb.html', 'parent') ), new XYCoord(255, 68) ), new Column( new MenuButton('http://www.plainpicture.de/bilder-staffel7/menue-bildsuche.jpg', 'http://www.plainpicture.de/bilder-staffel7/menue-bildsuche-dkl.jpg', 'http://www.plainpicture.de/bildsuche.html', 'parent'), new XYCoord(384, 38), new Array(), new XYCoord(385, 68) ), new Column( new MenuButton('http://www.plainpicture.de/bilder-staffel7/menue-service.jpg', 'http://www.plainpicture.de/bilder-staffel7/menue-service-dkl.jpg', 'http://www.plainpicture.de/rechercheservice.html', 'parent'), new XYCoord(513, 38), new Array( new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-recherche.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-recherche-dkl.gif', 'http://www.plainpicture.de/rechercheservice.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-lizenz.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-lizenz-dkl.gif', 'http://www.plainpicture.de/lizenzinfo.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-preise.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-preise-dkl.gif', 'http://www.plainpicture.de/preise.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-technische.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-technische-dkl.gif', 'http://www.plainpicture.de/technischedaten.html', 'parent') ), new XYCoord(513, 68) ), new Column( new MenuButton('http://www.plainpicture.de/bilder-staffel7/menue-fotograf.jpg', 'http://www.plainpicture.de/bilder-staffel7/menue-fotograf-dkl.jpg', 'http://www.plainpicture.de/fotografen.html', 'parent'), new XYCoord(642, 38), new Array( new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-fuerfotograf.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-fuerfotograf-dkl.gif', 'http://www.plainpicture.de/fotografen.html', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-portfolios.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-portfolios-dkl.gif', 'http://www.plainpicture.de/plainpicture-cgi/portfolios.pl', 'parent'), new MenuButton('http://www.plainpicture.de/bilder-staffel7/sub-blog.gif', 'http://www.plainpicture.de/bilder-staffel7/sub-blog-dkl.gif', 'http://blog.plainpicture.net/', 'parent') ), new XYCoord(643, 68) ) ); } /************************************************************************/ this.print = function() { for(i = 0; i < this.columns.length; i++) { document.write(""); // submenus this.columns[i].div = document.createElement('div'); this.columns[i].div.style.visibility = 'hidden'; this.columns[i].div.style.position = 'absolute'; this.columns[i].div.style.left = this.columns[i].rposition.xc + 'px'; this.columns[i].div.style.top = this.columns[i].rposition.yc + 'px'; this.columns[i].div.style.width = '5px'; this.columns[i].div.style.height = '5px'; this.columns[i].div.onmouseout = function() { this.style.visibility = 'hidden'; this.over = false; } this.columns[i].div.onmouseover = function() { this.style.visibility = 'visible'; this.over = true; } for(u = 0; u < this.columns[i].rows.length; u++) { this.imgLoad = new Image(); this.imgLoad.src = this.columns[i].rows[u].img2; img = document.createElement('img'); img.src = this.columns[i].rows[u].img1; this.columns[i].div.appendChild(img); this.columns[i].rows[u].img = img; img.style.cursor = 'pointer'; img.onmouseover = function() { menu.unmarkColumn(menu.findColumn(this.src)); this.src = menu.findMenuButton(this.src); } img.onmouseout = function() { this.src = menu.findMenuButton(this.src); } img.onmousedown = function() { parent.location.href = menu.findUrl(this.src); //document.location.href = menu.findUrl(this.src); //document.location.target = menu.findTarget(this.src); } } zbody = document.getElementsByTagName('body')[0]; // the blue fade effect borderdiv = document.createElement('div'); borderdiv.style.position = 'absolute'; borderdiv.style.left = '771px'; borderdiv.style.top = '38px'; borderimg = document.createElement('img'); borderimg.src = '/bilder-staffel7/balken-oben-verlauf.jpg'; borderdiv.appendChild(borderimg); zbody.appendChild(borderdiv); // the long blue fade effect if location is search results if(document.location.href.indexOf('LinearQuery') != -1) { // search results ? borderdivlong = document.createElement('div'); borderdivlong.style.position = 'absolute'; borderdivlong.style.left = '927px'; borderdivlong.style.top = '38px'; borderimglong = document.createElement('img'); borderimglong.src = '/bilder-staffel7/balken-blau.jpg'; borderdivlong.appendChild(borderimglong); zbody.appendChild(borderdivlong); } // attach the menu zbody.appendChild(this.columns[i].div); this.createButtonsUponMenu(); this.createLanguageMenu(); } } // language menu this.createLanguageMenu = function() { zbody = document.getElementsByTagName('body')[0]; new LanguageMenu('/bilder-staffel7/menue-sprache1.gif', '/bilder-staffel7/sub-menue-sprache1.gif', 'http://www.plainpicture.de', new XYCoord('848px', '51px'), new XYCoord('848px', '66px') ).attach(zbody); } // buttons upon main menu this.createButtonsUponMenu = function() { zbody = document.getElementsByTagName('body')[0]; zbody.appendChild( new ImageButton('/bilder-staffel7/myaccount.gif', '/cgi/sys/my_account.rhtml', '', '', new XYCoord('600px', '7px') ).create() ); zbody.appendChild( new ImageButton('/bilder-staffel7/menue-login.gif', '/login-normal.html', '_parent', '', new XYCoord('696px', '7px') ).create() ); zbody.appendChild( new ImageButton('/bilder-staffel7/menue-registrierung.gif', '#A', '', function() { window.open('/plainpicture-cgi/topixx?op=user_form','Register','scrollbars=yes,resizable=yes,width=600,height=850'); }, new XYCoord('750px', '7px') ).create() ); zbody.appendChild( new ImageButton('/bilder-staffel7/menue-leuchttisch.gif', '#A', '', function() { if(parent.frames.length == 2) parent.document.body.rows = '*,120'; else parent.location = '/bildsuche-login.html'; }, new XYCoord('849px', '7px') ).create() ); } this.hide = function(index) { if(!this.columns[index].div.over) this.columns[index].div.style.visibility = 'hidden'; } this.show = function(index) { this.columns[index].div.style.visibility = 'visible'; this.unmarkColumn(index); } }