//js for merchantplace
// -------------------


//////////////////////////////////////
// copyright hackett & bodgitt 2003 //
//////////////////////////////////////

// -------------------
// left nav bar
// -------------------
// destination page htmls
var mainIntro = '002mainIntro.html';
var mainBiography = '002mainBiography.html';
var mainInvest = '002mainInvest.html';
var mainPropertyPartnerships = '002mainPropertyPartnerships.html';
var mainPropertySyndicates = '002mainPropertySyndicates.html';
var mainSchoolPartnerships = '002mainSchoolPartnerships.html';
var mainEISDeferral = '002mainEISDeferral.html';
var mainEZPropertySyndicates = '002mainEZPropertySyndicates.html';
var mainFilmPartnerships = '002mainFilmPartnerships.html';
var mainPortfolio = '002mainPortfolio.html';
var mainDetails = '002mainDetails.html';
//sort this out
var mainLocation = '007zoom.html';               // '002mainOffice.html';
var mainOffice = '002mainOffice.html';               // '002mainOffice.html';
var mainContact = '002mainContact.html';
var mainLinks = '002mainLinks.html';
var navIntro = '002navIntro.html';
var navBiography = '002navPropertyPartnerships.html';	//tempvalue  '002navBiography.html'
var navInvest = '002navPropertyPartnerships.html';		//tempvalue
var navPropertyPartnerships = '002navPropertyPartnerships.html';
var navPropertySyndicates = '002navPropertySyndicates.html';
var navSchoolPartnerships = '002navPropertyPartnerships.html';	//tempvalue
var navEISDeferral = '002navPropertySyndicates.html';		//tempvalue
var navEZPropertySyndicates = '002navPropertyPartnerships.html';	//tempvalue '002mainEZPropertySyndicates.html';
var navFilmPartnerships = '002navPropertySyndicates.html';		//tempvalue '002mainFilmPartnerships.html';
var navPortfolio = '002navPropertyPartnerships.html';		//tempvalue '002navPortfolio.html';	//tempvalue
var navDetails = '002navPropertyPartnerships.html';		//tempvalue '002navDetails.html';		//tempvalue
// sort this out
var navOffice = '002navPropertyPartnerships.html';		//tempvalue '002navOffice.html';		//tempvalue
var navLocation = '002navPropertyPartnerships.html';

var navContact = '002navPropertyPartnerships.html';		//tempvalue '002navContact.html';		//tempvalue
var navLinks = '002navPropertyPartnerships.html';		//tempvalue '002navLinks.html';		//tempvalue
var leftIntroDelay = '002leftIntroC.html';  //introC has no 1 in myDelay javascript value
var leftIntro = '002leftIntro.html';
var leftBiography = '002leftIntroC.html';	//tempvalue
var leftInvest = '002leftInvestE.html';		//tempvalue
var leftPropertyPartnerships = '002leftPropertyPartnerships.html';
var leftPropertySyndicates = '002leftPropertySyndicates.html';
var leftSchoolPartnerships = '002leftSchoolPartnerships.html';
var leftEISDeferral = '002leftEISDeferral.html';
var leftEZPropertySyndicates = '002leftEZPropertySyndicates.html';
var leftFilmPartnerships = '002leftFilmPartnerships.html';
var leftPortfolio = '002leftIntro.html';	//tempvalue
var leftDetails = '002leftIntro.html';	//tempvalue
// sort this out
var leftLocation = '002leftIntro.html';		//tempvalue
var leftOffice = '002leftIntro.html';		//tempvalue

var leftContact = '002leftIntro.html';	//tempvalue
var leftLinks = '002leftIntro.html';		//tempvalue
var leftInvestE1 = '002leftInvestE1.html';	//property partnerships
var leftInvestE1 = '002leftInvestE1.html';	//property syndicates		//tempvalue
var leftInvestE1 = '002leftInvestE1.html';	//school partnerships		//tempvalue
var leftInvestE1 = '002leftInvestE1.html';	//EIS deferrral schemes		//tempvalue
var leftInvestE1 = '002leftInvestE1.html';	//EZ property syndicates	//tempvalue
var leftInvestE1 = '002leftInvestE1.html';	//film partnerships		//tempvalue




// left nav bar links with frame management
function loadIntoMain(inUrl, thesameUrl, topUrl){
var myinUrl = inUrl;
var mysameUrl = thesameUrl;
var mytopUrl = topUrl;
top._right.location.href=myinUrl;
top._left.location.href=mysameUrl;
top._top.location.href=mytopUrl;
}


// ---------------
// reloads new left bar to expand and contract but doesn't do it too soon
// 

var myTimer1;
var myDelay=0;
var myTimingInterval=200;
function setMyDelay(){
//window.status='my delay before is: ' + myDelay;
myDelay = 1;
//setTimeout("window.status='my delay after is: ' + myDelay;",2000);
return 1;
}

function setRollOverTarget(selfUrl,AmIExpanded){
var AmIExpanded = AmIExpanded;  //dont need
var myselfUrl = selfUrl;
if (myDelay==1){
top._left.location.href=myselfUrl;
myDelay=0;
}
myTimer1=setTimeout("setMyDelay()",myTimingInterval);
return 1;
}

// ---------------
function otherStyleChange(styleName){
}

function setFontStyle(setWhat,setWhich)
{
var mySettings;
mySettings=setWhich;
document.getElementById(setWhat).style.fontWeight=mySettings;
//myElement.style.fontWeight='normal';
  //alert(document.getElementById(alertWhat).style.width);
}

// not used yet
function navPages(whereAmI, whereTo){
var navLabel;
var pageTo;
navLabel = whereAmI; //needs ref to page I am on and label
pageTo = whereTo; //destination link html page
//go to that page when clicked ? maybe this directive is in link
}


// blinking the greater than arrow on nav page
function setFontStyle(setWhat,setWhich)
{
var mySettings;
mySettings=setWhich;
document.getElementById(setWhat).style.fontWeight=mySettings;
//myElement.style.fontWeight='normal';
  //alert(document.getElementById(alertWhat).style.width);
}


////////////////////////////////
///  code for zooming images  //
////////////////////////////////


var widthStep=10;             // picture size width in/decrement
var picHeight=199;
var picWidth=163;
var heightStep=(Math.round(widthStep*(picHeight/picWidth)));
var timeStep=30;             // time increment
var maxZoom=picHeight*2;    // picHeight;
var minZoom=picHeight;    // picWidth/2;
var nowSize=picHeight;
var timerMe=0;
var downTimer=0;
var myTimeOut1;
var myTimeOut2;
var maxTime=30;
// variables for map div
var startTopPosition=159;
var startLeftPosition=155;
var topPosition=startTopPosition;
var leftPosition=startLeftPosition;
var midPicPosition=(277 - startTopPosition);         // total height of pic=555/2= minus div position -185
var midPicLeftPosition=300;
//var midPicLeftPosition=(300 - startLeftPosition);
var midTopPosition=(topPosition + 100);
var midLeftPosition=(leftPosition + 81);       //81 is half picture width

var topIncrement=6;                    //nowSize/2;
var leftIncrement=6;

function upMe(img, divId){
while (nowSize < maxZoom){
img.height+=heightStep;
img.width+=widthStep;
nowSize=nowSize+heightStep;
moveDivUp(divId);
moveDivLeft(divId);
myTimeOut1=setTimeout(incrementTimerMe(), timeStep);
}
}

function incrementTimerMe(){
if (timerMe<maxTime){
downTimer=maxTime+1;
timerMe+=1;
clearTimeout(myTimeOut1);
upMe(myPic, divMyPic);
}
}

function decrementTimerMe(){
if (downTimer<maxTime){
timerMe=maxTime+1;
downTimer+=1;
clearTimeout(myTimeOut2);
downMe(myPic, divMyPic);                                    // loop
}
}

function downMe(img, divId){
while (nowSize > minZoom){
img.height-=heightStep;
img.width-=widthStep;
nowSize=nowSize-heightStep;
moveDivRight(divId);
moveDivDown(divId);
myTimeOut2=setTimeout(decrementTimerMe(), timeStep);
}
}

function pauseMe(){
downTimer=maxTime+1;
timerMe=maxTime+1;
}

function moveDivUp(divId){
///if (midTopPosition>midPicPosition){
topPosition=(topPosition - topIncrement);
divId.style.top=topPosition;
//myTimeOut3=setTimeout(decrementTimerMe(), timeStep);
///}
}

function moveDivDown(divId){
///if (midTopPosition>midPicPosition){
topPosition=(topPosition + topIncrement);
divId.style.top=topPosition;
//myTimeOut3=setTimeout("decrementTimerMe();", timeStep);
///}
}




function moveDivLeft(divId){
///if (midLeftPosition>midPicLeftPosition){
leftPosition=(leftPosition - leftIncrement);
divId.style.left=leftPosition;
///}
}

function moveDivRight(divId){
///if (midLeftPosition>midPicLeftPosition){
leftPosition=(leftPosition + leftIncrement);
divId.style.left=leftPosition;
///}
}

function doNot(){};
//////////////////////////////////////
/// end of code for zooming images  //
//////////////////////////////////////


////////////////////////////////
/// open window code for map  //
////////////////////////////////

function openMyWin(){
window.open("007zoom.html", "map", "toolbars=0, menubar=0, width=460, height=530");
}


///////////////////////////////////////
/// end of open window code for map  //
///////////////////////////////////////

