function setCatField(){
	var company=document.getElementById('customfields-tf-3-tf');
	$.ajax({type:"POST",url:"http://bestbuyscoupons.com/ajaxForm.php",data:"cat="+company.value,success:function(msg){
		document.getElementById('tdcat').value=msg;}});}
			function changeme(id,action){
				if(action=="hide"){
					document.getElementById(id).style.display="none";}
				if(action=="show"){
					document.getElementById(id).style.display="block";}};
					
function handleChange(selectCtrl,hiddenField){
	hiddenField.value=selectCtrl.value;
		if(selectCtrl.value=="coupon-code"){
			changeme('code','show');}
		else {changeme('code','hide');}};
		
function setCat(selectCtrl,hiddenField){
	hiddenField.value=selectCtrl.value}
	
$(function(){
	$("#block-menu-secondary-links .content .menu li a").each(function(){
		$(this).click(function(){if(pageTracker!=undefined){pageTracker._trackEvent('Outbound','Click',$(this).attr("href"));}});});});
		
var BASE64_DATA=/^data:.*;base64/i;
var base64Path="http://couponkim.com/wp-content/themes/couponkim/base64.php";
		
function fixBase64(img){
	if(BASE64_DATA.test(img.src)){img.src=base64Path+"?"+img.src.slice(5);}};onload=function(){
		for(var i=0;i<document.images.length;i++){
			fixBase64(document.images[i]);}};
