﻿// JScript File
function setstepform(){
	 var windowwidth=$(window).width();
    if(windowwidth < 1240)
  {
	  windowwidth=1240;
	  
  }
  else{
  windowwidth=windowwidth;
  }
  //set here top place holders width 
  $('div.tphcontainer').width(windowwidth);

//lasikeyes welcome width set here
var lwelcome=windowwidth-510;
//featured tabs width set here
var ftabwidth=windowwidth-594;
//$('div.featuredtabs').width(ftabwidth);
$('div.lasikwelcome').width(lwelcome)
var cdwidth=$('.contentboxcontaainer').width();
var cadboxwidth=cdwidth-33;
$('div.contentboxcontaainer').find('div.clinicadboxpos').width(cadboxwidth)
	}
setstepform();

function setadboxheights(){
	

  //window.onresize=resizeeqfor();
var calcleftmenuheight=$('div.leftmenucontainer').height();
var calctabconteinetheight=$('div.contentboxcontaainer').height();
var maxheightcvalue = Math.max(calcleftmenuheight, calctabconteinetheight);
var letmenuheight = $('div.leftmenucontainer').find('div.leftmenu').height();

if(calcleftmenuheight < calctabconteinetheight)
{

var setladbox = maxheightcvalue - letmenuheight-34;	

$('div.leftadbox').find('div.welcomerightmiddlebg').height(setladbox);

}
else {
var setladbox = maxheightcvalue - letmenuheight-34;	
    var fdivheight = $('div.contentboxcontaainer').find('div.welcomebox').height();
    var sdivheight = $('div.contentboxcontaainer').find('div.clinicdetialbox').height();
$('div.leftadbox').find('div.welcomerightmiddlebg').height(setladbox);
    maxheightcvalue = maxheightcvalue - (fdivheight + sdivheight)
	$('div.clinipagetabs').find('div.welcomerightmiddlebg').height(maxheightcvalue-33);
		
}

	
	} 

var setadboxeheight=setTimeout(setadboxheights,1000)
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=yes,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}


function showPopUp(to,flag)
{
 if(flag)
 {
 window.open('../Common/SurgeonReviewermail.aspx?SurgeonId='+ to +'','Reply','height=550,width=600,left=300,top=400,scrollbars=1,resizable=1');

 }
 if(!flag)
 {
  window.open('../Common/SurgeonReviewermail.aspx?RevId='+ to +'','Reply','height=550,width=600,left=300,top=400,scrollbars=1,resizable=1');
 
 }
return false;
}

function showReferFriendPopUp()
{

 window.open('../Common/ReferFriend.aspx?','Reply','height=580,width=600,left=300,top=400,scrollbars=1,resizable=1');
return false;
}
// -->
