//Update Ninemsn info in Blog control guidelines content
function setBlogGuidelineContent() {

        if ( document.getElementById("ugc_guidlines_content") != undefined ) {
        var el=document.getElementById("ugc_guidlines_content");

el.innerHTML="<DIV class=text><STRONG>Thank you for sharing your opinions with other users of MSN NZ. People will find your comments more helpful if you include relevant information and avoid some common pitfalls.</STRONG></DIV><DIV class=text>Please note: All reviews and comments submitted are subject to moderation, MSN NZ reserves the right to alter and / or remove any content that does not comply with usage guidelines.</div><DIV class=text><B>What to include in your comment:</B><ul><LI>A title that briefly summarises the opinion expressed in the comment.</LI><LI>Additional comments adding more detail.</LI><LI>Comparisons to other similar products, if this is relevant.</LI><LI>To create a new paragraph, press the Enter key twice.</LI></ul></div><DIV class=text><B>What not to include:</B><ul><LI>Information that will quickly go out of date.</LI><LI>Comments on other comments or commenters.</LI><LI>Language that other users may find offensive.</LI><LI>comments of one sentence or less. Provide information to support your opinion.</LI><LI>Personal information like your email address or telephone number.</LI><LI>HTML coding. Tags like &lt;b&gt; or &lt;i&gt; will not be recognised.</LI></ul></div>";
      }   

}


function getParamValue(param, query, delimiter) {
    query = query ? query : window.location.href;
    delimiter = delimiter ? delimiter : "&";

    var value;
    var startPos = query.indexOf(param + '=');
    if(startPos > -1) {
        startPos += param.length+1;
        var endPos = query.indexOf(delimiter,startPos+1);

        if(endPos < 0) 
            endPos = query.length;
        value = query.substring(startPos,endPos);
    }
    return value;
}

function submitLiveSearch(id) {
    id = id ? id : 'live_query';
    var query = document.getElementById(id).value;
  
    window.location.href = "/results.aspx?query="+ query;
}

function submitLiveSearch2(id) {
    id = id ? id : 'live_query2';
    var query = document.getElementById(id).value;
  
    window.location.href = "/results.aspx?query="+ query;
}


function rendersearchhint(inputhint) {

	//
	// search box script
	//
	var hd_input = document.getElementById(inputhint);
	var hd_search_hint = "Search Money";
	if(hd_input)
	{
	    hd_input.onfocus = function()
		{
			if(hd_input.value == hd_search_hint)
			{
				hd_input.value = "";
			}
		}
		
		hd_input.onblur = function()
		{
			if(hd_input.value == "")
			{
				hd_input.value = hd_search_hint;
			}
		}
	}

}


function rendersearchstock(inputID) {

	//
	// stock quote search box script
	//
	var sq_input = document.getElementById(inputID);
	var sq_search_hint = "Enter code or name";
	if(sq_input)
	{
	    sq_input.onfocus = function()
		{
			if(sq_input.value == sq_search_hint)
			{
				sq_input.value = "";
			}
		}
		
		sq_input.onblur = function()
		{
			if(sq_input.value == "")
			{
				sq_input.value = sq_search_hint;
			}
		}
	}

}



function submit_quickcodesearch()
{
	var strInput;
	var strMarket;
	strInput = document.getElementById("QQSC").value;
	strMarket = document.getElementById("QQE").value;
         var newWindow = window.open('/stock-quote/?QQE='+ strMarket + '&QQSC=' + strInput, '_blank'); 
                newWindow.focus(); 
                return false; 

}  

















