// Copyright 2006 BizCom Group.  All rights reserved.  
// May not be reproduced or reused without express written permission
function stopError() {
  return true;
}

function hideemail(email_id, email_server, email_domain) {
	document.write('<a href="' + 'mailto:' + email_id + '@' + email_server + '.' + email_domain + '">');			
	document.write( email_id + '@' + email_server + '.' + email_domain + '</a>');
}
function hideemailsub(email_id, email_server, email_domain, email_sub) {
	document.write('<a href="' + 'mailto:' + email_id + '@' + email_server + '.' + email_domain + '?subject=' + email_sub +'">');			
	document.write( email_id + '@' + email_server + '.' + email_domain + '</a>');
}
// JavaScript Link
// Use JavaScript to display the Link
// myaddress is URL to go to
// mytext is text to display and text in the mouseover if "y" in myMouseOver
// mymouseover is optional and will be used to replace myText if not "y" in myMouseover
// myTarget is "y" for _blank or "n" for current window
// myFollow is "n" for "nofollow" or "y" for "follow".  blank, missing or null, rel parameter not included. 

function jsl(myaddress, mytext, mymouseover, mytarget, myfollow) {
    
	document.write('<a href="' + myaddress +  '"');
	if (((mymouseover) == false) || ((mymouseover) == null) || (mymouseover.toLowerCase() == "n")) {
	} else if (mymouseover.toLowerCase() == "y") {
	document.write(' onmouseover="window.status=\'' + mytext + '\';return true;" onmouseout="window.status=\' \';return true;"');
	} else {
	document.write(' onmouseover="window.status=\'' + mymouseover + '\';return true;" onmouseout="window.status=\' \';return true;"');
	}

	if (((mytarget) == false) || ((mytarget) == null) || (mytarget.toLowerCase() == "n")) {
	} else if (mytarget.toLowerCase() == "y")	 {
		document.write(' target="_blank" ');
	} else 
	{ document.write(' target="_' + mytarget + '" ');
	}
	if  (((myfollow) == false) || ((myfollow) == null)) {
	} else if (myfollow.toLowerCase() == "n") {
		document.write(' rel="nofollow"');
	} else if (myfollow.toLowerCase() == "y") {
		document.write(' rel="follow"');
	}
	document.write('">' + mytext + '</a>');
}

function jsx(imgaff, imgvalue, imgalt, imgaffid,  imgwidth, imgheight) {
    myimgaff = imgaff.toLowerCase();
    document.write('<img src="');
    
    if ((myimgaff ==  "cj") || (myimgaff == "cjx")) {
	    document.write('http://www.afcyhf.com/image-');
		if ((!imgaffid) || (imgaffid == "0") || (imgaffid == "") || (imgaffid == null)) {
			document.write('232638-');
		} else {
			document.write(imgaffid + '-');
		}
	} else if (myimgaff ==  "ls") {
	    document.write('http://ad.linksynergy.com/fs-bin/show?id=');
		if ((!imgaffid) || (imgaffid == "0") || (imgaffid == "") || (imgaffid == null)) {
		document.write('yl7AQ3uSHyA&bids=');
		} else {
		document.write(myaffid + '&bids=');
		}
    } else if (myimgaff ==  "p1") {
	    document.write('http://clickserve.cc-dt.com/link/banner?lid=');
	} else if (myimgaff ==  "p2") {
	    document.write('http://clickserve.cc-dt.com/link/tplimage?pubid=21000000000004201&lid=');
	} else if (myimgaff ==  "sas") {
	    document.write('http://www.shareasale.com');
	} else if (myimgaff ==  "bf") {
	    document.write('http://ads.bfast.com');
	} else if (myimgaff ==  "az") {
	    document.write('http://images.amazon.com');
	} else if (myimgaff ==  "ov2") {
	    document.write('http://images.overstock.com');	    
	} else if (myimgaff ==  "ov1") {
	    document.write('http://www.overstock.com');
	} else if (myimgaff ==  "art") {
	    document.write('http://images.art.com');
	} else if (myimgaff ==  "cg") {
	    document.write('http://www.is1.clixgalore.com/cgd.aspx?BID=');
	} else if (myimgaff ==  "so") {
	    document.write('http://www.edsci-affiliates.com/edsci/');
	}
    // append  image url
    if ((imgvalue == "") || (imgvalue == null)) {
    document.write('/d.gif" alt="' + imgalt + '" border="0"');
    } else {
	document.write(imgvalue + '" alt="' + imgalt + '" border="0"');	
	}
			
	if (!imgwidth) {
   	} else if (imgwidth != "" && imgwidth != "0" && imgwidth != null ) {
	    document.write(' width="' + imgwidth + '"');	
     }
	if (!imgheight) {
	} else if (imgheight != "" && imgheight != "0" && imgheight != null) {
	    document.write(' height="' + imgheight + '"');
	}

    //if ((imgvalue == "") || (imgvalue == null)) {
    //document.write('/d.gif');
    //} else {
	//document.write(imgvalue);	
	//}

    //if ((imgmaxsize == "") || (imgmaxsize == null)) {
    //document.write('" alt="' + imgalt + '" border="0"');
    //} else {
	//document.write('&m=' + imgmaxsize + '" alt="' + imgalt + '" border="0"');	
	//}

	// finish the tag
	document.write('>');
}


function jsi(imgaff, imgvalue, imgalt, imgaffid, imgmaxsize, imgwidth, imgheight, imgserver) {
    
    var imageurl;
    imageurl = "";
    myimgaff = imgaff.toLowerCase();
    document.write('<img src="');
    
    
    
    if ((myimgaff ==  "cj") || (myimgaff == "cjx")) {
	    imageurl = imageurl + 'http://www.afcyhf.com/image-';
		if ((!imgaffid) || (imgaffid == "0") || (imgaffid == "") || (imgaffid == null)) {
			imageurl = imageurl + '232638-';
		} else {
			imageurl = imageurl + imgaffid + '-';
		}
	} else if (myimgaff ==  "ls") {
	    imageurl = imageurl + 'http://ad.linksynergy.com/fs-bin/show?id=';
		if ((!imgaffid) || (imgaffid == "0") || (imgaffid == "") || (imgaffid == null)) {
		imageurl = imageurl + 'yl7AQ3uSHyA&bids=';
		} else {
		imageurl = imageurl + imgaffid + '&subid=0bids=';
		}
    } else if (myimgaff ==  "p1") {
	    imageurl = imageurl + 'http://clickserve.cc-dt.com/link/banner?lid=';
	} else if (myimgaff ==  "p2") {
	    imageurl = imageurl + 'http://clickserve.cc-dt.com/link/tplimage?pubid=21000000000004201&lid=';
	} else if (myimgaff ==  "sas") {
	    imageurl = imageurl + 'http://www.shareasale.com';
	} else if (myimgaff ==  "bf") {
	    imageurl = imageurl + 'http://ads.bfast.com';
	} else if (myimgaff ==  "az") {
	    imageurl = imageurl + 'http://images.amazon.com';
	} else if (myimgaff ==  "ov2") {
	    imageurl = imageurl + 'http://images.overstock.com';	    
	} else if (myimgaff ==  "ov1") {
	    imageurl = imageurl + 'http://www.overstock.com';
	} else if (myimgaff ==  "art") {
	    imageurl = imageurl + 'http://images.art.com';
	} else if (myimgaff ==  "cg") {
	    imageurl = imageurl + 'http://www.is1.clixgalore.com/cgd.aspx?BID=';
	} else if (myimgaff ==  "so") {
	    imageurl = imageurl + 'http://www.edsci-affiliates.com/edsci/';
	}
    // append  image url
    if ((imgvalue == "") || (imgvalue == null)) {
        imageurl = imageurl + '/d.gif'; //" alt="' + imgalt + '" border="0"');
    } else {
        imageurl = imageurl + imgvalue;

    	//imageurl = '/images.aspx?img=' + escape(imageurl);  //+ '" alt="' + imgalt + '" border="0"');	
	}
		
    if ((imgmaxsize == "") || (imgmaxsize == null) || (imgmaxsize == "0")) {
       imageurl = imageurl + '" alt="' + imgalt + '" border="0"';
 
       	if (!imgwidth) {
   	    } else if (imgwidth != "" && imgwidth != "0" && imgwidth != null ) {
	        imageurl = imageurl + ' width="' + imgwidth + '"';	
        }
	    if (!imgheight) {
	    } else if (imgheight != "" && imgheight != "0" && imgheight != null) {
	        imageurl = imageurl + ' height="' + imgheight + '"';
	    }
	    
    } else {
        // Image Server Default
    	if ((!imgserver) || (imgserver == "") || (imgserver == null)) {
		imgserver = 'http://img.feedizer.com/images.aspx';
		} 
        
        imageurl = imgserver + '?img=' + escape(imageurl);       
        imageurl = imageurl + '&m=' + imgmaxsize + '" alt="' + imgalt + '" border="0"';
    }
    		
			
	//if (!imgwidth) {
   	//} else if (imgwidth != "" && imgwidth != "0" && imgwidth != null ) {
	//    document.write(' width="' + imgwidth + '"');	
    // }
	//if (!imgheight) {
	//} else if (imgheight != "" && imgheight != "0" && imgheight != null) {
	//    document.write(' height="' + imgheight + '"');
	//}

    //if ((imgvalue == "") || (imgvalue == null)) {
    //document.write('/d.gif');
    //} else {
	//document.write(imgvalue);	
	//}

    //if ((imgmaxsize == "") || (imgmaxsize == null)) {
    //document.write('" alt="' + imgalt + '" border="0"');
    //} else {
	//document.write('&m=' + imgmaxsize + '" alt="' + imgalt + '" border="0"');	
	//}

	// finish the tag
	document.write(imageurl + '>');
}


function emailfriend(wfrpage,wfrname){
	var h, w, friendWin
	h = window.screen.availHeight 
	w = window.screen.availwidth
	// 
	 if (h >= 400)  {
		h = 400 ;
	 } 
	 if (w >= 720)  {
		w = 720 ;
	 }

	 if (!wfrpage) {
	 mywfrpage = ""
	 } else {
	 mywfrpage = escape(wfrpage) 
	 // replace any spaces with +
	 mywfrpage = mywfrpage.replace(" ","+");
	 // replace any + with %2B
	 mywfrpage = mywfrpage.replace("+","%2B");
	 mywfrpage = mywfrpage.replace("/","%2F");
	 }
	 
	 if (!wfrname) {
	 mywfrname = ""
	 } else {
	 mywfrname = escape(wfrname) 
	 // replace any spaces with +
	 mywfrname = mywfrname.replace(" ","+");
	 // replace any + with %2B
	 mywfrname = mywfrname.replace("+","%2B");
	 mywfrname = mywfrname.replace("/","%2F");
	 }

	// sFeatures = "height=400, width=750, left=10, top=10, height=" + h*.75 + ",width=" + w*.80 + ",resizable"
	sFeatures = "left=10, top=10, height=" + h*.90 + ",width=" + w*.90 + ",resizable,scrollbars"
	// friendWin = window.open("/tellafriend.aspx?wfrpage="+wfrpage,"",sFeatures)
	friendWin = window.open("/tellafriend.aspx?wfrpage="+mywfrpage+"&wfrname="+mywfrname,"",sFeatures)
}
function nwj(lrid, lrt, lnbr, wName, wWidth, wHeight, wTop, wLeft, wToolbar, wHistory) {
	var vPath, wUrl, popWin

	if ((lrt == null) || (lrt == '')) {
		lrt = "s" ;
	}
	if ((lnbr == null) || (lnbr == '')) {
		lnbr = "0" ;
	}	
	if ((wWidth == null) || (wWidth == '')) {
		wWidth = "800" ;
	}
	if ((wHeight == null) || (wHeight == ''))  {
		wHeight = "600" ;
	}
 	if ((wTop == null) || (wTop == ''))  {
		wTop = "10" ;
	}
	if ((wLeft == null) || (wLeft == ''))  {
		wLeft = "10" ;
	}
	if ((wToolbar == null) || (wToolbar == '')) {
		wToolbar = "yes" ;
	}
	if ((wHistory == null) || (wHistory == '')) {
		wHistory = "yes" ;
	}
	if ((wName == null) || (wName == '')) {
		wName = "JumpTo" ;
	}
	if ((wUrl == null) || (wUrl == '')) {
		wUrl = "/" + wName + ".aspx?wfrid=" + lrid + "&wfrt=" + lrt + "&wfrlnbr=" + lnbr ;
	}
	// setTimeout('', 250);
 	popWin = window.open(wUrl, wName,"scrollbars=yes,resizable=yes,location=no,toolbar=" + wToolbar + ",history=" + wHistory + ",width=" + wWidth + ",height=" + wHeight + ", top=" + wTop + ", left=" + wLeft);
	self.setTimeout(popWin.focus(),500);
	//
}

window.onerror = stopError;


