function addOption(objSelect,strText,strValue) {
if (objSelect.length == 0)
{
var defaultSelected = true;
var selected = true;
}
else
{
var defaultSelected = false;
var selected = false;
}
var optionName = new Option(strText, strValue, defaultSelected, selected)
var length = objSelect.length;
objSelect.options[length] = optionName;
}
function OP(strPhotoPath, uid){
window.open('photo.aspx?pp='+strPhotoPath+'&uid='+uid, null, 'height=620,width=500,status=no,toolbar=no,menubar=no,location=no,titlebar=no');
}
/*function OPEDIT(pid){
window.open('editphoto.aspx?pid='+pid, null, 'height=600,width=600,status=no,toolbar=no,menubar=no,location=no,titlebar=no');
}*/
function OPEDIT(){
window.open('editphoto.aspx', null, 'height=600,width=600,status=no,toolbar=no,menubar=no,location=no,titlebar=no');
}
function OMR(){
window.open('mailrules.aspx', null, 'height=600,width=510,status=no,toolbar=no,menubar=no,location=no,titlebar=no');
}
function OAGB(){
window.open('agb.aspx', null, 'height=600,width=510,status=no,toolbar=no,menubar=no,location=no,titlebar=no,scrollbars=yes');
}
function CheckMaxLength(objTextArea, intMaxLength)
{
var g_MaxLen = intMaxLength;
if(objTextArea)
{
var len = objTextArea.value.length;
if(len>g_MaxLen)
{
objTextArea.value = objTextArea.value.substr(0, g_MaxLen);
return false;
}
else
{
return true;
}
}
}
function chat(intMeId, intUser)
{
OpenChatWindow(intMeId, intUser);
}
var g_strTarget;
function ocex(strWindow, intUser, strMode, strPage)
{
var wnd = window;
if(strWindow=="p")
{
wnd = window.parent;
}
if(strWindow=="o")
{
wnd = window.opener;
}
if(strWindow=="op")
{
wnd = window.opener.parent;
}
if(strMode==null || strMode.length==0)
strMode = "0";
if(wnd!=null)
{
if (strPage==null||strPage==""||strPage=="dating")
{
var url = "dating.aspx?"
+ "dtmode=1&"
+ "vpvrmode=" + strMode + "&"
+ "vpvruid=" + intUser + "";
}
else if (strPage=="travelsearch")
{
var url = "travelsearch.aspx?"
+ "tsmode=2&"
+ "vpvrmode=" + strMode + "&"
+ "vpvruid=" + intUser + "";
}
if (g_strTarget != null && g_strTarget.length > 0){
wnd.open(url, g_strTarget);
}
else{
wnd.location.href = url;
}
}
}
function ocex_url(strWindow, intUser, strMode, strPage)
{
var wnd = window;
if(strWindow=="p")
{
wnd = window.parent;
}
if(strWindow=="o")
{
wnd = window.opener;
}
if(strWindow=="op")
{
wnd = window.opener.parent;
}
if(strMode==null || strMode.length==0)
strMode = "0";
var url = "#";
if(wnd!=null)
{
if (strPage==null||strPage==""||strPage=="dating")
{
url = "travelsearch.aspx?"
+ "dtmode=1&"
+ "vpvrmode=" + strMode + "&"
+ "vpvruid=" + intUser + "";
}
else if (strPage=="travelsearch")
{
url = "travelsearch.aspx?"
+ "tsmode=2&"
+ "vpvrmode=" + strMode + "&"
+ "vpvruid=" + intUser + "";
}
}
return url;
}
function oc(strWindow, intUser, strMode)
{
ocex(strWindow, intUser, strMode, "");
}
function oct(strWindow, intUser, strMode, strTarget)
{
g_strTarget = strTarget;
ocex(strWindow, intUser, strMode, "");
}
function otp(strWindow, intUser, intTravelPlan)
{
var wnd = window;
if(strWindow=="p")
{
wnd = window.parent;
}
if(strWindow=="o")
{
wnd = window.opener;
}
if(strWindow=="op")
{
wnd = window.opener.parent;
}
if(wnd!=null)
{
var url = "travelsearch.aspx?"
+ "tsmode=2&"
+ "vpvrmode=1&"
+ "vpvruid=" + intUser + "&"
+ "tpvmode=1&"
+ "tpvtpu=" + intUser + "&"
+ "tpvtpl=" + intTravelPlan;
//wnd.location.href = url;
wnd.open(url, "_blank");
}
}
var intCurrentUserId = 0;
var hChatWnd = null;
function OpenChatWindow(intMeId, intUserId)
{
try
{
if (window.opener != null && window.opener.hChatWnd != null)
{
hChatWnd = window.opener.hChatWnd;
}
if (window.parent != null && window.parent.hChatWnd != null)
{
hChatWnd = window.parent.hChatWnd;
}
if (hChatWnd == null)
{
hChatWnd = window.open("/Chat.aspx","chat_" + intMeId,"height=690,width=550,status=no,toolbar=no,menubar=no,location=no,titlebar=no");
}
if (hChatWnd != null)
{
hChatWnd.focus();
}
}
catch(e)
{//if an error has occured - just open once again chat-window
hChatWnd = window.open("/Chat.aspx","chat_" + intMeId,"height=690,width=550,status=no,toolbar=no,menubar=no,location=no,titlebar=no");
if ((hChatWnd != null) && (typeof(hChatWnd) != 'undefined'))
{
hChatWnd.focus();
}
}
if (hChatWnd.document == null)
{//window-handle fix for Mozilla
hChatWnd = window.open("/Chat.aspx","chat_" + intMeId,"height=690,width=550,status=no,toolbar=no,menubar=no,location=no,titlebar=no");
if ((hChatWnd != null) && (typeof(hChatWnd) != 'undefined'))
{
hChatWnd.focus();
}
}
//remove chat invitation if chat link has been clicked
/*var wndMain = null;
if (window.opener == undefined)
wndMain = this;
else
wndMain = window.opener;*/
var wndMain = window;
try
{
/*var lChInv = wndMain.document.getElementById("lChatInvitationValue");
lChInv.innerHTML = '';*/
var tdChatLink = wndMain.document.getElementById("tdChatLink");
if (tdChatLink != null)
for (var i = 0; i < tdChatLink.childNodes.length; i ++)
{
if ((tdChatLink.childNodes[i] != null) && (typeof(tdChatLink.childNodes[i].id) != 'undefined'))
{
//hide blinking image
if (tdChatLink.childNodes[i].id.indexOf('imgChatInvite') > 0)
tdChatLink.childNodes[i].src = '/i/x.gif'
if (tdChatLink.childNodes[i].id == 'lChatInvitationValueTitle')
{
tdChatLink.childNodes[i].style.visibility = 'hidden';
tdChatLink.childNodes[i].style.display = 'none';
}
//hide invitation text
if (tdChatLink.childNodes[i].id == 'lChatInvitationValue')
tdChatLink.childNodes[i].innerHTML = "";
}
}
}
catch(e)
{
//do nothing if error has occured
}
try
{
//submit that chat was clicked
var frm = document.getElementById("frmChatHdn");
/*frm.document.forms[0].elements["Mode"].value = "checkinvite";
if (intMeId != intUserId)
{
frm.document.forms[0].elements["Rcpnt"].value = intUserId;
}
frm.document.forms[0].submit();*/
var url = "/Chat_hidden.aspx?Mode=checkinvite";
if (intMeId != intUserId)
{
url += "&Rcpnt=" + intUserId;
}
frm.src = url;
}
catch(e)
{//do nothing if error has occured
}
}
//BLINKING TEXT
window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer == 4);
var IE4 = (bName == "Microsoft Internet Explorer"
&& bVer >= 4);
var NS3 = (bName == "Netscape" && bVer == 3);
var IE3 = (bName == "Microsoft Internet Explorer"
&& bVer < 4);
var blink_speed=300;
var i=0;
if (NS4 || IE4) {
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
}else{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}
}
//BLINKING
function Blink(layerName){
if (NS4 || IE4) {
if(i%2==0)
{
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="visible"');
}
else
{
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="hidden"');
}
}
if(i<1)
{
i++;
}
else
{
i--
}
setTimeout("Blink('"+layerName+"')",blink_speed);
}
//~BLINKING TEXT
function GetFileExt(strFileName)
{
var intPos = strFileName.lastIndexOf(".");
return strFileName.substring(intPos+1, strFileName.length).toUpperCase();
}
var arrSelDisabled = new Array();
function AgbOk(elem)
{
var agbok = document.getElementById('agbok');
if (elem.checked)
{
var agbblock = document.getElementById('agbblock');
agbblock.style.border = "none";
agbok.disabled = false;
}
else
{
agbok.disabled = true;
}
}
function DisplayNewAgb()
{
var hnewagb = document.getElementById('hnewagb');
if (hnewagb.value == "1")
{
return;
}
var body = document.getElementsByTagName('body')[0];
body.style.overflow = 'hidden';
var div = document.createElement("div");
div.id = 'transbox';
body.appendChild(div);
var transbox = document.getElementById('transbox');
transbox.style.height = window.screen.height;
transbox.style.width = document.body.clientWidth;
var dialogAgb = document.createElement("div");
dialogAgb.id = 'dialogAgb';
dialogAgb.className = "nlaconfirm";
body.appendChild(dialogAgb);
var strHtml = '
';
strHtml += 'The terms & conditions for travelinlove.com have changed. Do not worry, membership is still free! Please read and accept the changed terms & conditions
';
strHtml += '';
strHtml += ' ';
dialogAgb.innerHTML = strHtml;
dialogAgb.style.display = 'block';
dialogAgb.style.left = (document.body.clientWidth / 2) - (396 / 2);
dialogAgb.style.top = (document.body.clientHeight / 2) - (180 / 2);
dialogAgb.style.zIndex = 12;
var dialogAgbFrm = document.createElement("iframe");
dialogAgbFrm.id = 'dialogAgbFrm';
body.appendChild(dialogAgbFrm);
dialogAgbFrm.className = "nlaconfirmfrm";
dialogAgbFrm.style.display = 'block';
dialogAgbFrm.style.left = dialogAgb.style.left;
dialogAgbFrm.style.top = dialogAgb.style.top;
var arrSelect = document.getElementsByTagName("select");
for (var i = 0; i < arrSelect.length; i ++)
{
if (arrSelect[i].style.disabled)
{
arrSelDisabled[arrSelDisabled.length] = arrSelect[i].id;
}
else
{
arrSelect[i].disabled = true;
}
}
}
function CloseAgbDialog()
{
var agb = document.getElementById('agb');
if (!agb.checked)
{
var agbblock = document.getElementById('agbblock');
agbblock.style.border = "1px solid Red";
return false;
}
var transbox = document.getElementById('transbox');
transbox.style.display = 'none';
var dialogAgb = document.getElementById('dialogAgb');
dialogAgb.style.display = 'none';
var dialogAgbFrm = document.getElementById('dialogAgbFrm');
dialogAgbFrm.style.display = 'none';
var body = document.getElementsByTagName('body')[0];
body.style.overflow = 'auto';
var arrSelect = document.getElementsByTagName("select");
for (var i = 0; i < arrSelect.length; i ++)
{
arrSelect[i].disabled = false;
}
for (var i = 0; i < arrSelDisabled.length; i ++)
{
arrSelDisabled[i].disabled = true;
}
var hnewagb = document.getElementById('hnewagb');
hnewagb.value = "1";
var frmOk = document.createElement('iframe');
frmOk.style.display = 'none';
body.appendChild(frmOk);
frmOk.src = '/profile.aspx?prpgmode=16';
}
function getOffsetTop(elem)
{
var nOffsetTop = elem.offsetTop;
var offsetParent = elem.offsetParent;
while ((offsetParent != null) && (typeof(offsetParent) != 'undefined'))
{
nOffsetTop += offsetParent.offsetTop;
offsetParent = offsetParent.offsetParent;
}
return nOffsetTop;
}
function valignElems(elem1Id, elem2Id)
{
var elem1 = document.getElementById(elem1Id);
var elem2 = document.getElementById(elem2Id);
var elem1offsetTop = getOffsetTop(elem1);
var elem2offsetTop = getOffsetTop(elem2);
if (elem1offsetTop != elem2offsetTop)
{
elem1.style.position = 'relative';
elem1.style.top = (elem2offsetTop - elem1offsetTop) + "px";
}
}
function bookmarkPage()
{
var title = document.title;
var url = location.href;
if (window.sidebar)
{// firefox
window.sidebar.addPanel(title, url, "");
}
else if (window.opera && window.print)
{ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if (document.all)
{// ie
window.external.AddFavorite(url, title);
}
}
var img_hl_out1_1 = new Image(4, 35);
var img_hl_out1_2 = new Image(142, 4);
var img_hl_out1_3 = new Image(4, 35);
var img_hl_out2_1 = new Image(4, 35);
var img_hl_out2_2 = new Image(142, 4);
var img_hl_out2_3 = new Image(4, 35);
var img_hl_out3_1 = new Image(4, 35);
var img_hl_out3_2 = new Image(142, 4);
var img_hl_out3_3 = new Image(4, 35);
var img_hl_out4_1 = new Image(4, 35);
var img_hl_out4_2 = new Image(142, 4);
var img_hl_out4_3 = new Image(4, 35);
var clone = new Image(10, 4);
function body_onload(e)
{
img_hl_out1_1.src = "/i/tb_border_hover1_1.gif";
img_hl_out1_2.src = "/i/tb_border_hover1_2.gif";
img_hl_out1_3.src = "/i/tb_border_hover1_3.gif";
img_hl_out2_1.src = "/i/tb_border_hover2_1.gif";
img_hl_out2_2.src = "/i/tb_border_hover2_2.gif";
img_hl_out2_3.src = "/i/tb_border_hover2_3.gif";
img_hl_out3_1.src = "/i/tb_border_hover3_1.gif";
img_hl_out3_2.src = "/i/tb_border_hover3_2.gif";
img_hl_out3_3.src = "/i/tb_border_hover3_3.gif";
img_hl_out4_1.src = "/i/tb_border_hover4_1.gif";
img_hl_out4_2.src = "/i/tb_border_hover4_2.gif";
img_hl_out4_3.src = "/i/tb_border_hover4_3.gif";
PrepareTabHoverImages(img_hl_out1_1, img_hl_out1_2, img_hl_out1_3);
PrepareTabHoverImages(img_hl_out2_1, img_hl_out2_2, img_hl_out2_3);
PrepareTabHoverImages(img_hl_out3_1, img_hl_out3_2, img_hl_out3_3);
PrepareTabHoverImages(img_hl_out4_1, img_hl_out4_2, img_hl_out4_3);
}
function PrepareTabHoverImages(img_hl_out1, img_hl_out2, img_hl_out3)
{
img_hl_out1.style.position = 'absolute';
img_hl_out2.style.position = 'absolute';
img_hl_out3.style.position = 'absolute';
img_hl_out1.style.display = 'none';
img_hl_out2.style.display = 'none';
img_hl_out3.style.display = 'none';
document.body.appendChild(img_hl_out1);
document.body.appendChild(img_hl_out2);
document.body.appendChild(img_hl_out3);
/*clone.style.display = 'none';
clone.src = "/i/tb_border_hover3_2.gif";
clone.style.position = 'absolute';
document.body.appendChild(clone);*/
}
function SetTabHoverImages(elem, img_hl_out1, img_hl_out2, img_hl_out3)
{
var ofWidth = elem.offsetWidth;
if (elem.className.indexOf('long') <= 0)
{
img_hl_out3.style.display = '';
/*if (img_hl_out2.src.indexOf('3_2') != -1)
{
img_hl_out2.width = '26';
}
else
{*/
img_hl_out2.width = ofWidth;
//}
}
else
{
img_hl_out3.style.display = 'none';
img_hl_out2.width = ofWidth;
}
img_hl_out1.style.display = '';
img_hl_out2.style.display = '';
var sTop = getAbsPos(elem, "Top") - 4 + 'px';
var nLeft = getAbsPos(elem, "Left");
img_hl_out1.style.top = sTop;
img_hl_out1.style.left = nLeft - 4 + 'px';
img_hl_out2.style.top = sTop;
img_hl_out2.style.left = nLeft + 'px';
img_hl_out3.style.top = sTop;
img_hl_out3.style.left = nLeft + ofWidth + 'px';
/*if (img_hl_out2.src.indexOf('3_2') != -1)
{
clone.style.display = '';
clone.style.top = sTop;
clone.style.left = (nLeft + 52) + 'px';
clone.width = '80';
}*/
}
function SetTabOutImages(img_hl_out1, img_hl_out2, img_hl_out3)
{
img_hl_out1.style.display = 'none';
img_hl_out2.style.display = 'none';
img_hl_out3.style.display = 'none';
clone.style.display = 'none';
}
var m_bln_track = true;
function tabhover(elem)
{
if (m_bln_track)
{
var bg_image = 'url(/i/' + elem.id + '_sel.jpg)';
elem.style.backgroundImage = bg_image;
switch (elem.id)
{
case "tb_bg_travelsearch":
SetTabHoverImages(elem, img_hl_out1_1, img_hl_out1_2, img_hl_out1_3);
break;
case "tb_bg_dating":
SetTabHoverImages(elem, img_hl_out2_1, img_hl_out2_2, img_hl_out2_3);
break;
case "tb_bg_reisewelt":
SetTabHoverImages(elem, img_hl_out3_1, img_hl_out3_2, img_hl_out3_3);
break;
case "tb_bg_profile":
SetTabHoverImages(elem, img_hl_out4_1, img_hl_out4_2, img_hl_out4_3);
break;
}
m_bln_track = false;
}
}
function tabout(elem)
{
var bg_image = 'url(/i/' + elem.id + '.jpg)';
elem.style.backgroundImage = bg_image;
switch (elem.id)
{
case "tb_bg_travelsearch":
SetTabOutImages(img_hl_out1_1, img_hl_out1_2, img_hl_out1_3);
break;
case "tb_bg_dating":
SetTabOutImages(img_hl_out2_1, img_hl_out2_2, img_hl_out2_3);
break;
case "tb_bg_reisewelt":
SetTabOutImages(img_hl_out3_1, img_hl_out3_2, img_hl_out3_3);
break;
case "tb_bg_profile":
SetTabOutImages(img_hl_out4_1, img_hl_out4_2, img_hl_out4_3);
break;
}
m_bln_track = true;
}
function getAbsPos(o, p)
{
var i = 0;
while (o != null)
{
i += o["offset"+p];
o = o.offsetParent;
}
return i;
}
var img_collapse_b = new Image(20, 21); img_collapse_b.src = "/Agency/1/i/collapse_lb.gif";
var img_collapse_lb = new Image(20, 21); img_collapse_lb.src = "/Agency/1/i/collapse_lb.gif";
var img_expand_b = new Image(20, 21); img_expand_b.src = "/Agency/1/i/expand_b.gif";
var img_expand_lb = new Image(20, 21); img_expand_lb.src = "/Agency/1/i/expand_lb.gif";
function hideshowblock(elem)
{
var img_src;
var li_style;
if (elem.src.indexOf('collapse') >= 0)
{//do collapse
elem.src = img_expand_lb.src;
li_style = 'none';
}
else
{//do expand
elem.src = img_collapse_lb.src;
li_style = '';
}
var cur_elem = elem;
while (cur_elem.tagName != 'UL')
{
cur_elem = cur_elem.parentNode;
}
for (var i = 0; i < cur_elem.childNodes.length; i ++)
{
var li = cur_elem.childNodes[i];
if ((li.tagName == 'LI') && (li.className != 'header'))
{
li.style.display = li_style;
}
}
}
function ShowBookmarks()
{
$("#ifrmBookmarks").show();
$("#divBookmarks").show();
}
function CloseBoomarks()
{
$("#ifrmBookmarks").hide();
$("#divBookmarks").hide();
}
function IframeTransparentBG(elem_id)
{
var elem = document.getElementById(elem_id);
var ifrm = document.getElementById('frmRooms');
if (elem == null) return;
if (ifrm == null)
{
var ifrm = document.createElement("IFRAME");
ifrm.id = 'frmRooms';
document.body.appendChild(ifrm);
$('#frmRooms').attr('frameborder', '0');
$('#frmRooms').attr('src', '/i/x.gif');
ifrm.style.zIndex = '9999';
ifrm.style.position = 'absolute';
ifrm.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
}
ifrm.style.display = 'none';
ifrm.style.left = elem.style.left;
ifrm.style.top = elem.style.top;
ifrm.style.width = elem.style.width;
ifrm.style.height = elem.style.height;
$('#frmRooms').hide();
$('#'+elem_id).hide();
$('#frmRooms').show();
$('#'+elem_id).show();
}