//next 4 used on default.aspx pnlServices and services.aspx

function showFonts()
{
parent.document.getElementById("frameTest").src="services_fonts.htm"
}

function showWeb()
{
parent.document.getElementById("frameTest").src="services_web.htm"
}

function showClSr()
{
parent.document.getElementById("frameTest").src="services_clsr.htm"
}

function showNone()
{
parent.document.getElementById("frameTest").src="services_none.htm"
}


//display photo in temp window

	
function openNewWindow(disPhoto,size)
	{
	
	var NewWin1;
	var tmpContent;
	

		if (NewWin1 != null)
			{
		NewWin1.close()
			}
	
		if (size == 0)
			{
			NewWin1=window.open("","Photo","height=550,width=400,left=10,top=10,screenX=10,screenY=10,status=Yes,alwaysRaised=Yes");
			}
		else
			{
			if (size == 1)
				{
			NewWin1=window.open("", "Photo","height=400,width=550,left=10,top=10,screenX=10,screeny=10,status=Yes,alwaysRaised=Yes");
				}
			else
				{
			NewWin1=window.open("","Photo","height=550,width=550,left=10,top=10,screenX=10,screeny=10,status=Yes,alwaysRaised=Yes");
				}
			}
	
		tmpContent="<html><body><br><center><IMG SRC=" + disPhoto + "><p><form><input type='button' value='Close' onClick='window.close()'></form></center></body></html>";
		NewWin1.document.write(tmpContent);
		NewWin1.document.close();
		
	}
	
	
	function closeNewWindow()
	{
	
		NewWin1.close()
	
	}
	
//***************slide show*********************
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 6000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0]='images/panels/pnl001.gif'
Pic[1]='images/panels/pnl002.gif'
Pic[2]='images/panels/pnl003.gif'
Pic[3]='images/panels/pnl004.gif'
Pic[4]='images/panels/pnl005.gif'
Pic[5]='images/panels/pnl006.gif'
Pic[6]='images/panels/pnl007.gif'
Pic[7]='images/panels/pnl008.gif'
Pic[8]='images/panels/pnl009.gif'
Pic[9]='images/panels/pnl010.gif'
Pic[10]='images/panels/pnl011.gif'
Pic[11]='images/panels/pnl012.gif'
Pic[12]='images/panels/pnl013.gif'
Pic[13]='images/panels/pnl014.gif'
Pic[14]='images/panels/pnl015.gif'
Pic[15]='images/panels/pnl016.gif'
Pic[16]='images/panels/pnl017.gif'
Pic[17]='images/panels/pnl018.gif'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

//***************another internet set of routines to highlight forms*****************
//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
var highlightcolor="gainsboro"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}

//routines from school
//check form data on order_data

		function doAllChk()
			{
			//var fstError="";
			var dataMIA="";
			var strTemp="";
			var stateStat="";
			var countryStat="";
			var fullStat="";
			//var emptyInfo="";

			//alert("You are in")

var err_color = "#d3d3d3"
			var form = document.forms[0];

				for (var i=1; i <= 12 ; i++) //the 12 refers to the field count
					{
						if (i==2)	{continue} //field 1 isn't required
						if (i==5)	{continue} //field 4 isn't required
						if (i==7)	{continue} //field 6 isn't required
						
						if (form.elements[i].value =="")
						{
						//alert("Please fill out all fields with red asterisk.");
						
						form.elements[i].style.backgroundColor=err_color;//#D3D3D3
						dataMIA=i + " " + dataMIA;
						}
							//alert(fullStat + " " + fstError)

					}

			//emptyInfo="";


			//check state selection

//				if(window.document.form1.state_pro.value == 0)
//				{
//					//alert("Please select a State.");
//					stateStat="You must select a <b>STATE</b>.<br>";
//				}


			//check country selection

//				if(window.document.form1.country_host.value == 0)
//				{
//					//alert("Please select a Country.");
//					countryStat="You must select a <b>COUNTRY</b>.<br>";
//				}


	 		//display empty field data or submit the data

	 		//dataMIA=stateStat + countryStat + fullStat
	 		 //alert(dataMIA)

	 		// if (dataMIA != "")
	 		 	{
				//document.form1.method=""
	 		 	//alert("Submit canceled, see list for errors."+ dataMIA)
	 		 	//setTimeout("startFix(document.form1." + fstError + ")",0)
	 		 	//var errorsWin=window.open("", "Errors","height=280, width=320, left=window.screen.availWidth, top=window.screen.availHeight");

	 		 	//var tmpContent="<html><body><b>The Following fields need your attention:</b><p>" + dataMIA + "<p><center><input type='button' value='OK' onClick='self.close()'></center></body></html>"
	 			//errorsWin.document.write(tmpContent)
	 			//errorsWin.document.close()
	 			//dataMIA=""
	 			}
					//else
				{
				//document.form1.method="post"
				//form.submit()
				//alert("All present.")
				}

	 	}
	 	


		function chkEmail(c)
			{
			var cc = c.charAt(c.length - 1);
			var per=0;
			var at=0;
			var ccLen=c.length - 1

			do	{
				ccLen == ccLen--
					{
					cc = c.charAt(c.length - ccLen)
					if (cc == ".") {per = per + 1}

					if (cc == "@") {at = at + 1}
					}
				} while (ccLen != -1)
				if ( (per > 0)&&(at == 1) )
				{return true}
				else
				{
				alert("Check syntax on Email address.")
				setTimeout("startFix(document.form1.email)",0)
				return false
				}
			}


		function chkAlpha(c,numF)
			{

			var cc = c.charAt(c.length - 1);
					//alert (cc + " " + c + " " + cc.charCode())

				if ( ((cc == " ") || ((cc >= "a") && (cc <= "z")) || ((cc >= "A") && (cc <= "Z"))) )
				{
					cc=""
				}
				else
				{
				//alert("Alpha characters only.")
					if (numF=="1")
						{
						document.form1.cust_name.value=strTemp
						}
					if (numF=="2")
						{
						document.form1.cust_name_card.value=strTemp
						}
					if (numF=="3")
						{
						document.form1.city.value=strTemp
						}
				return false;
				}
			//alert (cc + " " + numF + " " + document.form1.first_name.value)

			strTemp=c;
			return true;
			}

		function startFix(fld)
			{
				fld.focus()
				fld.select()
			}

