/**
 * mm_menu 20MAR2002 Version 6.0
 * Andy Finnell, March 2002
 * Copyright (c) 2000-2002 Macromedia, Inc.
 *
 * based on menu.js
 * by gary smith, July 1997
 * Copyright (c) 1997-1999 Netscape Communications Corp.
 *
 * Netscape grants you a royalty free license to use or modify this
 * software provided that this copyright notice appears on all copies.
 * This software is provided "AS IS," without a warranty of any kind.
 */


function getvalue()
{ 
var str=window.location; 
document.frm.artist.value=str;
var text=document.frm.artist.value;
theleft = text.indexOf("=") + 1;
return(unescape(text.substring(theleft,255)));
}

function bform(frm)
{
if(checkrequired(frm))
  {
   if(chkfld(frm))
   {
   //     put code for sending form values to email here ...
 str =" First Name  : " + frm.requiredtxtfirst.value + "\n" + "  Last Name : "  + frm.requiredtxtlast.value ;
 str += "  Email    : " + frm.txtemail.value + "  Phone: " + frm.txtphone.value ;
 str +="    Print: " + frm.requiredtxtprint.value;

method="post" ; 
frm.action="mailto:" + "sales@theartistscorner.com" + "?subject=Buy Now" + "&body=" + str ; 
								  frm.submit();
   return true;
   }
   else
  {
  return false;
  }
  }
  else
  {
  return false;
  }
 }

function checkrequired(which)
 {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else
return true;
}

function chkfld(obj)
{
   if((obj.txtemail.value =="")&& (obj.txtphone.value ==""))
     {
       alert("Please fill in either phone or email.." )
	   return false ;
     }
   else
     {
       return true ;  
     }
}

function PrintDate(){
	var mydate=new Date()
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var theyear=mydate.getYear()
	var daym=mydate.getDate()
	
	if (daym<10)
	daym="0"+daym
	if (theyear<2000)
	theyear+=1900;
	var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
	var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
	document.write(dayarray[day]+", "+montharray[month]+" "+daym + ", "+theyear) 
}

var mywin=null
function closewyn()
{
if(mywin != null)
 {
 mywin.close()
 }
 }
 
var smallwin=null
function closewin()
{
if(smallwin != null)
 {
 smallwin.close()
 }
}

function openwyn(filename)
{
mywin = window.open(filename,"the_win","top=0,left=0,width=400,height=300,scrollbars=yes")
}


function openwiner(filename)
{
win1 = window.open(filename,"mywin","width=350,height=200,scrollbars=no")
}

function openwiny(filename)
{
win1 = window.open(filename,"mywin","width=700,height=550,scrollbars=yes")
}

function student(filename)
{
smallwin = window.open(filename,"mywin","top=795,left=467,width=475,height=355,scrollbars=yes")
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function showanswer(thesection){
	 smallwin= window.open('answersrc.htm'+ thesection,"","status,top=280,left=295,height=45,width=600,status=no,scrollbars=no");
	  }
	  
	function showpost(thesection){
	 smallwin= window.open('answersrc.htm'+ thesection,"","status,top=280,left=295,height=45,width=600,status=no,scrollbars=no");
	  }
	
function opendirec(img,w,h)

{
  mywin = window.open("","display","top=150,left=400,width=397 ,height=240")
 mycon=" <html><head><title>Directions to AGM Meeting</title></head><body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0'>";
 mycon+="<table width='100%' border='1' align='left'><tr><td >";
 mycon+="<img src='" + img +"' width='" + w + "' height='" + h+ "' ></td></tr></td></tr></table></body></html>";
 mywin.document.write(mycon);
 mywin.document.close();
}
	
	
	
function openposter(img,w,h)
{
  mywin = window.open("","display","top=0,left=300,width=445 ,height=562")
 mycon=" <html><head><title>Spelling Bee Poster</title></head><body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0'>";
 mycon+="<table width='100%' border='1' align='left'><tr><td >";
 mycon+="<img src='" + img +"' width='" + w + "' height='" + h+ "' ></td></tr></td></tr></table></body></html>";
 mywin.document.write(mycon);
 mywin.document.close();
}
function themap(img,w,h)
{
	
  mywin = window.open("","display","top=105,left=250,width="+ w +",height="+h+"")
 mycon=" <html><head><title>Map Directions </title></head><body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0' >";
 mycon+="<table width='100%' border='1' align='left'><tr><td >";
 mycon+="<img src='" + img +"' width='" + w + "' height='" + h+ "'  ></td></tr></td></tr></table></body></html>";
 mywin.document.write(mycon);
 mywin.document.close();
}

function enlarge(img,w,h)
{
	
  mywin = window.open("","display","top=105,left=250,width="+ w +",height="+h+"")
 mycon=" <html><head><title>Spelling Bee 2004 </title></head><body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0' >";
 mycon+="<table width='100%' border='1' align='left'><tr><td >";
 mycon+="<img src='" + img +"' width='" + w + "' height='" + h+ "'  ></td></tr></td></tr></table></body></html>";
 mywin.document.write(mycon);
 mywin.document.close();
}
function enlarge5(img,w,h)
{
	
  mywin = window.open("","display","top=105,left=250,width="+ w +",height="+h+"")
 mycon=" <html><head><title>Spelling Bee 2005 </title></head><body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0' >";
 mycon+="<table width='100%' border='1' align='left'><tr><td >";
 mycon+="<img src='" + img +"' width='" + w + "' height='" + h+ "'  ></td></tr></td></tr></table></body></html>";
 mywin.document.write(mycon);
 mywin.document.close();
}

function enlarge6(img,w,h)
{
	
  mywin = window.open("","display","top=105,left=250,width="+ w +",height="+h+"")
 mycon=" <html><head><title>Spelling Bee 2006 </title></head><body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0' >";
 mycon+="<table width='100%' border='1' align='left'><tr><td >";
 mycon+="<img src='" + img +"' width='" + w + "' height='" + h+ "'  ></td></tr></td></tr></table></body></html>";
 mywin.document.write(mycon);
 mywin.document.close();
}

function openspellb(filename)
{
  mywindo = window.open(filename,"display","top=120,left=300,width=600,height=550,scrollbars=yes")

}  

function openspellx(filename)
{
  mywindo = window.open(filename,"display","top=120,left=300,width=500,height=350,scrollbars=yes")

}  

