<!--
	var useragent = navigator.userAgent;
	var browser = (useragent.indexOf("Nav") == -1) ? 0 : 1;
	
	window.name = "main";

	function swap (IMGid, newIMGid) {
		document.getElementById(IMGid).src = eval(newIMGid + ".src");
	}
			
	function launchWindow (url, winID) {
		if (browser == 0) {
			window.name = "main";
			if ( winID == "tshirt" ) {
				var sFeatures = "height=500, left=10, screenX=10, screenY=10, top=10, width=500";
			}
			if ( winID == "order" ) {
				var sFeatures = "height=500, left=10, resizable, screenX=10, screenY=10, scrollbars, top=10, width=500";
			}
			if ( winID == "news" ) {
				var sFeatures = "height=500, left=10, resizable, screenX=10, screenY=10, scrollbars, top=10, width=650";
			}
			if ( winID == "update" ) {
				var sFeatures = "height=500, left=10, resizable, screenX=10, screenY=10, scrollbars, top=10, width=650";
			}
			if ( winID == "photos" ) {
				var sFeatures = "height=540, left=10, resizable, screenX=10, screenY=10, scrollbars, top=10, width=780";
			}
			var oNewWindow = window.open(url, winID, sFeatures); 
			oNewWindow.focus();
		}
	
	}
	
	function changeDocInfo (docTitle, docIcon, docFileName, docLink, docLang, docFileSize) {
	
		document.getElementById("docTitle").innerText = docTitle
		
		var icon = document.getElementById("docIcon");
		if (docIcon == 1) { icon.src = "images/icon_big_www.gif"; }
		if (docIcon == 2) { icon.src = "images/icon_big_pdf.gif"; }
		if (docIcon == 3) { icon.src = "images/icon_big_doc.gif"; }
		if (docIcon == 4) { icon.src = "images/icon_big_xls.gif"; }
		if (docIcon == 5) { icon.src = "images/icon_big_jpg.gif"; }
		
		document.getElementById("docName").innerText = docFileName;
		//document.getElementById("docLink").href = docLink;
		
		var lang = document.getElementById("docLang");
		if (docLang == 1) { lang.innerText = 'English';		}
		if (docLang == 2) { lang.innerText = 'Français';	}
		if (docLang == 3) { lang.innerText = 'Italiano';	}
		if (docLang == 4) { lang.innerText = 'Deutsch';		}
		if (docLang == 5) { lang.innerText = 'Español';		}
		if (docLang == 6) { lang.innerText = 'Portuguesa';		}
		
		var link = document.getElementById("docInfo");
		if (docIcon == 1) {  
			link.innerText = "(site will open in a new window)"; 
		}
		else {	
			link.innerText = docFileSize;		
		}
		
	} 
	
	function resetDocInfo () {
	
		document.getElementById("docTitle").innerText = "link info";
		document.getElementById("docTitle").style.fontStyle = "italic";
		
		document.getElementById("docIcon").src = "images/1pix-trans.gif";
		
		document.getElementById("docName").innerText = "link or filename";
		document.getElementById("docName").style.fontStyle = "italic";
		
		document.getElementById("docLang").innerText = "language";
		document.getElementById("docLang").style.fontStyle = "italic";
		
		document.getElementById("docInfo").innerText = "";
	}
	
	function closewindow() {
			window.close();
	}
	
	function gotoPage (url)	{
			window.open(url, "main");
	}
	
	function printpage() {
			window.print();
	}
	
	function navToPage(url) {
		window.navigate(url);
	}
	
	function disableButton(id) {
		document.getElementById(id).disabled = true;
	}
	
	function image_contact() {
		alert("To obtain a high resolution file of this image for editorial use, please contact us at:\n\ninfo@deepseaunderthepolenews.com\n\nSincerely,\nThe deepseaunderthepolenews.com Editorial Staff");
	}
	
	/*
		Toggles items that can be hidden and shown.  The itemIdReplace is an optional
		item that will be displayed if the itemId is hidden and vice versa
		SAMPLE: <img src="images/section_arrowDown.gif" onClick="toggleShowHide('lifestyle', 'lifestyleSummary'); toggleShowHideArrowImage(this);">
	*/
	function toggleShowHide(itemId, itemIdReplace)
	{
		try
		{
			if (document.getElementById(itemId).style.display == 'none')
			{
				document.getElementById(itemId).style.display = '';
				document.getElementById(itemIdReplace).style.display = 'none';
			}
			else
			{
				document.getElementById(itemId).style.display = 'none';
				document.getElementById(itemIdReplace).style.display = '';
			}
		}
		catch (e)
		{
		}
	}
	
	/*
		Toggles the right and down arrow for showing and hiding sections
		SAMPLE: <img src="images/section_arrowDown.gif" onClick="toggleShowHide('lifestyle', 'lifestyleSummary'); toggleShowHideArrowImage(this);">
	*/
	function toggleShowHideArrowImage(item)
	{
		try
		{
			var newSrc;
			
			if (item.src.indexOf('images/section_arrowRight.gif') == -1)
			{
				newSrc = item.src.replace('arrowDown', 'arrowRight');
				//item.src = 'images/section_arrowRight.gif';
			}
			else
			{
				newSrc = item.src.replace('arrowRight', 'arrowDown');
				//item.src = 'images/section_arrowDown.gif';
			}
			
			item.src = newSrc;
		}
		catch (e)
		{
		}
	}
	
	
	/*
		Toggles the right and down arrow for showing and hiding sections by ImageID
		SAMPLE: <img src="images/section_arrowDown.gif" onClick="toggleShowHide('lifestyle', 'lifestyleSummary'); toggleShowHideArrowImageId('imageId');">
	*/
	function toggleShowHideArrowImageId(itemId)
	{
		var newSrc;
		//newSrc = document.getElementById(itemId).src;
	
		try
		{
			if (document.getElementById(itemId).src.indexOf('images/section_arrowRight.gif') == -1)
			{
				newSrc = document.getElementById(itemId).src.replace('arrowDown', 'arrowRight');
				//document.getElementById(itemId).src = 'images/section_arrowRight.gif';
			}
			else
			{
				newSrc = document.getElementById(itemId).src.replace('arrowRight', 'arrowDown');
				//document.getElementById(itemId).src = 'images/section_arrowDown.gif';
			}
			
			document.getElementById(itemId).src = newSrc;
		}
		catch (e)
		{
		}
	}
	
	
//-->

//<!-- New Java Script Code / requires JQuery FrameWork


		// Check Groups functions
		function startChkGroup_Basic(groupDivID){ //This one is used on user edit
			// Event Functions
				// Radio onClick 
					$("#rad"+groupDivID+" :input[@type=radio]").click(function(){ 
						if (this.value == "all") { // Select All > Result = All CheckBox Values
							printAllValuesResult(groupDivID);
							$("#"+groupDivID+" :input[@type=checkbox]").attr("disabled","disabled");
							$("#"+groupDivID).hide();	showHideIcon(groupDivID);
							$("#invert"+ groupDivID).unbind('click');
							//$("#invert"+ groupDivID).click(function(){ alert("Select Especify") });
						}else if(this.value == "none"){ // Select None > Result = 0
							$("#"+groupDivID+'Result').val(0);
							$("#"+groupDivID+" :input[@type=checkbox]").attr("disabled","disabled");
							$("#"+groupDivID).hide();	showHideIcon(groupDivID);
							$("#invert"+ groupDivID).unbind('click');
							//$("#invert"+ groupDivID).click(function(){ alert("Select Especify") });
						}else{ // Especify
							printResult(groupDivID);
							$("#"+groupDivID).show();	showHideIcon(groupDivID);
							$("#"+groupDivID+" :input[@type=checkbox]").removeAttr("disabled");
							$("#invert"+ groupDivID).click(function(){ invertCheckGroup(groupDivID); });
						};
					});
				// Checkbox onClick
					$("#"+groupDivID+" :input[@type=checkbox]").click(function(){ 
						printResult(groupDivID); 
					});	
				// Invert onClick
					//$("#invert"+ groupDivID).click(function(){ invertCheckGroup("#"+groupDivID); });
			
			// Init Options
				var chkStatus = allGroupChecked(groupDivID); 
				if(chkStatus == 'none'){
					$("#rad"+groupDivID+" input:radio[value='none']").trigger("click");
				}else if(chkStatus == 'all'){
					$("#rad"+groupDivID+" input:radio[value='all']").trigger("click");
				}else{
					$("#rad"+groupDivID+" input:radio[value='especify']").trigger("click");
				};
				printResult(groupDivID);
				expandableDiv(groupDivID);			
		};
	


		function startChkGroup_Register(groupDivID){ //This one is used on user register
			// Checkbox onClick
				$("#"+groupDivID+" :input[@type=checkbox]").click(function(){ 
					if($("#chk"+groupDivID+"1").attr('checked') ){
						printResult(groupDivID); 
					}else{
						$("#"+groupDivID+"Result").val(0);
						}
					//printResult(groupDivID); 
				});	
			
			// Init Options
				printResult(groupDivID);
		};
	


		function startChkGroupType_3(groupDiv){ //This one is used on nested events on user edit page
			showHideIcon(groupDiv);			
			$("#chkAll"+groupDiv).change(function(){ 
				if (this.checked) { 
					$("#"+groupDiv+' :input[@type=checkbox]').removeAttr('checked');
					$("#"+groupDiv).hide();showHideIcon(groupDiv);
					printResult("#"+groupDiv);
				}else{
					$("#"+groupDiv+' :input[@type=checkbox]').removeAttr('checked');
					$("#"+groupDiv).show();showHideIcon(groupDiv);
					printResult("#"+groupDiv);
				};
			});
			$("#"+groupDiv+" :input[@type=checkbox]").change(function(){ 
				$("#chkAll"+groupDiv).removeAttr('checked')
				printResult("#"+groupDiv); 
				if(allGroupChecked("#"+groupDiv) == "none"){
					$("#chkAll"+groupDiv).attr('checked','checked');
				}else{
					$("#chkAll"+groupDiv).removeAttr('checked');
				}													  
			});	
			printResult("#"+groupDiv);
			if ($("#chkAll"+groupDiv).attr('checked')==true) { $("#"+groupDiv).slideUp();}
			$("#btn"+groupDiv+"Show").click(function(){ $("#"+groupDiv).toggle();showHideIcon(groupDiv); });
			
			if(allGroupChecked("#"+groupDiv) == "none"){
				$("#chkAll"+groupDiv).attr('checked','checked')
			}else{
				$("#chkAll"+groupDiv).removeAttr('checked')
			}													  
			
		};

		function startChkGroupType_4(groupDivID){ //This one is used on admin Send
			expandableDiv(groupDivID);			
			$("#chkAll"+groupDivID).change(function(){ 
				if (!this.checked) { 
					$("#"+groupDivID+' :input[@type=checkbox]').attr('checked', 'checked');
					$("#"+groupDivID).hide();showHideIcon(groupDivID);
					printResult(groupDivID);
				}else{
					$("#"+groupDivID+' :input[@type=checkbox]').removeAttr('checked');
					$("#"+groupDivID).show();showHideIcon(groupDivID);
					printResult(groupDivID);
				};
			});
			$("#"+groupDivID+" :input[@type=checkbox]").change(function(){ 
				$("#chkAll"+groupDivID).attr('checked','checked');
				printResult(groupDivID); 
				if(allGroupChecked(groupDivID) == "all"){$("#chkAll"+groupDivID).removeAttr('checked')}
			});	
			$("#invert"+ groupDivID).click(function(){ invertCheckGroup(groupDivID); $("#chkAll"+groupDivID).removeAttr('checked'); });
			printResult(groupDivID);
			if ($("#chkAll"+groupDivID).attr('checked')!=true) { $("#"+groupDivID).hide();showHideIcon(groupDivID);}
		};
	

		function startChkGroupType_UsersList(groupDivID){ //This one is used on Admin Send
			showHideIcon(groupDivID);			
			$("#chkAll"+groupDivID).change(function(){ 
				if (this.checked) { 
					$("#"+groupDivID+' :input[@type=checkbox]').attr('checked','checked');
					printResult(groupDivID);
				}else{
					$("#"+groupDivID+' :input[@type=checkbox]').removeAttr('checked');
					printResult(groupDivID);
				};
			});
			$("#"+groupDivID+" :input[@type=checkbox]").change(function(){ 
				printResult(groupDivID); 
				if(allGroupChecked(groupDivID) == "all"){	
					$("#chkAll"+groupDivID).attr('checked','checked'); 
				}else if(allGroupChecked(groupDivID) == "none"){
					$("#chkAll"+groupDivID).removeAttr('checked')
				}else{													  
					$("#chkAll"+groupDivID).removeAttr('checked')
				};
			});	
			
			//init
			printResult(groupDivID);
			if(allGroupChecked(groupDivID) != "all"){ $("#chkAll"+groupDivID).removeAttr('checked');	}													  
			
		}

		function allGroupChecked(groupDivID){
			var ChkChecked 	= '';
			var contChecked = 0;
			
			$("#"+groupDivID+' :input[@type=checkbox]').each(function () {
				if(this.checked){
					contChecked += 1;
					if(ChkChecked == 'none' || ChkChecked == 'some'){
						ChkChecked = 'some';
					}else{
						ChkChecked = 'all';
					}
				}else{
					if(ChkChecked == 'all' || ChkChecked == 'some' ){
						ChkChecked = 'some';
					}else{
						ChkChecked = 'none';
					}
				}; 
			});
			if (ChkChecked == 'some'){ChkChecked = contChecked;} 
			return ChkChecked;
		}
		
		
		function invertCheckGroup(groupDivID){
			$("#"+groupDivID+' :input[@type=checkbox]').each(function () {
				if(this.checked){
					$('#'+this.id).removeAttr('checked')
				}else{
					$('#'+this.id).attr('checked', 'checked')
				}; 
			});
			printResult(groupDivID);
		}
		
		
	
		// Print result on [chkGroup]+Result field
		function printResult(groupDivID){
			//$("#"+groupDivID+'Result').hide();
			
			var result = '';
			$("#"+groupDivID+' :input[@type=checkbox]').each(function () {
				if(this.checked){
					result = result + this.value + ",";
				}; 
				$("#"+groupDivID+'Result').val(result.substring(0,result.length-1));
			});
			if (result == ''){$("#"+groupDivID+'Result').val(0);}
			printChkStatus(groupDivID);
		}


		// Print result if all would checked
		function printAllValuesResult(groupDivID){
			var result = '';
			$("#"+groupDivID+' :input[@type=checkbox]').each(function () {
				result = result + this.value + ",";
				$("#"+groupDivID+'Result').val(result.substring(0,result.length-1));
			});
			if (result == ''){$("#"+groupDivID+'Result').val(0);}
			$("#"+groupDivID+"ChkStatus").html("All Checked");
		}
		

		function sumDivGroupResults(groupDivID){
			var result = ","
			$("#"+groupDivID+" :input[@type=text]").each(function () {
				result = result + $(this).val()+",";											   
			});
	
			result = result.replace(/,0,/g, ",");
			result = result.replace(/,0,/g, ",");
			result = result.substring(1,result.length-1);
			if (result == ','){ result = 0; }
			$("#"+groupDivID+"Result").val(result);
		}

		// Print Check Status on [chkGroup]+SckStatus field
		var msgIfAll 	= "All checked";
		var msgIfNone 	= "None checked";
		
		function printChkStatus(groupDivID){
			var chkGroupStatus = allGroupChecked(groupDivID);
			if(chkGroupStatus == 'all'){
				$("#"+groupDivID+"ChkStatus").html(msgIfAll);
			}else if(chkGroupStatus == 'none'){
				$("#"+groupDivID+"ChkStatus").html(msgIfNone)
			}else{
				$("#"+groupDivID+"ChkStatus").html(chkGroupStatus+' options selected')
			}
		}
		// Check Groups functions End 


		function showHideIcon(groupDivID){
			$("#btn"+groupDivID+"Show").css("padding","0px 0px 0px 15px");
			$("#btn"+groupDivID+"Show").css("text-decoration","none");
				if ($("#"+groupDivID).is(':hidden')) {
					//$("#btn"+groupDivID+"Show ul").css("list-style-image","url(Images/bt_more.gif)");
					$("#btn"+groupDivID+"Show").css("background","url(Images/bt_more.gif) no-repeat left center");
				}else{
					//$("#btn"+groupDivID+"Show ul").css("list-style-image","url(Images/bt_less.gif)");
					$("#btn"+groupDivID+"Show").css("background","url(Images/bt_less.gif) no-repeat left center");
				}
		}
	
		function expandableDiv(groupDivID){
			showHideIcon(groupDivID);
			$("#btn"+groupDivID+"Show").click(function(){$("#"+groupDivID).toggle();showHideIcon(groupDivID);});	
		}

//-->
