var width, height var numOfLnx = 5 var contentBox = new Array('_zero', '_one', '_two', '_three', '_four'); var zee = numOfLnx function getMinshuns() { if (self.innerHeight) // all except Explorer { width = self.innerWidth; height = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode { width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; } else if (document.body) // other Explorers { width = document.body.clientWidth; height = document.body.clientHeight; } } function randomize() //this function generates a randon hex string then returns it. { var r1, r2, g1, g2, b1, b2; var hex = new Array(); var i; for(i = 0; i <= 15; i++) { switch(i) { case 10: hex[i] = 'a'; break; case 11: hex[i] = 'b'; break; case 12: hex[i] = 'c'; break; case 13: hex[i] = 'd'; break; case 14: hex[i] = 'e'; break; case 15: hex[i] = 'f'; break; default: hex[i] = i; break; } } r1 = hex[Math.floor(Math.random() * 15)]; r2 = hex[Math.floor(Math.random() * 15)]; g1 = hex[Math.floor(Math.random() * 15)]; g2 = hex[Math.floor(Math.random() * 15)]; b1 = hex[Math.floor(Math.random() * 15)]; b2 = hex[Math.floor(Math.random() * 15)]; return '#'+r1+''+r2+''+g1+''+g2+''+b1+''+b2; } function subtle_rand(that, rand) //this function takes in a color and how far off each hex rgb color should be from that color { var cols = new Array() var color; if(document.hexy) { color = document.bgColor; } var i = 0 //alert("subtle random called") cols = explode(color) cols.shift() i = Math.floor(Math.random() * 6) //which RGB #?? //rand = Math.floor(Math.random() * num) //the bigger the number, the greater the subtlety cols[i] = dehexify(cols[i]) switch(rand) { case 0: cols[i] = cols[i] + 1; if(cols[i] > 15) cols[i] = 15 break; case 1: cols[i] = cols[i] - 1; if(cols[i] < 0) cols[i] = 0 break; default: cols[i] = cols[i]; return; break; } cols[i] = hexify(cols[i]) //alert(cols) color = cols.join('') color = "#"+color that.bgColor = color; //updates the back ground color if(document.hexy) { document.hexy.bizzar.value = color; document.hexy.bizzar.style.backgroundColor = color; document.bgColor = color; //updates the back ground color } } function dehexify(x)//this one takes a hex # and turns it to a decimal { x = "0x0"+x; //the "0x0" is a prefix for hex representation x = parseInt(x, 16) //the parseInt function really does all the real work - thanks javascript return(x) //duh } function hexify(x) //does just the opposite of dehexify { //x = parseInt(x) //this is not needed i am sure - i used it to find the bugs as i developed - ensures the number is a number switch(x) //this is self explanatory { case 10: x = 'a'; break; case 11: x = 'b'; break; case 12: x = 'c'; break; case 13: x = 'd'; break; case 14: x = 'e'; break; case 15: x = 'f'; break; default: x = x; break; } return(x) //duh } function explode(x) //this function makes an array out of a string - php got a function to do this built in { var i; //loop variable var y = new Array() //array to hold the array being created //alert(x) for(i = 0; i < x.length; i++) //duh { y[i] = x.charAt(i) //the charAt function can index a string - it is a beautiful thing } return(y) //duh } function body_blend(x, that) { var rand = Math.floor(Math.random() * x) //the bigger the number, the greater the subtlety subtle_rand(that, rand) } function war333() { var x = document.getElementById('whitebar1') var y = document.getElementById('whitebar0') var z = document.getElementById('nobar') var w = document.getElementById('sintur') getMinshuns() y.style.position = "absolute"; y.style.width = width + "px" y.style.height = Math.floor(height / 3) + "px" y.style.top = "0px"; y.style.right = "0px"; y.style.backgroundColor = "white" x.style.position = "absolute"; x.style.width = width + "px" x.style.height = Math.floor(height / 3) + "px" x.style.bottom = "0px"; x.style.right = "0px"; x.style.backgroundColor = "white" x.style.textAlign = "center"; x.style.marginTop = height + "px"; z.style.position = "absolute"; z.style.width = width + "px" z.style.height = Math.ceil(height / 3) + "px" z.style.top = Math.ceil(height / 3) + "px" z.style.marginTop = Math.ceil(height / 6) - 33 + "px" z.style.marginLeft = Math.ceil(width / 2) - 340 + "px" w.style.position = "absolute"; w.style.width = width + "px" w.style.top = Math.ceil(height / 6) + "px" w.style.right = "0px"; } function init2() { var i, h, w, mel; var divs = new Array(); getMinshuns(); mel = document.getElementById('two_a'); for(i = 0; i < numOfLnx; i++) { divs[i] = document.getElementById(contentBox[i]); divs[i].style.position = "absolute"; w = width - 20 * (numOfLnx - 1) h = (height - 20 * (numOfLnx - 1)) - 20 divs[i].style.width = w + "px"; divs[i].style.height = h + "px"; divs[i].style.top = Math.ceil(height / 2) - Math.ceil(h / 2) + "px"; divs[i].style.left = Math.ceil(width / 2) - Math.ceil(w / 2) + "px"; divs[i].style.zIndex = i + 1; } var ht = parseInt(divs[0].style.height); if(ht < 430) { mel.style.height = ht - 122 + "px"; } else { mel.style.height = 330 + "px" } document.getElementById('loading').style.visibility = "hidden"; } function init() { var howMany = 0; var i; var divs = new Array(); getMinshuns() var mel = document.getElementById('two_a'); for(i = 0; i < numOfLnx; i++) { divs[i] = document.getElementById(contentBox[i]); divs[i].style.position = "absolute"; divs[i].style.top = i * 20 + 20 + "px"; divs[i].style.left = i * 20 + "px"; divs[i].style.width = width - 20 * (numOfLnx - 1) + "px" divs[i].style.height = (height - 20 * (numOfLnx - 1)) - 20 + "px" divs[i].style.zIndex = i + 1; } var ht = parseInt(divs[0].style.height); if(ht < 430) { mel.style.height = ht - 122 + "px"; } else { mel.style.height = 330 + "px" } document.getElementById('loading').style.visibility = "hidden"; } function tog(dv) { var i; var x; var dyv = document.getElementById(dv) for(i = 0; i < numOfLnx; i++) { x = document.getElementById(contentBox[i]) if(x == dyv) { zee++; x.style.zIndex = zee; x.style.backgroundColor = "#ffffff"; x.style.borderColor = "#6699ee"; x.style.visibility = "visible"; if(dv == "_four" && x.style.height != "40px") { document.getElementById('four_menu').style.visibility = "visible"; document.getElementById('four_a').style.visibility = "visible"; } } else if(x.style.zIndex != 0) { x.style.backgroundColor = "#eeeeee"; x.style.borderColor = "#ffffff"; } } } function boxIn(x, s1, s2, s3, s4) { var y = document.getElementById(x); var h = document.getElementById(s1); var about = document.getElementById('_four'); var col = randomize(); tog('_four'); if(about.style.backgroundColor == '#ffffff' || about.style.backgroundColor == "rgb(255, 255, 255)") { y.style.backgroundColor = col; h.style.visibility = "visible"; document.getElementById(s2).style.visibility = "hidden"; document.getElementById(s3).style.visibility = "hidden"; document.getElementById(s4).style.visibility = "hidden"; } } function boxOut(x, s) { var y = document.getElementById(x); var h = document.getElementById(s); var about = document.getElementById('_four'); if(about.style.backgroundColor == '#ffffff' || about.style.backgroundColor == "rgb(255, 255, 255)") { y.style.backgroundColor = "#ffffff"; } } function maximize(y, z, b) { var x = document.getElementById(contentBox[y]); var w = document.getElementById(z); getMinshuns(); document.getElementById(b).style.visibility = "visible"; if(x.style.width != width+"px") { x.style.height = (height - 20) + "px" x.style.width = width + "px"; x.style.left = "0px"; x.style.top = "25px"; w.className = "title2"; w.style.backgroundColor ="#6699ee"; w.style.color ="#ffffff"; w.style.fontWeight ="bold"; } else { x.style.height = (height - 20 * (numOfLnx - 1)) - 20 + "px" x.style.width = width - 20 * (numOfLnx - 1) + "px"; w.className = "title"; } allVis(y, "visible"); } function minimize(y, z, b) { var x = document.getElementById(contentBox[y]); var w = document.getElementById(z); getMinshuns() document.getElementById(b).className = "title"; if(x.style.height == '40px') { x.style.height = (height - 20 * (numOfLnx - 1)) - 20 + "px" x.style.width = width - 20 * (numOfLnx - 1) + "px"; w.style.visibility = "visible"; allVis(y, "visible") } else { x.style.height = 40 + "px"; x.style.width = 200 + "px"; w.style.visibility = "hidden"; allVis(y, "hidden") } } function allVis(y, z) { if(document.getElementById(contentBox[y]).style.height == '40px') { z = 'hidden'; } switch(y) { case 0: document.getElementById('zero_a').style.visibility = z; break; case 1: document.getElementById('one_a').style.visibility = z; break; case 2: document.getElementById('two_a').style.visibility = z; break; case 3: document.getElementById('three_a').style.visibility = z; break; case 4: document.getElementById('four_menu').style.visibility = z; document.getElementById('four_a').style.visibility = z; if(z == "visible") { z = "hidden"; } document.getElementById('bio').style.visibility = z; document.getElementById('pro').style.visibility = z; document.getElementById('per').style.visibility = z; document.getElementById('res').style.visibility = z; break; default: break; } } function mouseOverBox(x, over) { var a = 'maximize!'; var b = 'minimize!'; var c = 'close!'; var y = 'box'+x; if(over) { document.getElementById(y).style.right = width - 20 * (numOfLnx - 1) document.getElementById(y).style.bottom = document.getElementById(x).style.top; document.getElementById(y).style.visibility = "visible"; alert(document.getElementById(x).style.right) } else { document.getElementById(y).style.visibility = "hidden"; } } function peese(y, z, b) { document.getElementById(contentBox[y]).style.visibility = "hidden"; allVis(y, "hidden"); } /*********************************************** * Email Validation script- © Dynamic Drive (www.dynamicdrive.com) //"i slightly modified this" - tavaress * This notice must stay intact for legal use. * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i function checkIt() { var returnval = emailfilter.test(document.mel.addy.value) if (returnval != false) { document.mel.butt.disabled = false; return; } document.mel.addy.focus(); document.mel.addy.value = "please enter a valid address"; document.mel.butt.disabled = true; } /*********************************************** * Drag and Drop Script: © Dynamic Drive (http://www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for this script and 100s more. ---i slightly modified this :) ***********************************************/ var dragobject = { z: 0, x: 0, y: 0, offsetx : null, offsety : null, targetobj : null, mainobj : null, dragapproved : 0, //color: null, initialize:function() { document.onmousedown=this.drag document.onmouseup=function() { this.dragapproved=0 if(this.targetobj.className == "title") { document.getElementById("_"+this.targetobj.id).style.backgroundColor='#ffffff'; //document.getElementById("_"+this.targetobj.id).style.opacity = 1; //document.getElementById("_"+this.targetobj.id).style.filter = 'alpha(opacity=' + 100 + ')'; this.targetobj.style.backgroundColor = '#dddddd'; this.targetobj.style.color = '#cccccc'; if(parseInt(document.getElementById("_"+this.targetobj.id).style.top) < 28) { document.getElementById("_"+this.targetobj.id).style.top="26px"; } } } }, drag:function(e) { var evtobj=window.event? window.event : e this.targetobj=window.event? event.srcElement : e.target if (this.targetobj.className=="title") { this.dragapproved=1; if (isNaN(parseInt(this.targetobj.style.left))){this.targetobj.style.left=0} if (isNaN(parseInt(this.targetobj.style.top))){this.targetobj.style.top=0} this.offsetx=parseInt(document.getElementById("_"+this.targetobj.id).style.left) this.offsety=parseInt(document.getElementById("_"+this.targetobj.id).style.top) this.x=evtobj.clientX this.y=evtobj.clientY if (evtobj.preventDefault) evtobj.preventDefault() //this.color = randomize(); document.onmousemove=dragobject.moveit } }, moveit:function(e) { var evtobj=window.event? window.event : e if (this.dragapproved==1) { this.targetobj.style.backgroundColor = '#6699ee'; this.targetobj.style.color = '#ffffff'; //document.getElementById("_"+this.targetobj.id).style.backgroundColor = this.color; document.getElementById("_"+this.targetobj.id).style.left=this.offsetx+evtobj.clientX-this.x+"px"; document.getElementById("_"+this.targetobj.id).style.top=this.offsety+evtobj.clientY-this.y+"px"; //document.getElementById("_"+this.targetobj.id).style.opacity = 0.7; //document.getElementById("_"+this.targetobj.id).style.filter = 'alpha(opacity=' + 70 + ')'; return false } } } dragobject.initialize()