/*	Handles mouseover/mouseout 	
function button_mouseoverandout(id, img_url){
	getIt(id).src = img_url;
	//alert(id+" "+img_url);
}
*/


/* Clears/Fills Google Search input on Sign up form	*/
function googleSearchFocus(){
	what = getIt("googleSearchInput"); 
	what.style.backgroundImage ='url(http://www.kiplinger.com/images/backgrounds/gsearch_input_bg-blank.png)';
}


function googleSearchBlur(){
		what = getIt("googleSearchInput");
		if((what.value =='')||(what.value == ' ')){
			what.style.backgroundImage ='url(http://www.kiplinger.com/images/backgrounds/gsearch_input_bg.png)';
		}

}




if(window.addEventListener){ // for non-IE browsers
	window.addEventListener("resize", function(){YAHOO.kiplinger.menuInit();}, false);
	
	getIt('googleSearchInput').addEventListener("focus",function(){googleSearchFocus()},false);
	getIt('googleSearchInput').addEventListener("blur",function(){googleSearchBlur()},false);
	
	}else{ // for IE
	r=0; // number of times the window is resized

		
			// 	since menu can't be re-init'd on window resize event in IE
			// 	a page reload must be forced pon de yoozer dem
			//	and since IE misfires a window resize event for it's own weird reason 
			//	that initial event must be ignored or else IE gets stuck in a reload loop
			//	IE. Always a party.
		
	getIt('googleSearchInput').attachEvent("onfocus",function(){googleSearchFocus()});
	getIt('googleSearchInput').attachEvent("onblur",function(){googleSearchBlur()});	
				
}


		if(getIt("manage-your-links").addEventListener){
			getIt("manage-your-links").addEventListener("mouseover",function(){btn_mouseoverandout("manage-your-links","http://www.kiplinger.com/images/buttons/manage_sub_ON.jpg")},false);	
			getIt("manage-your-links").addEventListener("mouseout",function(){btn_mouseoverandout("manage-your-links","http://www.kiplinger.com/images/buttons/manage_sub.jpg")},false);	
			}else if(getIt('manage-your-links').attachEvent){
			getIt("manage-your-links").attachEvent("onmouseover",function(){btn_mouseoverandout("manage-your-links","http://www.kiplinger.com/images/buttons/manage_sub_ON.jpg")},false);	
			getIt("manage-your-links").attachEvent("onmouseout",function(){btn_mouseoverandout("manage-your-links","http://www.kiplinger.com/images/buttons/manage_sub.jpg")},false);	
			}