function TogglePcode() { 
 var divEl1 = document.getElementById('npcode');
 var divEl2 = document.getElementById('ncity');
 divEl1.style.display=(divEl1.style.display=="block")?"none":"block";
 divEl2.style.display=(divEl2.style.display=="block")?"none":"block";
}

function  citySearch(city) { 
  var cat=document.citysearch.city_cat.value;
  if (cat=='E') {
    location.href="../events/nri_events.php?cat=events&country=USA&city="+city;
  } else if (cat=='C') {
    location.href="../classifieds/nri_classifides.php?cat=classifieds&searchtyp=adv&country=USA&city="+city;
  }
  else if (cat=='R' || cat=='T' || cat=='G') {
    location.href="../ypages/nri_ypages.php?cat=ypages&ycat="+cat+"&country=USA&city="+city;
 }
}


function bookmarkelivedelas() { 
  var urlAddress = "http://www.elivedeals.com";
  var pageName = "eLiveDeals - Online hot deals"; 
  if (window.external) { 
    window.external.AddFavorite(urlAddress,pageName) 
  } else { alert("Sorry! Your browser doesn't support this function."); 
  } 
}

function openTellADeal(dealUrl) {
  window.open(dealUrl,'','scrollbars=no,menubar=no,height=400,width=600,resizable=yes,toolbar=no,location=no,status=no');
}

function openCompWebSite(compDealUrl) {
 window.open(compDealUrl,'','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');
}

function  createCatLink(val) {
  var link1="";
  link1='<IFRAME SRC="http://www.elivedeals.com/devtools/ed_dev_deals_list.php?cat=alldeals&task=list&cat_id='+val+'" WIDTH=800 HEIGHT=600></IFRAME>';
  catlinks.value=link1;
}
	
function showhide(targetID) {
		//change target element mode
		var elementmode = document.getElementById(targetID).style;
		elementmode.display = (!elementmode.display) ? 'none' : '';
}

