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_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_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 popup(url) 
{
 popupWin = window.open(url,'Gallery','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=700,height=530');
}

function popop(aff,vn) 
{
 var vix = Math.ceil((screen.availWidth-500)/2);
 var hix = Math.ceil((screen.availHeight-500)/2);
 popupWin = window.open('http://www.ujenatalent.com/taf/bl.php?g='+aff+'&yg='+vn,'TellAFriend','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes,left='+vix+',top='+hix+',width=500,height=500');
}

function poptour() 
{
 popupWin = window.open('http://www.fashionphototours.com/oiouu/tourinfo.html','FashionTours','location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=700,height=530');
}

function popsign() 
{
 popupWin = window.open('https://shop.ujena.com/tours/','FashionTours','location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=700,height=400');
}

function mpopstar() 
{
	var vv = screen.availWidth-270;
 popupWin = window.open('/mstar.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left='+vv+',top=10,width=250,height=250');
}

function xpopstar() 
{
 popupWin = window.open('/xstar.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=10,top=10,width=300,height=350');
}

function cabo() 
{
 popupWin = window.open('/cabo.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=10,top=10,width=300,height=350');
}

function canc() 
{
 popupWin = window.open('/canc.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=10,top=10,width=300,height=350');
}
function pabo() 
{
 popupWin = window.open('/pabo.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=10,top=10,width=300,height=350');
}

function cpopstar(v) 
{
 popupWin = window.open('/rsschatter.php?l='+v,'rsschatter','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=440,height=520');
}

function ipop(v) 
{
 popupWin = window.open('/outrss.php','rsschatter','location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=440,height=520');
}

function galpopper(u)
{
 popupWin = window.open(u,'galpopper','location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=460,height=520');
}

function mgpo(u)
{
 popupWin = window.open(u,'mgpo','status=no,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=10,top=10,width=480,height=600');
}


function ppopstar() 
{
	var vv = screen.availWidth-270;
 popupWin = window.open('/pstar.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left='+vv+',top=10,width=250,height=250');
}

function maxxbj() 
{
	var vv = screen.availWidth-450;;
 popupWin = window.open('/maxx.htm','UjENA','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left='+vv+',top=10,width=400,height=450');
}

function popterm() 
{
    var url = 'http://www.ujenatalent.com/terms.htm';
   popupWin = window.open(url,'terms','location=yes,scrollbars=yes,menubars=yes,toolbars=yes,resizable=yes,left=10,top=10,width=400,height=530');
}

function initpage(v)
{
	if (v>0) { cppvvi(v); }
	MM_preloadImages('/o-home.gif','/o-models.gif','/o-photographers.gif','/o-networking.gif','/o-bikinijam.gif','/o-bikinis.gif','/phototours.gif','/o-be-a.gif');
	
}

var urlAddress = "http://www.ujenatalent.com/";
var pageName = "Ujena Talent";

function addToFavorites()
{
if (window.external)
{
window.external.AddFavorite(urlAddress,pageName);
}
else
{ 
alert("Sorry! Your browser doesn't support this function. Try pressing Control-D. (After You Press OK).");
}
}

function cppvvi(vo)
{
if (parent.rightFrame)
{
	parent.rightFrame.document.whip.willey.value = vo;
}
}


function hi(v)
{
	v.className="hi";
}

function lo(v)
{
	v.className="in";
}

function randomNumber(limit){
  return Math.floor(Math.random()*limit);
}

function MsgOkCancel(v)
{
var fRet;
fRet = confirm('Are you SURE you want to delete the message?');
if (fRet)
{
	Immy=new Image()
	Immy.src='/delete-comment.html?did='+v+'&r='+randomNumber(999);
	document.getElementById('c'+v).innerHTML='&nbsp;';
	document.getElementById('p'+v).innerHTML='&nbsp;';
}
}

function MsgReplyOkCancel(v)
{
var fRet;
fRet = confirm('Are you SURE you want to delete the reply?');
if (fRet)
{
	Immy=new Image()
	Immy.src='/delete-reply.html?did='+v+'&r='+randomNumber(999);
	document.getElementById('nx'+v).innerHTML='&nbsp;';
	document.getElementById('px'+v).innerHTML='&nbsp;';
}
}


function MsgFriend(v)
{
var fRet;
fRet = confirm('Are you SURE you want to remove your friend?');
if (fRet)
{
	location.href="/nofriend.html?F="+v
}
}

function imageFadeOut(img) 
{
  if ( document.all) 
  {
    img.opacity = 100;
    setOpacity(img.name, -50, 10);
  }
}

function imageFadeIn(img) 
{
  if ( document.all) 
  {
    img.opacity = 0;
    setOpacity(img.name, 10, 40);
  }
}

function setOpacity (imgName, step, delay) 
{
  var img = document.images[imgName];
  img.opacity += step;
  if (document.all) img.style.filter = 'alpha(opacity = ' + img.opacity + ')'; 
  if (step > 0 && img.opacity < 100 || step < 0 && img.opacity > 0)
  {
    setTimeout('setOpacity(\"' + img.name + '\",' + step + ', ' + delay + ')', delay);
	} else {
	setTimeout('bonobo()', 10000)
	}
} 

function dosex()
{
	v=document.getElementById("changesex");
	var fran=v.options[v.selectedIndex].value;
	if (fran=="F")
	{
		document.getElementById("Bust").innerHTML="Bust (*)";
		document.getElementById("Hips").innerHTML="Hips (*)";
		document.getElementById("Shirt").innerHTML="Dress (*)";
	} else {
		document.getElementById("Bust").innerHTML="Jacket (*)";
		document.getElementById("Hips").innerHTML="Inseam (*)";
		document.getElementById("Shirt").innerHTML="Shirt (*)";
	}
}


function popupimager(img,ww,hh)
{
	foobarf = window.open('', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+ww+',height='+hh+',left=0,top=10');
	var foofoo='<ht'+'ml><he'+'ad>'+'<sty'+'le type="text/css">'+
	'body { margin:0px; background-color: #292929; }</sty'+'le>'+'</he'+'ad>'+'<bo'+'dy>'+'<ce'+'nter>'+
	'<a href="javascript:window.close();"><img src="'+img+'" border="0" align="center" width="'+ww+'" height="'+hh+'"></a>'+
	'</ce'+'enter>'+'</bo'+'dy>'+'</ht'+'ml>';
	foobarf.moveTo(100,10);
	foobarf.moveTo(200,10);
	foobarf.moveTo(300,10);
	foobarf.moveTo(400,10);
	foobarf.moveTo(500,10);
	foobarf.moveTo((screen.availWidth-ww)-10,10);
	foobarf.document.write(foofoo);
}
// The Central Randomizer 1.3 (C) 1997 by Paul Houle 
rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

function rand(number) {
        return Math.ceil(rnd()*number);
};

var nd=new Array()
var ww=new Array()
var direction
var running
var thisone

thisone=5

function initrun(mx) {
	ww[5]=mx-450
	var x=document.getElementById('x5')
	x.style.width=mx
	ire()
	rewind(5)
}

function ire() {
    nd[5]=0
    
    nd[0]=0
    direction=1
    running=0
    thisone=0
}

function doo() {
    if (running>0) {
        var dd=document.getElementById('x'+thisone)
        var ss
        if (direction==1) {
            nd[thisone]++
        } else {
            nd[thisone]--
        }
        if (nd[thisone]<0) {
            nd[thisone]=0
            direction=1
        }
        if (nd[thisone]>ww[thisone]) {
            nd[thisone]--
            nd[thisone]--
            direction=0
        }
        dd.style.marginLeft="-"+nd[thisone]+"px"
        setTimeout("doo()",20)
    }
}

function rewind(x) {
    thisone=x
    direction=1
    running=1
    setTimeout("doo()",20)
}

function advance(x) {
    thisone=x
    direction=0
    running=1
    setTimeout("doo()",20)
}

function stopw() {
    running=0
}

function pauser() {
	if (running>0) {
		running=0
	} else {
		running=1
		setTimeout("doo()",20)
	}
}
