function MOW_swapImgRestore() {
  var i,x,a=document.MOW_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MOW_findObj(n, d) {
  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=MOW_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MOW_swapImage() {
  var i,j=0,x,a=MOW_swapImage.arguments; document.MOW_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MOW_findObj(a[i]))!=null){document.MOW_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MOW_preloadImages() {
  var d=document; if(d.images){ if(!d.MOW_p) d.MOW_p=new Array();
    var i,j=d.MOW_p.length,a=MOW_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MOW_p[j]=new Image; d.MOW_p[j++].src=a[i];}}
}

function addBookmark(url,title) {
  if (window.sidebar) {
    window.sidebar.addPanel(title, url,'');
  }
  else if( window.external ) {
    window.external.AddFavorite( url, title);
  }
  else if(window.opera && window.print) {
    return true;
  }
}

function Show(obj)
{
                document.all(obj).style.display =''
}

function Hide(obj)
{
                document.all(obj).style.display="none"
}

function nr(e){return(e.which==3)?false:true}function cu(){return false}function cv(){vp=event.button;if(vp==2||vp==3)alert(unescape("This function is not available."))}io=document.all;ae=document.getElementById;if(io){if(ae){document.oncontextmenu=cu}else{document.onmousedown=cv}}if(ae&&!io){document.onmouseup=nr;document.oncontextmenu=cu}if(document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=nr}

function verify() {
    if(document.forms[0].word.value==""){
		msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter a username in the field !';
        Sexy.alert(msg);
        return false;
        }else{
        return true;
        }
}
  
function valid(f) {
!(/^[A-zÑñ0-9]*$/i).test(f.value)?f.value = f.value.replace(/[^A-zÑñ0-9]/ig,''):null;
}
/////////////////////////////////////// login ///////////////////////////////////////

function check_form_login() {
    validity = true; 
	if (!check_value(document.form_login.username.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter a username in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_login.password.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter a password in the field !'; Sexy.alert(msg); return validity;} return validity;
  }
  
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }  
//////////////////////////////////// singup //////////////////////////////////////////

  function check_form_signup() {
    validity = true;
	if (!check_value(document.form_signup.first_name.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your first name in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_signup.last_name.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your last name in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_signup.username.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your username in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_signup.password.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your password in the field !'; Sexy.alert(msg); return validity;}
	if (document.form_signup.password.value!==document.form_signup.repass.value) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please repeat your password in the field !'; Sexy.alert(msg); return validity;}
	if (!check_email(document.form_signup.email.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Require valid email !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_signup.country.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please select your  country in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_signup.check_code.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please insert checking code in the field !'; Sexy.alert(msg); return validity;}
	if (!document.form_signup.terms.checked==true) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>You must read and agree our terms !'; Sexy.alert(msg); return validity;} return validity;
  }
  
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
//////////////////////////////////// messages ////////////////////////////////////////////

function check_form() {
    validity = true;
	if (!check_value(document.form.user.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your model username in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form.title.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your title in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form.description.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your message in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form.check_code.value)) { validity = false;  msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please insert checking code in the field !'; Sexy.alert(nsg); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
///////////////////////////////////// my links login /////////////////////////////////

function check_form_my_links_login() {
    validity = true;
	if (!check_email(document.form_my_links_login.email.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your valid email in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links_login.password.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your password in the field !'; Sexy.alert(msg); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
////////////////////////////////// my links password ////////////////////////////////

function check_form_my_links_password() {
    validity = true;
	if (!check_email(document.form_my_links_password.email.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your valid email in the field !'; Sexy.alert(msg); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
//////////////////////////////// my links ///////////////////////////////////////////

function check_form_my_links() {
    validity = true;
	if (!check_email(document.form_my_links.email.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your valid email in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links.password.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your password in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links.title.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your title of your site in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links.category.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter a category in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links.my_link.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter URL with our link in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links.description.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your description in the field <br/>(max 200 character length) !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_my_links.check_code.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please insert checking code in the field !'; Sexy.alert(msg); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
///////////////////////////////////// Help /////////////////////////////////////////

function check_form_online_help() {
    validity = true;
	if (!check_value(document.form_online_help.username.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your username in the field !'; Sexy.alert(msg); return validity;}
	if (!check_email(document.form_online_help.email.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Require valid email !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_online_help.title.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your title in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_online_help.application.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter your application in the field !'; Sexy.alert(msg); return validity;}
	if (!check_value(document.form_online_help.check_code.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please insert checking code in the field !'; Sexy.alert(msg); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
/////////////////////////////// deblock ////////////////////////////////////////////

function check_form_deblock() {
    validity = true;
	if (!check_value(document.form_deblock.code.value)) { validity = false; msg ='<h1>Message from ' + daten + '</h1>' + '<br/>Please enter the code to deblock your accont !'; Sexy.alert(msg); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
////////////////////////////////////////////// share /////////////////////////////////////////////////
function check_form_share() {
    validity = true;
	if (!check_value(document.form_share.username.value)) { validity = false;  Sexy.alert('<h1>Message from ' + daten + '</h1><br/>Please enter your username !'); return validity;}
	if (!check_email(document.form_share.sender_email.value)) { validity = false;  Sexy.alert('<h1>Message from ' + daten + '</h1><br/>Please enter your email !'); return validity;}
	if (!check_email(document.form_share.recipient_email.value)) { validity = false; Sexy.alert('<h1>Message from ' + daten + '</h1><br/>Please enter your friend\'s email !'); return validity;}
	if (!check_value(document.form_share.v.value)) { validity = false; Sexy.alert('<h1>Message from ' + daten + '</h1><br/>Please enter vide link !'); return validity;}
	if (!check_value(document.form_share.description.value)) { validity = false; Sexy.alert('<h1>Message from ' + daten + '</h1><br/>Please enter your description !'); return validity;}
	if (!check_value(document.form_share.check_code.value)) { validity = false; Sexy.alert('<h1>Message from ' + daten + '</h1><br/>Insert checking code!'); return validity;} return validity;
  }
  function check_value(text) {
    if (text.length > 0) return true;
    else return false;
  }
  function check_email(text) {
    if ((text.length > 0) && (text.indexOf ('@') > -1) || (text.indexOf ('.') > -1)) {
      return true;
    }
    else {
      return false;
    }
  }
//////////////////////////////////////////////////////////////////////////////////////////////////////  
  var win_popup = null;

function openWindow( url, name, params, w, h )
{
      var ah = window.availHeight;
      var aw = window.availWidth;

      var l = (aw - w) / 2;
      var t = (ah - h) / 2;

      params += params == "" ? "" : ",";
      params += "left=0,top=0,height="+ah+",width="+aw;

      //close previous opened popup
      if (win_popup && win_popup.open && !win_popup.closed)
      {
         win_popup.close();
      }
      //---
      win_popup = window.open( "", name, params );
      win_popup.location.href = url;

}
///////////////////////////////////////////////////////////////////////////////////////////////////