function viewImage(albumId) { if (albumId != '') { window.location.href = 'index.php?subject=&page=&album=' + albumId; } else { window.location.href = 'index.php?subject=&page='; } } function viewLargeImage(imageName) { imgWindow = window.open('', 'largeImage', "width=" + screen.availWidth + ",height=" + screen.availHeight + ",top=0,left=0,screenY=0,screenX=0,status=yes,scrollbars=yes,resizable=yes,menubar=no"); imgWindow.focus(); imgWindow.location.href = 'gallery/viewImage.php?type=glimage&name=' + imageName; } function setFocus() { var cc=document.getElementById("in1"); cc.focus(); } function showBig(im) { var id = 'im' + im; var elem = document.getElementById(id); var height = elem.clientHeight; height=Math.round(height*2); elem.style.cssText = 'height:' + height + 'px;width:200px; margin-left: -50px;border:1px; border-style:solid; border-color:#666666;'; //elem.setAttribute("style","width:150px; height:" + height + "; border:1px; border-style:solid; border-color:#666666;",0); var input = "in" + im; var elemIn = document.getElementById(input); elemIn.style.cssText = 'float: left; width: 150px; margin: 10px 0px 0px 0px; text-align: left;'; } function showSmall(im) { var id = 'im' + im; var elem = document.getElementById(id); var height = elem.clientHeight; height=Math.round(height/2); elem.style.cssText = 'height:' + height + 'px;width:100px;margin-left:0px; border:1px; border-style:solid; border-color:#666666;'; //elem.setAttribute("style","width:100px; height:" + height + "; border:1px; border-style:solid; border-color:#666666;",0); var input = "in" + im; var elemIn = document.getElementById(input); elemIn.style.cssText = 'float: left; width: 150px; margin: 10px 0px 0px 50px; text-align: left;'; } function delay(c,t) { var c=c; var t=t; window.setTimeout("showNextField(" + c + ',' + t + ")",2000); } function delayLast(c,t) { var c=c; var t=t; window.setTimeout("showNextField(" + c + ',' + t + ")",700); } function showNextField(c,t){ var current = c; var tQ = t; if(current < tQ){ var nextId = 'row' + (current + 1); var next=document.getElementById(nextId); if(!next.currentStyle){ var style = document.defaultView.getComputedStyle(next,""); } else{ var style = next.currentStyle; } document.getElementById(nextId).style.display = "block"; } else { document.getElementById('SB').style.display = "inline"; document.getElementById('SB').style.marginTop = "1em"; } } function checkSpace(){ var err=''; form = document.getElementById('spell') tot=parseInt(form.getElementsByTagName('input').length-3); err=''; for (k=1; k<=tot; k++){ inp='in'+k; input = document.getElementById(inp).value; document.getElementById(inp).style.backgroundColor='white'; var lastPos = input.substring(input.length-1); if(input==''||input==null){ err= err + '\n' + k + '. No answer'; document.getElementById(inp).style.backgroundColor='yellow'; } if(input.indexOf(' ')!=-1){ err=err + '\n' + k + '. Spaces!'; document.getElementById(inp).style.backgroundColor='yellow'; } if(lastPos==' '){ err=err + '\n' + k + '. Spaces at the end!'; document.getElementById(inp).style.backgroundColor='yellow'; } if(input.charAt(0)==' '){ err=err + '\n' + k + '. Spaces in the beginning!'; document.getElementById(inp).style.backgroundColor='yellow'; } if(err=='')document.getElementById(inp).style.backgroundColor='white'; } if (err!='') { alert (err);return false; } }