
function classChange(element)
	{
		if (element.className == "displayNone")
			{
				element.className = "displayBlock";
			}
		else
			{
				element.className = "displayNone";
			}
							
	}

function classHighlight(element)
	{
		
		event.srcElement.className = "highlight";
	}


function classfaqText(element)
	{
			
		event.srcElement.className = "faqText";
	}


function submit()
	{
		document.frmSearch.submit();
		
	}

function reset()
	{
		document.frmSearch.reset();
				
	}


function showHTMLpage()
	{
	
	var sHTML = document.getElementById("shtmlpage").innerHTML
	
	iipTextPage = window.open("../iipTextPage.htm","htmlpage", "width=700, height=200, left=40, top=115, " +
			   	"location=yes, menubar=yes, status=yes, toolbar=yes, " +
				"scrollbars=yes, resizable=yes")
	
	iipTextPage.document.write(sHTML)
	iipTextPage.document.close()
	iipTextPage.focus()

	}


function showTextpage()
	{
	
	var sHTML = document.getElementById("shtmlpage").innerHTML
	var regexp = /<img\s*(\S+)(\s[^>]*)?>/gi    //find all the image tags.
	var imagelessHTML = sHTML.replace(regexp,"<BR>") //replace image tags with <BR> tag.
	
	iipTextPage = window.open("../iipTextPage.htm","textpage", "width=700, height=200, left=40, top=115, " +
			   	"location=yes, menubar=yes, status=yes, toolbar=yes, " +
				"scrollbars=yes, resizable=yes")
	
	iipTextPage.document.write(imagelessHTML)
	iipTextPage.document.close()
	iipTextPage.focus()
	
	}


function dot_exit() 
	{
		return(confirm("You are now leaving the United States Coast Guard website. " +
	       "USCG websites contain many links to other organizations, such as state/local " + 
	       "governments, educational institutions, and non-profit associations.  While we " +
	       "offer these electronic linkages for your convenience in accessing " +
	       "transportation-related information, please be aware that when you exit a USCG " +
	       "website, the privacy policy stated on our websites may not be the same as that " +
	       "on other websites.  Are you sure you wish to proceed?"))
	}


function resizeImage(target)
	{	
		window.open(target, "Image", "width=300, height=200, left=50, top=120, " +
			   "location=no, menubar=yes, status=no, toolbar=no, " +
			   "scrollbars=yes, resizable=yes")
	}

function resizeText(target)
	{	
		
		window.open(target, "Text", "width=700, height=200, left=40, top=115, " +
			   "location=no, menubar=yes, status=no, toolbar=no, " +
			   "scrollbars=yes, resizable=yes")
	}


function changeFont(element)
	{
		document.body.className = event.srcElement.id
				
		var arrRadios = document.getElementsByTagName('input')
		var arrTables = document.getElementsByTagName('table')
		var arrAnchors = document.getElementsByTagName('a')		
						
		for (var i=0;i < arrRadios.length; i++)
			{
				if (arrRadios[i].type == 'radio')
    					{
						arrRadios[i].id == event.srcElement.id ? arrRadios[i].checked = true : arrRadios[i].checked = false;
					}
		
			}
		
		for (var i=0;i < arrTables.length; i++)
			{
				if(arrTables[i].id == 'fontSize')
					{
						switch(event.srcElement.id)
							{
						 		case 'normalText':
									arrTables[i].style.fontSize = 16;
									break;
						 		case 'mediumText':
									arrTables[i].style.fontSize = 18;
									break;
						 		case 'largeText':
									arrTables[i].style.fontSize = 20;
									break;
						 		case 'largerText':
									arrTables[i].style.fontSize = 22;
									break;
							}		
					}

				
			}

		

		for (var i=0;i < arrAnchors.length; i++)
			{
				if(arrAnchors[i].id == 'fontSize')
					{
						switch(event.srcElement.id)
							{
						 		case 'normalText':
									arrAnchors[i].style.fontSize = 16;
									break;
						 		case 'mediumText':
									arrAnchors[i].style.fontSize = 18;
									break;
						 		case 'largeText':
									arrAnchors[i].style.fontSize = 20;
									break;
						 		case 'largerText':
									arrAnchors[i].style.fontSize = 22;
									break;
							}	
					}

			}
							
	}








