var DHTML=0,DOM=0,MS=0,NS=0,OP=0;function DHTML_init(){if(window.opera){OP=1}if(document.getElementById){DHTML=1;DOM=1}if(document.all&&!OP){DHTML=1;MS=1}if(document.layers&&!OP){DHTML=1;NS=1}}function getElem(d,c,b){var a;if(DOM){if(d.toLowerCase()=="id"){if(typeof document.getElementById(c)=="object"){a=document.getElementById(c)}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="name"){if(typeof document.getElementsByName(c)=="object"){a=document.getElementsByName(c)[b]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="tagname"){if(typeof document.getElementsByTagName(c)=="object"||(OP&&typeof document.getElementsByTagName(c)=="function")){a=document.getElementsByTagName(c)[b]}else{a=void (0)}return(a)}else{return void (0)}}}}else{if(MS){if(d.toLowerCase()=="id"){if(typeof document.all[c]=="object"){a=document.all[c]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="tagname"){if(typeof document.all.tags(c)=="object"){a=document.all.tags(c)[b]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="name"){if(typeof document[c]=="object"){a=document[c]}else{a=void (0)}return(a)}else{return void (0)}}}}else{if(NS){if(d.toLowerCase()=="id"||d.toLowerCase()=="name"){if(typeof document[c]=="object"){a=document[c]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="index"){if(typeof document.layers[c]=="object"){a=document.layers[c]}else{a=void (0)}return(a)}else{return void (0)}}}}}}function getCont(d,c,a){var b;if(DOM&&getElem(d,c,a)&&getElem(d,c,a).firstChild){if(getElem(d,c,a).firstChild.nodeType==3){b=getElem(d,c,a).firstChild.nodeValue}else{b=""}return(b)}else{if(MS&&getElem(d,c,a)){b=getElem(d,c,a).innerText;return(b)}else{return void (0)}}}function getAttr(e,d,b,a){var c;if((DOM||MS)&&getElem(e,d,b)){c=getElem(e,d,b).getAttribute(a);return(c)}else{if(NS&&getElem(e,d)){if(typeof getElem(e,d)[b]=="object"){c=getElem(e,d)[b][a]}else{c=getElem(e,d)[a]}return c}else{return void (0)}}}function setCont(d,c,b,a){if(DOM&&getElem(d,c,b)&&getElem(d,c,b).firstChild){getElem(d,c,b).firstChild.nodeValue=a}else{if(MS&&getElem(d,c,b)){getElem(d,c,b).innerText=a}else{if(NS&&getElem(d,c,b)){getElem(d,c,b).document.open();getElem(d,c,b).document.write(a);getElem(d,c,b).document.close()}}}}DHTML_init();function toggleDisplay(b,a){if(getElem("id",b,null).style.display=="none"){getElem("id",b,null).style.display="block";getElem("id",a,null).style.display="none"}else{getElem("id",a,null).style.display="block";getElem("id",b,null).style.display="none"}}function showLayer(a){getElem("id",a,null).style.visibility="visible";getElem("id",a,null).style.display="block"}function hideLayer(a){getElem("id",a,null).style.visibility="hidden";getElem("id",a,null).style.display="none"}function setActive(a){getElem("id",a,null).style.backgroundColor="#DD0000";getElem("id",a,null).style.color="white"}function setInactive(a){getElem("id",a,null).style.backgroundColor="#DDDDDD";getElem("id",a,null).style.color="#666666"}function setInactiveSelected(a){getElem("id",a,null).style.backgroundColor="#777777";getElem("id",a,null).style.color="white"}imageSwapper={};var preloadFlag=false;imageSwapper.init=function(){if(document.images){this.images=new Array();for(var a=0;a<this.init.arguments.length;a++){this.images[a]=this.createImage(this.init.arguments[a])}preloadFlag=true}};imageSwapper.createImage=function(b){if(document.images){var a=new Image();a.src=b;return a}};imageSwapper.setImage=function(c,b){if(document.images&&preloadFlag){var a=getElem("id",c,null);a.src=b}};imageSwapper.setImage2=function(f,b,c,e){if(document.images&&preloadFlag){var a=getElem("id",f,null);a.src=b;var d=getElem("id",c,null);d.src=e}};imageSwapper.setImageShowLayer=function(d,c,a){if(document.images&&preloadFlag){var b=getElem("id",d,null);b.src=c}getElem("id",a,null).style.visibility="visible";getElem("id",a,null).style.display="block"};imageSwapper.setImageHideLayer=function(d,c,b){if(document.images&&preloadFlag){var a=getElem("id",d,null);a.src=c}getElem("id",b,null).style.visibility="hidden";getElem("id",b,null).style.display="none"};var popUpWin=null;function setPopUpWindow(e,d,c,b,a){if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}popUpWin=window.open(e,"popUpWin","toolbar=no,location=no,directories=yes,status=yes,menubar=yes,scrollbar=yes,resizable=yes,copyhistory=yes,width="+b+",height="+a+",left="+d+", top="+c+",screenX="+d+",screenY="+c+"");if(!popUpWin){alert("In order to view this page, you have to allow popups!")}popUpWin.focus()}function setPopUpWindowAutoPos(c,b,a){setPopUpWindow(c,screen.width/2-b,screen.height/2*0.97-a,b,a)}function checkEmail(b){var a=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(a.test(b)){return true}else{return false}}function spamBlock(a,b){string="mailto:"+a+"@"+b;window.location=string}function insertTags(b,c,a){textfield=getElem("id",b,null);textfield.value=textfield.value.substring(0,textfield.selectionStart)+c+textfield.value.substring(textfield.selectionStart,textfield.selectionEnd)+a+textfield.value.substring(textfield.selectionEnd,textfield.value.length)}function insertEmail(a){link=prompt("Email address:","");if(link!=null){if(checkEmail(link)){textfield=getElem("id",a,null);email_details=link.split("@");tag_open="<a href=\"javascript:showEmailLink('"+email_details[0]+"','"+email_details[1]+"');\"><script type='text/javascript'>showEmail('"+email_details[0]+"','"+email_details[1]+"');<\/script>";tag_close="</a>";textfield.value=textfield.value.substring(0,textfield.selectionStart)+tag_open+tag_close+textfield.value.substring(textfield.selectionEnd,textfield.value.length)}else{alert("Email address not valid")}}}function insertURL(a){link=prompt("URL:","http://");if(link!=null){if(link.substring(0,7)=="http://"){textfield=getElem("id",a,null);tag_open='<a href="'+link+'">';tag_close="</a>";textfield.value=textfield.value.substring(0,textfield.selectionStart)+tag_open+textfield.value.substring(textfield.selectionStart,textfield.selectionEnd)+tag_close+textfield.value.substring(textfield.selectionEnd,textfield.value.length)}else{alert("Link needs to start with 'http://'")}}}function insertPageLink(a){link=prompt("Page Link ID:");if(link!=null){textfield=getElem("id",a,null);tag_open='<pagelink id="'+link+'">';tag_close="</pagelink>";textfield.value=textfield.value.substring(0,textfield.selectionStart)+tag_open+textfield.value.substring(textfield.selectionStart,textfield.selectionEnd)+tag_close+textfield.value.substring(textfield.selectionEnd,textfield.value.length)}}function insertFileLink(a){link=prompt("File Link ID:");if(link!=null){textfield=getElem("id",a,null);tag_open='<filelink id="'+link+'">';tag_close="</filelink>";textfield.value=textfield.value.substring(0,textfield.selectionStart)+tag_open+textfield.value.substring(textfield.selectionStart,textfield.selectionEnd)+tag_close+textfield.value.substring(textfield.selectionEnd,textfield.value.length)}}function resetTextfield(b,a){textfield1=getElem("id",b,null);textfield2=getElem("id",a,null);textfield1.value=textfield2.value}function sineInOut(a){return(1-Math.cos(a*Math.PI))/2}function showEmail(a,b){document.write(a+"@"+b)}function showEmailLink(a,b){parent.location="mailto:"+a+"@"+b}function SlideShow(c,b,a){this.slideshowDivID=c;this.slideshowImageID=b;this.slideshowLinkID=a;this.preloadFlag=false;this.currentImageID=0;this.nextImageID=1;this.slideDuration=2000;this.transitionDuration=1000;this.random=false}SlideShow.prototype.setRandom=function(a){this.random=a};SlideShow.prototype.setSlideDuration=function(a){this.slideDuration=a};SlideShow.prototype.setTransitionDuration=function(a){this.transitionDuration=a};SlideShow.prototype.setImages=function(){if(document.images){this.images=new Array();for(var a=0;a<this.setImages.arguments.length;a++){this.images[a]=this.createImage(this.setImages.arguments[a])}this.preloadFlag=true}};SlideShow.prototype.setLinks=function(){this.links=new Array();for(var a=0;a<this.setLinks.arguments.length;a++){this.links[a]=this.setLinks.arguments[a]}};SlideShow.prototype.createImage=function(b){if(document.images){var a=new Image();a.src=b;return a}};SlideShow.prototype.sineInOut=function(a){return(1-Math.cos(a*Math.PI))/2};SlideShow.prototype.loop=function(){var b=new Date().getTime();this.position=(b-this.startTime)/this.transitionDuration;if(this.position>0.99){this.position=0.99;clearInterval(this.interval)}var a=this.sineInOut(this.position);this.setOpacity(this.objectStyle,a)};SlideShow.prototype.setOpacity=function(b,a){b.opacity=(a);b.MozOpacity=(a);b.KhtmlOpacity=(a);b.filter="alpha(opacity="+a*100+")"};SlideShow.prototype.startTransition=function(c,b){document.getElementById(this.slideshowDivID).style.backgroundImage="url("+c+")";this.objectStyle=document.getElementById(this.slideshowImageID).style;this.setOpacity(this.objectStyle,0);this.nextImage=b;var a=this;window.setTimeout(function(){a.startInterval()},10)};SlideShow.prototype.setLink=function(a){if(this.slideshowLinkID!=""){document.getElementById(this.slideshowLinkID).href=a}};SlideShow.prototype.startInterval=function(){document.getElementById(this.slideshowImageID).src=this.nextImage;this.startTime=new Date().getTime();var a=this;this.interval=setInterval(function(){a.loop()},10)};SlideShow.prototype.showNextImage=function(){if(document.images&&this.preloadFlag){if(this.random){this.nextImageID=Math.round(Math.random()*(this.images.length-1))}else{this.nextImageID=this.currentImageID+1}if(this.nextImageID>this.images.length-1){this.nextImageID=0}if(this.links!=null){this.setLink(this.links[this.nextImageID])}this.startTransition(this.images[this.currentImageID].src,this.images[this.nextImageID].src);this.currentImageID=this.nextImageID}var a=this;window.setTimeout(function(){a.showNextImage()},this.slideDuration)};SlideShow.prototype.start=function(){var a=this;window.setTimeout(function(){a.showNextImage()},this.slideDuration)};function initAll(){imageSwapper.init("http://artschoolvets.com/gfx/n_home_over.gif","http://artschoolvets.com/gfx/n_news_over.gif","http://artschoolvets.com/gfx/n_blogs_over.gif","http://artschoolvets.com/gfx/n_features_over.gif","http://artschoolvets.com/gfx/n_faces-spaces_over.gif","http://artschoolvets.com/gfx/n_store_over.gif");clearExecuteMessage=function(){if(document.getElementById("execute_message")!=null){document.getElementById("execute_message").innerHTML=""}};window.setTimeout("clearExecuteMessage()",5000)};