function getClientWidth(){return document.documentElement.clientWidth}
function getClientHeight(){return document.documentElement.clientHeight}

function addLoadEvent (func){
	 var oldonload = window.onload;
	 if (typeof window.onload != 'function') {window.onload = func;}
	else {window.onload = function() {if (oldonload) oldonload();func();}}}
function by_id (id) {
	var res = document.getElementById(id);
	return res;
}
function by_tag (tag,where) {
	var res=0;
	var where_=where ? where:document;
	var out_ = where_.getElementsByTagName(tag);
	if (out_.length == 1) {res=out_[0]} else {res=out_}
	return res;
}
function by_class(clname,obj,tag_name){
  var tn=tag_name ? tag_name:'*';
  var elmts=by_tag(tn,obj);
  var _out=new Array();
  var i=0, j=0;
  while(elmts[i]){
	if(elmts[i].className==clname){
	  _out[j]=elmts[i];
	  j++;
	}
	i++;
  }
  var res=0;
  if (_out.length == 1) {res=_out[0]} else {res=_out}
  return res;
}
function _switch(elem,dis) {
	var _dis = dis?dis:'block';
	if (elem.style.display != 'none') {
	elem.style.display = 'none';
	}
	else {elem.style.display = _dis;elem.style.opacity=1;elem.style.filter=alpha(opacity=100)}
}
var girls_tab = new Array();
girls_tab['Bella']=new Array();
girls_tab['Bella']['loc']='LA';
girls_tab['Bella']['story']='City of angels, I met this blue-eyed blonde bimbo there, and she looked like a Hollywood star! I found out that her sex skills were phenomenal, you can\'t miss it!';

girls_tab['Rachel']=new Array();
girls_tab['Rachel']['loc']='O.C.';
girls_tab['Rachel']['story']='Oh, California beaches and perverted teen girlfriends! This cutie put super sexy outfits on to make me hard and then cleaned my dick licking the cum off with her tongue';

girls_tab['Lana']=new Array();
girls_tab['Lana']['loc']='Russia';
girls_tab['Lana']['story']='Exchange student from Russia Svetlana, she\'s one of my best fucks ever, and she did blow jobs so professionally, I screamed in pleasure like Michael Jackson!';

girls_tab['Veronica']=new Array();
girls_tab['Veronica']['loc']='TN';
girls_tab['Veronica']['story']='I visited my Granny in Tennessee and met this gorgeous teen doll, who was a fan of sex toys, I developed her tight little holes with those every now and then';

girls_tab['Heather']=new Array();
girls_tab['Heather']['loc']='New Jersey';
girls_tab['Heather']['story']='Jersey gfs are so housewifely, they are all about pleasing their partners, and I was the lucky one to exhaust the chick with my ever present sex lust, golden days';

girls_tab['Jazmin']=new Array();
girls_tab['Jazmin']['loc']='France';
girls_tab['Jazmin']['story']='French dolly-bird Jazmin dreamed of becoming an experienced stripper and picked this exotic name. My ex-gf topped me with her stockings on, it was heaven on earth';

girls_tab['Jennifer']=new Array();
girls_tab['Jennifer']['loc']='NY city';
girls_tab['Jennifer']['story']='Some city-gfs are very romantic, especially teen ones, Jenny adored all the courtesies, but when it came to sex, she turned into a panther and loved fucking rough';

girls_tab['Patricia']=new Array();
girls_tab['Patricia']['loc']='LA';
girls_tab['Patricia']['story']='I\'ve always dreamed of a real hot tamale, and all of a sudden Pat, my sexy ex, showed up, such a sex-fan, teasing my cock until I shot a big load of cum up her butt';


function tabs (obj) {
	var lis = new Array();
	var col = by_id('colors01');
		
	for (i=0;i<8;i++) {
		lis[i]=by_tag('li',by_id('tabs01'))[i];
		if (by_tag('a',lis[i]).lang != obj.lang) {lis[i].className='';}
		else{lis[i].className = 'act'}
	}
	col.className = 'colors '+obj.className;
	
	var name=obj.lang;
	var imgs=by_tag('img',by_id('girls_tab_table'));
	/*imgs[0].src='#';
  imgs[1].src='#';
  imgs[2].src='#';
  imgs[3].src='#';
  imgs[4].src='#';
  imgs[5].src='#';*/  
  this.setTimeout(function(){
    imgs[0].src='#';
    imgs[1].src='#';
    imgs[2].src='#';
    imgs[3].src='#';
    imgs[4].src='#';
    imgs[5].src='#'; 
  },100);
  this.setTimeout(function(){
    imgs[0].src='images/source/girls/'+name+'/01.jpg';
    imgs[1].src='images/source/girls/'+name+'/02.jpg';
    imgs[2].src='images/source/girls/'+name+'/04.jpg';
    imgs[3].src='images/source/girls/'+name+'/05.jpg';
    imgs[4].src='images/source/girls/'+name+'/03.jpg';
    imgs[5].src='images/source/girls/'+name+'/06.jpg'; 
  },300);
  
  //imgs[0].src='images/source/girls/'+name+'/01.jpg';
	//imgs[1].src='images/source/girls/'+name+'/02.jpg';
	//imgs[2].src='images/source/girls/'+name+'/04.jpg';
	//imgs[3].src='images/source/girls/'+name+'/05.jpg';
	//imgs[4].src='images/source/girls/'+name+'/03.jpg';
	//imgs[5].src='images/source/girls/'+name+'/06.jpg';
	by_id('girl_name').innerHTML=name;
	by_id('girl_loc').innerHTML=girls_tab[name]['loc'];
	by_id('girl_story').innerHTML=girls_tab[name]['story'];
}

var tmp = 0;
function slider_(a) {
	var cont = by_id('cont');
	var left=by_id('left_vid_block');
	var right=by_id('right_vid_block');
	var cent=by_id('vis');
	//var dbg = by_id('dbg');
	var cm = 0;
	switch (a) {
		case 1: {
			if (parseInt(cont.style.marginLeft) > -980&&(tmp<490)) {
				cm -= 10;
				tmp+=10;
				//dbg.innerHTML = tmp;
				var tr = parseInt(cont.style.marginLeft) + cm;
				cont.style.marginLeft = tr + 'px';
				setTimeout(function(){slider_(a)},1);
			}
			else {
				tmp = 0;
				return true;
			}
		}
		break;
		case 2: {
			if (parseInt(cont.style.marginLeft) < 0&&(tmp<490)) {
				cm += 10;
				tmp+=10;
				//dbg.innerHTML = tmp;
				var tr = parseInt(cont.style.marginLeft) + cm;
				cont.style.marginLeft = tr + 'px';
				setTimeout(function(){slider_(a)},1);
			}
			else {
				tmp = 0;			
				return true;
			}
		}
		break;
		default: {alert('Error')}
		break;
	}	
}

function switch_flv (num) {
	var flv = by_id('flv_player');
	var desc = by_id('flv_desc');
	var link = by_id('desc_link');
	desc.innerHTML = desc_arr[num];
	link.innerHTML = link_arr[num];
	var flv_num = new String();
	if (num<9) {flv_num = '0'+(num+1);}
	else {flv_num = (num+1);}
	/*var player = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" width="385" height="285">'+'\n'+
			'<param name="movie" value="images/trailer_block/origin/iplayer.swf" />'+'\n'+
			'<param name="quality" value="high" />'+'\n'+
			'<param name="wmode" value="opaque" />'+'\n'+
			'<param name="allowfullscreen" value="true" />'+'\n'+
			'<param name="allowscriptaccess" value="always" />'+'\n'+
			'<param name="bgcolor" value="#000000" />'+'\n'+
			'<param name="FlashVars" value="file=tgfs_tr'+flv_num+'.flv&screen=images/trailer_block/origin/tgfs_tr'+flv_num+'.jpg" />'+'\n'+
			'<embed src="images/trailer_block/origin/iplayer.swf" width="385" height="288" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" flashvars="file=tgfs_tr'+flv_num+'.flv&screen=images/trailer_block/origin/tgfs_tr'+flv_num+'.jpg" />'+'\n'+
			'</object>'*/
  var player='<embed src="images/trailer_block/origin/iplayer.swf" width="385" height="288" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" flashvars="file=tgfs_tr'+flv_num+'.flv&screen=images/trailer_block/origin/tgfs_tr'+flv_num+'.jpg" />';
	flv.innerHTML = player;
}

/* Bookmark */
var urlAddress = document.location;
var pageName = document.title;

function bookmark_(){
 if (window.sidebar) // firefox
 window.sidebar.addPanel(pageName, urlAddress, "");
 else if(window.opera && window.print){ // opera
 var elem = document.createElement('a');
 elem.setAttribute('href',urlAddress);
 elem.setAttribute('title',pageName);
 elem.setAttribute('rel','sidebar');
 elem.click();
 } else if(document.all)// ie
 window.external.AddFavorite(urlAddress, pageName);
}
/* Bookmark */ 
var tempimg;

function showPhoto(lobj,purl){  
  var deleteImg=function(iobj){
    iobj.onload=null;
    iobj.onclick=null;  
    document.body.removeChild(iobj);
    delete iobj;
  }  

  var cw=getClientWidth()-6; var ch=getClientHeight()-6;
  
  tempimg=by_id('tempimg');
  var fade=by_id('imgfade');
  var notify=by_id('imgnotify');
  
  if(tempimg){deleteImg(tempimg);}
  if(fade){document.body.removeChild(fade); delete fade;}
  
  
  var lobjOffs=Element.cumulativeOffset(by_tag('img',lobj));

  notify.style.top=lobjOffs['top']+71+3+'px';
  notify.style.left=lobjOffs['left']+100+3+'px';
  notify.style.display='block';
  
  fade=document.createElement('div');
  fade.id='imgfade';
  
  
  tempimg=document.createElement('img');
  document.body.insertBefore(tempimg,document.body.firstChild);
  tempimg.id='tempimg';  
  tempimg.style.position='absolute';
  tempimg.style.zIndex='1000';  
  //tempimg.width='320'; tempimg.style.left=Math.round((cw-160)/2)+'px';
  tempimg.style.visibility='hidden';
  setTimeout('tempimg.src=\''+purl+'\'',20);
  
  
  
  tempimg.onclick=function(ev){
    document.body.removeChild(this);
    document.body.removeChild(fade);    
  }
  
  tempimg.onload=function(ev){
    //alert('aaa');   return false;
    document.body.insertBefore(fade,document.body.firstChild);
    fade.style.position='absolute'; fade.style.zIndex='900';
    fade.style.top='0'; fade.style.left='0';    
    fade.style.width='100%';    
    fade.style.height=document.body.offsetHeight+'px';    
    fade.style.background='#000';    
    fade.style.opacity='0.8';
    fade.style.filter='alpha(opacity=80)';
    notify.style.display='none';
    
    
    
    var ih=tempimg.offsetHeight; var iw=tempimg.offsetWidth;
    var cih=ih; var ciw=iw;
    var iar=iw/ih;
    if(cih>ch){tempimg.height=ch;cih=ch;ciw=Math.round(cih*iar);tempimg.width=ciw;}
    if(ciw>cw){tempimg.width=cw;ciw=cw;cih=Math.round(ciw/iar);tempimg.height=cih;}
    
    tempimg.style.visibility='visible';
    tempimg.style.top=(document.documentElement.scrollTop+Math.round((ch-cih)/2))+'px';
    tempimg.style.left=Math.round((cw-ciw)/2)+'px';    
    tempimg.style.border='3px solid #5C9864';
    
    //alert(fade.style.filter);
  }   
}

var plctnr,closelink;

function watchMovie(vurl,vscr){  
  if(plctnr){
    createFade(0);
    plctnr.removeChild(closelink);
    document.body.removeChild(plctnr);
    delete closelink; delete plctnr;
    closelink=null; plctnr=null;
  }
  var cw=getClientWidth()-0; var ch=getClientHeight()-0;
  //var vscr=scrobj.src;
  plctnr=document.createElement('div');
  plctnr.style.position='absolute';
  plctnr.style.zIndex='10';    
  
  closelink=document.createElement('div');
  closelink.style.width='52px';
  closelink.style.fontSize='10px';
  closelink.style.cursor='pointer';
  closelink.innerHTML='<strong>Turn OFF</strong>';
  closelink.style.background='#F00';//'#1362A0';
  closelink.style.color='#FFF';
  closelink.style.padding='0 3px 1px 3px';
  closelink.style.opacity='0.3';
  closelink.style.filter='alpha(opacity=30)'
  
  closelink.onmouseover=function(ev){
    closelink.style.opacity='1.0';
    closelink.style.filter='alpha(opacity=100)';
  }
  closelink.onmouseout=function(ev){
    closelink.style.opacity='0.3';
    closelink.style.filter='alpha(opacity=30)';
  }
  closelink.onclick=function(ev){
    createFade(0);
    plctnr.removeChild(closelink);
    document.body.removeChild(plctnr);
    delete closelink; delete plctnr;
    closelink=null; plctnr=null;
  }
  
  /*var plhtml='<div style=" border:3px solid #1362A0; line-height:0;clear:both">'+
      '<param name="movie" value="player.swf" />'+
      '<param name="quality" value="high" />'+
      '<param name="wmode" value="opaque" />'+
      '<param name="allowfullscreen" value="true" />'+
      '<param name="allowscriptaccess" value="always" />'+
      '<param name="bgcolor" value="#000" />'+
      '<param name="FlashVars" value="vfile='+vurl+'&vscreen='+vscr+'" />'+
      '<embed src="player.swf" width="384" height="318" bgcolor="#000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" allowscriptaccess="always" flashvars="vfile='+vurl+'&vscreen='+vscr+'" />'+
      '</div>';*/
  var plhtml='<div style=" border:0px solid #1362A0; line-height:0;"><embed src="player.swf" width="512" height="404" bgcolor="#000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" allowscriptaccess="always" flashvars="vfile='+vurl+'&vscreen='+vscr+'" /></div>';
  plctnr.innerHTML=plhtml;
  document.body.insertBefore(plctnr,document.body.firstChild);
  plctnr.insertBefore(closelink,plctnr.firstChild);
  plctnr.style.top=(Math.round((ch-plctnr.offsetHeight)/2)+document.documentElement.scrollTop)+'px';
  plctnr.style.left=Math.round((cw-plctnr.offsetWidth)/2)+'px';
  createFade('create');
}

var fade;
function createFade(m){
  if(m!='create'){
    if(fade){
      document.body.removeChild(fade);
      delete fade;fade=null;
    }
    return true;
  }
  if(fade){
    delete fade; fade=null;
  }
  var cw=getClientWidth(); var ch=getClientHeight();
  fade=document.createElement('div');
  var st=fade.style;
  st.position='absolute';
  st.zIndex='9';
  st.width='100%'; st.height=document.body.offsetHeight+'px';
  st.opacity='0.0'; st.filter='alpha(opacity=0)';
  st.background='#000';
  document.body.insertBefore(fade,document.body.firstChild);
  fadeFadein=function(o){
    if(o>=80){      
      return true;
    }
    o+=2;
    st.opacity=(o/100);
    st.filter='alpha(opacity='+o+')';
    this.setTimeout('fadeFadein('+o+')',33);
  }
  this.setTimeout('fadeFadein(0)',3000);
}