
function subscribe() {
	if (document.getElementById("EmailField").value == ""){
		alert ("Please enter Your Email Address.");
		document.getElementById("EmailField").focus();
		//return false;
	}
	else if (document.getElementById("NameField").value == ""){
		alert ("Please enter Your Name.");
		document.getElementById("NameField").focus();
		//return false;
	}
	else {
		var E = document.getElementById("EmailField").value;
		var N = document.getElementById("NameField").value;
		//if (confirm("Thank you for subscribing to Purple Jet's Newsletter.")) {
			//return true;
		//}
		var newswin = window.open('newsletter.cfm?E=' + E + '&N=' + N,'newswin','width=385,height=105,menubar=no,scrollbar=no,resizable=no,toolbar=no');
		newswin.moveTo(220,150);
	}
}

// BEGIN ASBURY PARK PRESS
function launchAPP(){
	var winapp = window.open('asburyframe.html','winapp','width=800,height=600,menubar=no,scrollbar=no,resizable=no,toolbar=no');
	//winapp.moveTo(550,50);
}
// END ASBURY PARK PRESS

// BEGIN CHITOWN-ANGLER
function launchCHI(){
	var winapp = window.open('chitownframe.html','winapp','width=800,height=600,menubar=no,scrollbar=no,resizable=no,toolbar=no');
	//winapp.moveTo(550,50);
}
// END CHITOWN-ANGLER

// BEGIN IMAGE FADER FUNCTIONS
function getimages () {
	//SET IMAGE PATHS. Extend or contract array as needed
	fadeimages[0]="images/topphoto1.jpg"
	fadeimages[1]="images/topphoto2.jpg"
	fadeimages[2]="images/topphoto3.jpg"
	fadeimages[3]="images/topphoto10.jpg"
	fadeimages[4]="images/topphoto4.jpg"
	fadeimages[5]="images/topphoto5.jpg"
	fadeimages[6]="images/topphoto11.jpg"
	fadeimages[7]="images/topphoto6.jpg"
	fadeimages[8]="images/topphoto7.jpg"
	fadeimages[9]="images/topphoto8.jpg"
	fadeimages[10]="images/topphoto11.jpg"
	fadeimages[11]="images/topphoto12.jpg"
	fadeimages[12]="images/topphoto13.jpg"
	fadeimages[13]="images/topphoto14.jpg"
	fadeimages[14]="images/topphoto15.jpg"
}

function fadepic(){
	if (curpos<100){
	curpos+=10
	if (tempobj.filters)
	tempobj.filters.alpha.opacity=curpos
	else if (tempobj.style.MozOpacity)
	tempobj.style.MozOpacity=curpos/100
	}
	else{
	clearInterval(dropslide)
	nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
	tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
	tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
	nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
	setTimeout("rotateimage()",pause)
	}
}
	
function rotateimage(){
	if (ie4||dom){
	resetit(curcanvas)
	var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
	crossobj.style.zIndex++
	var temp='setInterval("fadepic()",50)'
	dropslide=eval(temp)
	curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
	}
	else
	document.images.defaultslide.src=fadeimages[curimageindex]
	curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
}
	
function resetit(what){
	curpos=10
	var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
	if (crossobj.filters)
	crossobj.filters.alpha.opacity=curpos
	else if (crossobj.style.MozOpacity)
	crossobj.style.MozOpacity=curpos/100
}
	
function startit(){
	var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
	crossobj.innerHTML='<img src="'+fadeimages[curimageindex]+'">'
	rotateimage()
}
// END IMAGE FADER FUNCTIONS

// BEGIN LAUNCHING OF PURPLEJET IMAGES
function launchpjet(){
	var pjet1win = window.open('boatphoto.html','pjet1win','width=560,height=414,menubar=no,scrollbar=no,resizable=no,toolbar=no');
	pjet1win.moveTo(550,50);
}

function launchbboat(){
	var pjet2win = window.open('backboat.html','pjet2win','width=480,height=640,menubar=no,scrollbar=no,resizable=no,toolbar=no');
	pjet2win.moveTo(150,0);
}

function launchbridge(){
window.open ("bridge.html","new1","scrollbars=0,width=360,height=270");
}

function launchworkstation(){
window.open ("workstation.html","new2","scrollbars=0,width=360,height=270");
}

function launchhull(){
window.open ("hull.html","new6","scrollbars=0,width=360,height=270");
}

function launchlavatory(){
window.open ("lavatory.html","new6","scrollbars=0,width=270,height=360");
}




function launchdinette(){
window.open ("dinette.html","new3","scrollbars=0,width=270,height=360");
}

function launchbench(){
window.open ("bench.html","new4","scrollbars=0,width=270,height=360");
}

function launchsitarea(){
window.open ("sitarea.html","new4","scrollbars=0,width=270,height=360");
}

function launchbed(){
window.open ("bed.html","new5","scrollbars=0,width=360,height=270");
}

function launchcabin(){
window.open ("cabin.html","new6","scrollbars=0,width=270,height=360");
}

function launchaboutpics(n,w,h){
window.open ("aboutpics.cfm?n=" + n,"Photo","scrollbars=0,width="+w+",height="+h);
}




// END LAUNCHING OF PURPLEJET IMAGES

// BEGIN LAUNCHING OF CONVPHOTOS
function convphoto(n){
window.open ("convphotos.cfm?n=" + n,"conv","scrollbars=0,width=288,height=234");
}
// END LAUNCHING OF CONVPHOTOS

// BEGIN NEWSLETTER FORM
function news(f){
	var f;
	var L1, L2, L3, L4, L5 = "";
	L1 = "<form action= name=frm_emailnews method=post>";
	L2 = L1 + "Subscribe&nbsp;to&nbsp;Purple&nbsp;Jet&nbsp;Newsletter<br>";
	L3 = L2 + "Email:&nbsp;&nbsp;<input type=Text id=EmailField name=EmailField maxlength=200 size=20><br>";
	L4 = L3 + "Name:&nbsp;<input type=Text id=NameField name=NameField maxlength=200 size=20> <input type=Button value=Send class=PJsubmit onclick=subscribe()>";
	L5 = L4 + "</form>";
	if (f==1){
		document.write(L5);
	}
	else{};
}
// END NEWSLETTER FORM

// BEGIN CONTACT US
function contactus(){
	var L1, L2, L3, L4, L5, L6, L7 = "";
	L1 = "<tr><td align=center class=PJtxt colspan=3><font size=-1 color=#660099><br>";
	L2 = L1 + "Purple&nbsp;Jet&nbsp;Fishing&nbsp;Charters<br>407&nbsp;Channel&nbsp;Dr.&nbsp;Slip&nbsp;3<br>Point&nbsp;Pleasant&nbsp;Beach,&nbsp;NJ&nbsp;08742<br>";
	L3 = L2 + "Call&nbsp;Captain&nbsp;Dave&nbsp;Riback:&nbsp;1-732-996-2579<br>";
	L4 = L3 + "Email:&nbsp;<a href=mailto:info@purplejet.com?subject=Purple&nbsp;Jet&nbsp;Sportfishing&nbsp;Charter&nbsp;Information&nbsp;Request>info@purplejet.com</a>";
	L5 = L4 + "</font><br></td></tr>";
	document.write(L5);
}
// END CONTACT US

// BEGIN SHORE SOFTWARE TAGLINE
function shoretag(){
	var L1, L2, L3, L4 = "";
	L1 = "<tr><td align=right colspan=3><br><font size=-2 face=Arial color=Blue>";
	L2 = L1 + "<blockquote><span class=ShoreTag>Site&nbsp;designed&nbsp;&amp;&nbsp;maintained&nbsp;by&nbsp;";
	L3 = L2 + "<a href=http://www.shoresoftware.com target=_blank><span class=ShoreLink>Shore&nbsp;Software,&nbsp;Inc.</span></a>";
	L4 = L3 + "</span></blockquote></font></td></tr>";
	document.write(L4);
}
// END SHORE SOFTWARE TAGLINE

// BEGIN COPYRIGHT IN ALL PAGES
function copyright(){
	var L1 = "";
	L1 = "Copyright&copy; 2005 Purple Jet, Inc. All rights reserved.";
	document.write(L1);
}
// END COPYRIGHT IN ALL PAGES

// BEGIN IMAGE SCRIPT
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// END IMAGE SCRIPT

// BEGIN CHECK FOR ACROBAT READER
//This script detects the following plugin:
		//Flash
		//Windows Media Player
		//Java
		//Shockwave
		//RealPlayer
		//QuickTime
		//Acrobat Reader
		//SVG Viewer
function chkacro(pdf){
	if (pluginlist.indexOf("Acrobat Reader")!=-1) 
		{
			window.open("pdfs/" + pdf,"_blank", 'width=600,height=400,resizable=1,scrollbars=1');
		}
	else
		{
			alert("You need to download and install Acrobat Reader to view this form.\nIf the download does not automatically begin, please visit www.acrobat.com");
			window.open("http://ardownload.adobe.com/pub/adobe/reader/win/6.x/6.0/enu/AdbeRdr60_enu.exe","_blank");
		}
}
// END CHECK FOR ACROBAT READER

//HOMEPAGE VIDEO POPUP
function launchvideo(){
	window.open ("video.cfm","Video","scrollbars=0,width=427,height=355");
}
