function moveWindoidToCenter() {
	var winWid = window.outerWidth;
	var winHi = window.outerHeight;
	var x = (screen.width - winWid) / 2;
	var y = (screen.height - winHi) / 2;
	window.moveTo(x,y);
}

function invoke_windoid_coupon(mySectionTableName, myCouponHeadCode, myCouponSortName, myCouponContract, myCouponAnchorCode) {
  var winl = (screen.width-675)/2;
  var wint = (screen.height-600)/2;  testwindow=window.open("index.php/main/show_view_windoid_coupon/".concat(mySectionTableName).concat("/").concat(myCouponHeadCode).concat("/").concat(myCouponSortName).concat("/").concat(myCouponContract).concat("/").concat(myCouponAnchorCode), "Coupon", "location=0,status=1,scrollbars=0,resizable=1,width=675,height=600");
  testwindow.moveTo(winl,wint);
  testwindow.focus();
} 

function invoke_windoid_yellow_page_ad(myWid, myHi, adName, adSize, directoryID, sectionTableName) {
  var winl = (screen.width-myWid)/2;
  var wint = (screen.height-myHi)/2;
  ypad_win=window.open("index.php/main/show_view_windoid_yellow_page_ad/".concat(adName).concat("/").concat(adSize).concat("/").concat(directoryID).concat("/").concat(sectionTableName), "YellowPageAd", "location=1,status=1,resizable=1,scrollbars=0,width=".concat(myWid).concat(",height=").concat(myHi));
  ypad_win.moveTo(winl,wint);
  ypad_win.focus();
}

function addBookmark(url, who) {
  window.external.AddFavorite(url,who);
}	

function jumpBox(list) {
  location.href = list.options[list.selectedIndex].value
}

function subCouponPortalForm ( )
{
  document.couponportalform.submit();
}

function show(id) {
   var anchorTags = document.getElementsByTagName("td");
   for (var i = 0; i < anchorTags.length ; i++) {
	   if (anchorTags[i].className == "hi") {
		anchorTags[i].className= "listing_row";
	   }
   }
   document.getElementById(id).className=  "hi"; 
}

function show_res(id) {
   var anchorTags = document.getElementsByTagName("td");
   for (var i = 0; i < anchorTags.length ; i++) {
	   if (anchorTags[i].className == "hi") {
		anchorTags[i].className= "res_listing_row";
	   }
   }
   document.getElementById(id).className=  "hi"; 
}

function show_yp(id) {
   var anchorTags = document.getElementsByTagName("td");
   for (var i = 0; i < anchorTags.length ; i++) {
	   if (anchorTags[i].className == "hi") {
		anchorTags[i].className= "list_yp_name";
	   }
   }
   document.getElementById(id).className=  "hi"; 
}

function show_gp(id) {
   var anchorTags = document.getElementsByTagName("tr");
   for (var i = 0; i < anchorTags.length ; i++) {
	   if (anchorTags[i].className == "hi") {
		anchorTags[i].className= "green_page_listing_row";
	   }
   }
   document.getElementById(id).className=  "hi"; 
}