function openpopup1(popurl) {
	var winpops=window.open(popurl,"","width=600px,height=400px,scrollbars,resizable")
}

function openpopup2(popurl) {
	var winpops=window.open(popurl,"","width=640px,height=300px,scrollbars,resizable")
}

/**
 * this assumes the JSON variable topProfile is available
 * @param urid
 * @return
 */
function Tipping(urid)
{
	var phone_icon = false;
    
    var pinutol = topProfile[urid].name;
    if (pinutol.length > 15) {
    	var name_trunc = pinutol.substr(0,15) + "...";
    }
    else {
    	var name_trunc = pinutol;
    }	

    
    if( $("#phone_row").length>0 ) {
    	
    	if( topProfile[urid].gender == 1 && topProfile[urid].finance == 1 ) {
    		$("#phone_row").css('display','block');
    		phone_icon = true;
    	} else {
    		$("#phone_row").css('display','none');
    		phone_icon = false;
    	}
    	
    }
    
    var txt = $("#profileToolTiptemp").html();

    if( phone_icon == true ) {
    	txt = txt.replace("$$phone_icon$$", 'phone_icon');
    }
    
    txt = txt.replace("$$name$$", topProfile[urid].name);
    txt = txt.replace("$$ciid_desc$$", topProfile[urid].plz_all_desc);
    txt = txt.replace("$$civilstatus$$", topProfile[urid].civilstatus);
    txt = txt.replace("$$gendertext$$", topProfile[urid].gendertext);
    txt = txt.replace("$$age$$", topProfile[urid].age);
    txt = txt.replace("$$eyescolortext$$", topProfile[urid].eyescolortext);
    txt = txt.replace("$$city$$", topProfile[urid].city);
    txt = txt.replace("$$heighttext$$", topProfile[urid].heighttext);
    txt = txt.replace("$$haircolortext$$", topProfile[urid].haircolortext);
    txt = txt.replace("$$weighttext$$", topProfile[urid].weighttext);
    txt = txt.replace("$$figuretext$$", topProfile[urid].figuretext);
    txt = txt.replace("$$smokertext$$", topProfile[urid].smokertext);
    txt = txt.replace("$$gender_searchtext$$", topProfile[urid].gender_searchtext);
    txt = txt.replace("$$upsciid$$", topProfile[urid].ups_ciid_desc);
    txt = txt.replace("$$photo_small$$", topProfile[urid].photo_small);
    txt = txt.replace("$$country$$", topProfile[urid].country);
    txt = txt.replace("$$phone$$", topProfile[urid].phone);
   
    Tip(txt);
}