/* ---- font size change  ---- */
/* --------------------------- */

var curFontSize = 11; 	// curFontSize needs to be the same as the font size for paragraphs, as set in the css (in pixels)
var fontModifier = 1; 	// how much to increase/decrease font size each time (in pixels)

function fontSize(act) {
        tmpStoryBody = document.getElementById("mainbody");
        if (act == 1) {
            curFontSize += fontModifier;
            curFontSize = Math.min(curFontSize, 41);
        }
        else if (act == 0) {
            curFontSize -= fontModifier;
            curFontSize = Math.max(curFontSize, 9);
        }
        tmpStoryBody.style.fontSize = curFontSize + "px";
		for (v = 0; v < tmpStoryBody.getElementsByTagName("p").length; v++) {
           tmpStoryBody.getElementsByTagName("p")[v].style.fontSize = curFontSize + "px";  }
}

/* ------------------------------ */
/* ---- // font size change  ---- */


function display_email_friend_popup(selected_url) {
	var url = 'http://extras.geelongadvertiser.com.au/email_friend/email_friend.php?selected_url=' + selected_url;
        window.open(url,'EmailFriend','width=600,height=500');
}       // end function display_email_friend_popup

function getlink(selObj, linkTarget) {
	theLink = selObj.options[selObj.selectedIndex].value;
	if (theLink == '/advertising/place.html') {
		popupform('http://' + document.domain + '/' + theLink);
	}
	else {
		if (linkTarget == 0) {
			currentsite('http://' + document.domain + '/' + theLink);
		}
		else if (linkTarget == 1) {
			externalsite(theLink);
		}
		else if (linkTarget == 2) {
			popupform('http://' + document.domain + '/' + theLink);
		}
	}
	selObj.selectedIndex=0;
}
function popupform(fileName) {
	window.open(fileName,'popupWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=510,height=550,left=150,top=50');
}
function currentsite(fileName) {
	window.open(fileName,'_self');
}
function externalsite(fileName) {
	window.open(fileName,'_blank');
}
function showsubmenu(layername) {
        document.getElementById('feedbacksub').className = 'submenu';
		document.getElementById('advertsub').className = 'submenu';
		document.getElementById('classifiedsub').className = 'submenu';
		document.getElementById('picturessub').className = 'submenu';
		document.getElementById('sectionssub').className = 'submenu';
		document.getElementById('newssub').className = 'submenu';

		layerchange = document.getElementById(layername);
        layerchange.className = 'submenuOn';
}



function poll_popup(poll, answer) {
                        window.open('http://extras.geelongadvertiser.com.au/polls/poll_popup.php?poll_id='+poll+'&answer='+answer, '_blank', 'height=270,width=470,location=no,menubar=no,status=no,toolbar=no');
                }
