
function MM_openSugMailWindow(theURL) { //v2.0


  var features = "width=400,height=350,screenx=0,screeny=0,top=0,left=0";
  var winName = "popmail";
  window.open(theURL,winName,features);

}



//  THIS FUNCTION OPENS AND CLOSES BEST BETS
function toggleBB(srcElement, srcArrow, nav) {
	if (srcElement.style.display == "none") {
		srcElement.style.display = "";
		//srcArrow.src = "/HomeddWeb/images/front/home/ml0"+nav+"_l.gif";
	} else {
		srcElement.style.display = "none"
		//srcArrow.src = "/HomeddWeb/images/front/home/ml0"+nav+"_d.gif";
	}
	
	//toggleColor(srcElement.id);
}



// THIS FUNCTION CHANGES THE COLOR AND ADDS TEST DECORATION TO BEST BETS
function toggleColor(elem) {
//	e = eval("inner" + elem);
//	e = eval(elem);
//	p = eval(elem);
	if (e.style.color != '#000000')
	{
		e.style.color='#000000';
		e.style.textDecoration='none';
		p.style.color='#000000';
		p.style.textDecoration='none';
	}
	else
	{
		e.style.color='#003399';
		e.style.textDecoration='none';
		p.style.color='#003399';
		p.style.textDecoration='none';

	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function WinPop(FileName, PicName,Message,wWidth,hHeight,Popname) 
{
	if (navigator.userAgent.substring(0,9) == "Mozilla/4") {
		res_w = screen.width;
		res_h = screen.height;
		}else 	// For netscape 3.0
	{
	res_w = 800;	// enter Screen resolution width
	res_h = 600;		// enter Screen resolution height
	}
		win_width			= wWidth;
		win_height		= hHeight;
		resideBar		= 'no';
		scrollb			= 'yes';

	screen_x = (res_w - win_width)  /  2;
	screen_y = (res_h - win_height) /  2;
	Message = escape(Message);
//	alert(PicName)
//	alert(Message)
newWin = window.open('' + FileName + '?Pic=' + PicName + '&Msg=' + Message + '','' + Popname + '', 'width=' + win_width + ',height=' + win_height + ',screenx=' + screen_x + ',screeny=' + screen_y + ',left=' + screen_x + ',top=' + screen_y + ',scrollbars=' + scrollb + ',resizable=' + resideBar + '')	
//alert('htmlPopup.htm?Pic=' + PicName + '&Msg=' + Message + '','pop', 'width=' + win_width + ',height=' + win_height + ',screenx=' + screen_x + ',screeny=' + screen_y + ',left=' + screen_x + ',top=' + screen_y + ',scrollbars=' + scrollb + ',resizable=' + resideBar + '')
newWin.focus();
}

function GoToPage(frm,sztmp,sztmp2){
	frm.go_url.value = sztmp;
	frm.action = sztmp2;
	frm.submit();
}

function GoToPage2(frm, sztmp, sztmp2, strFType){
	frm.go_url.value = sztmp;
	frm.hFType.value = strFType;
	frm.action = sztmp2;
	frm.submit();
}

function showCalculator_new(arg) {
var win;
 if (win == null || win.closed){
win = window.open(arg, "cal_finance", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=720,height=500,top=0,left=0")
		}else{
				if (navigator.appName.substring(0.8) == "Netscape"){
						win.location.href = arg;
						this.win.focus();
				}else{
						win = window.open(arg, "win_cal", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=720,height=500,top=0,left=0")
				}
		}
}

function MM_openMailToWindow(theURL) { //v2.0
  var features = "width=400,height=382,screenx=0,screeny=0,top=0,left=0";
  var winName = "popmail";
  window.open(theURL,winName,features);
}

function MM_openMailToWindow400(theURL) { //v2.0
  var features = "width=400,height=340,screenx=0,screeny=0,top=0,left=0";
  var winName = "popmail";
  window.open(theURL,winName,features);
}

function pop_AddStore() { 
  var onURL = "/HomeddWeb/homedd/A_garden/frontweb/addStore_pop.jsp";
  var features = "width=581,height=520,screenx=0,screeny=0,top=0,left=0,scrollbars=yes";
  var winName = "Register_Your_Shop";
  window.open(onURL,winName,features);
}


function pop_AddStore_decor() { 
  var onURL = "/HomeddWeb/homedd/A_home_decor/frontweb/pop_FwStoreAdd.jsp";
  var features = "width=581,height=520,screenx=0,screeny=0,top=0,left=0,scrollbars=yes";
  var winName = "Register_Your_Shop";
  window.open(onURL,winName,features);
}
//---remark  by  pradome  tpncs
function addCompany(frm) {
	frm.hidAllID.value = "";
    window.open("/HomeddWeb/servlet/homedd.A_home_services.frontweb.temp_FwAddCompanyServices","Test","width=650,height=700,scrollbars=yes,resize=yes");
	//window.open();
	//frm.action ="/HomeddWeb/servlet/homedd.A_home_services.frontweb.FwAddCompanyServices" ;
	//frm.submit();
}

//----------------

function pop_AddStore_Service() { 
  var onURL = "/HomeddWeb/homedd/A_home_services/frontweb/pop_FwStoreAdd_original.jsp";
  var features = "width=581,height=468,screenx=0,screeny=0,top=0,left=0,scrollbars=yes";
  var winName = "Register_Your_Shop";
  window.open(onURL,winName,features);
}