var stick=0;
var stick1=0;
var uvse=400;

var marg_stik1=0;
var marg_stik2=0;
var marg_stik3=0;
var marg_stik4=0;
var marg_stik5=0;
var marg_stik6=0;
	//document.getElementById("tip1").style.left = window.;

if(screen.width<=1024)
{
  //alert(screen.width);
  var eltab=document.getElementById('gen_tab');
  var eltab1=document.getElementById('tr_gen_tab');
  var tmpp=screen.width/100;
  var tmpp1=screen.height/100;
  var ntt=tmpp1*35;
  marg_stik1=tmpp1;
  marg_stik2=250-ntt;
  marg_stik6=tmpp1;
  marg_stik5=250-ntt;
  marg_stik3=tmpp1;
  marg_stik4=tmpp1*2;
  eltab.style.width='70%';
  eltab1.style.height=ntt+'px';
  //alert(ntt);
  uvse=ntt;
  stick=tmpp*14;
}	

	function reallocate_tip_coords(){
      var width=(window.innerWidth)?window.innerWidth:((document.all)?document.body.offsetWidth:null);
      var height=(window.innerHeight)?window.innerHeight:((document.all)?document.body.offsetHeight:null);
      var pw=(width-220)/100;
      var ph=(height-220)/100;
      document.getElementById('tip11').style.top=ph*85+stick1;
      document.getElementById('tip11').style.left=pw*30-stick;
      document.getElementById('tip22').style.top=ph*85+stick1;
      document.getElementById('tip22').style.left=pw*70+stick;
      document.getElementById('tip33').style.top=ph*1;
      document.getElementById('tip33').style.left=pw*50;
      document.getElementById('copyt').style.height=ph*20;
      document.getElementById('tdr1').style.height=ph*60;
	}


	var height1=(window.innerHeight)?window.innerHeight:((document.all)?document.body.offsetHeight:null);
	var ph=height1/100;
	var mak=ph*23;
	reallocate_tip_coords();
	var mind=new Array();  
	var maxd=new Array();
	
	mind['div1']=0;
	maxd['div1']=uvse-165-marg_stik1;
	
	mind['div2']=0;
	maxd['div2']=uvse-185-marg_stik2;
	
   mind['div3']=105+marg_stik3;
	maxd['div3']=Math.round(uvse*0.6);
	
	mind['div4']=83+marg_stik4;
	maxd['div4']=Math.round(uvse*0.6);
	
	mind['div5']=0;
	maxd['div5']=uvse-185-marg_stik5;
	
	mind['div6']=0;
	maxd['div6']=uvse-165-marg_stik6;

if(screen.width<=1024)
{
	document.getElementById('div1').style.marginTop =25;
	document.getElementById('div2').style.marginTop =55;
	document.getElementById('div3').style.marginTop =95;
	document.getElementById('div4').style.marginTop =105;
	document.getElementById('div5').style.marginTop =45;
	document.getElementById('div6').style.marginTop =15;
}
else
{	
	for (var i=1; i<7; i++){
	      var named="div" + i;
		   var x=Math.round(Math.random()*uvse);
		   while(x>maxd[named] || x<mind[named])
		   {
		     x=Math.round(Math.random()*140)+ 95;
		   }
		  document.getElementById(named).style.marginTop =x;
	}
}	

