
function openWindow(url,winName,anchor)
{
   var addr=url;
   var windowName="_blank";
     
   if (anchor!=null)
      addr+=anchor;

   if (typeof document.body.style.maxHeight != "undefined") // ie 7
      windowName=winName;
      
   var newWin=window.open(addr,
                          windowName,
                          "top=50,left=50,width=850,height=500,status=yes,resizable=yes,titlebar=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes");   
                     
   newWin.focus();
}

function viewWeather()
{
   openWindow('http://www.bbc.co.uk/weather/5day.shtml?id=1809&amp;links','BBC_Weather',null);
}

function viewEdinburgh()
{
   openWindow('http://www.edinburgh.org','Edinburgh',null);
}

function viewEdinburghInternationalFestival()
{
   openWindow('http://www.eif.co.uk','EdinburghInternationalFestival',null);
}

function viewEdinburghFringe()
{
   openWindow('http://www.edfringe.com','EdinburghFringe',null);
}
  
function viewHeritageEdinburgh()
{
   openWindow('http://heritage.edinburgh.gov.uk/','HeritageEdinburgh',null);
}

function viewStreetMap()
{
   openWindow('http://www.streetmap.co.uk/streetmap.dll?G2M?X=323701&amp;Y=670382&amp;A=Y&amp;Z=5','StreetMap',null);
}

function viewGentsInfo(anchor)
{
   openWindow('members_gents_info.html','Gents_Info',anchor);
}

function viewNewsArchive(year,anchor)
{
   openWindow('archive/members_news_'+year+'.html','Gents_Info',anchor);
}

function viewHowDidIDo(sex)
{
   if (sex=='M')
      openWindow('http://www.howdidido.co.uk/the-merchants-of-edinburgh-gc','HowDidIDo',null);
   else
      openWindow('http://www.howdidido.co.uk','HowDidIDo',null);
}

function viewEdinburghSummerLeague()
{
   openWindow('http://www.edinburghgolfleague.com','EdinburghSummerLeague',null);
}

function viewLothiansGolfAssociation()
{
   openWindow('http://www.lothiansgolfassociation.org.uk/','LothiansGolfAssoc',null);
}

function viewMidlothianLadiesGolfAssociation()
{
   openWindow('http://www.mclga.co.uk/','MidlothianLadiesGolfAssoc',null);
}

function viewScottishGolfUnion()
{
   openWindow('http://www.scottishgolfunion.org/','ScottishGolfUnion',null);
}

function viewScottishGolf()
{
   openWindow('http://www.scottishgolf.com/','ScottishGolf',null);
}

function viewRandA()
{
   openWindow('http://www.randa.org/','RandA',null);
}

function viewTaylorMade()
{
   openWindow('http://www.taylormadegolf.com','TaylorMade',null);
}

function viewAdidas()
{
   openWindow('http://www.adidasgolf.com','Adidas',null);
}

function viewCatering()
{
   openWindow('../megc/megc_catering.html','Catering',null);
}

function viewOpenDayPoster()
{
   openWindow('../upload/A4 poster 09.pdf','OpenDay',null);
}

function viewAdvert()
{
   openWindow('../upload/advert.doc','Advert',null);
}

function viewFixtureCard()
{
   openWindow('../upload/fixture_card.htm','FixtureCard',null);
}

function viewMonthlyFixture()
{
   openWindow('../upload/fixture_month.htm','FixtureMonth',null);
}

function viewSocialEvents(anchor)
{
   openWindow('members_events_social.html','MembersSocial',anchor);
}

function viewTartanGolf()
{
   openWindow('http://www.tartangolf.co.uk','TartanGolf',null);
}

function viewJoiningOffer()
{
   openWindow('../upload/joining offers web 10.doc','JoiningOffer',null);
}

function viewSpecialOffer()
{
   openWindow('../upload/Special_Offer_2009_application.doc','SpecialOffer',null);
}

function viewConstitution()
{
   openWindow('../upload/policy/MEGC_Constitution.pdf','Constitution',null);
}

function viewPolicyChildProtection()
{
   openWindow('../upload/policy/Child_Protection_Summary_Policy_Statement_MEGC.pdf','SpecialOffer',null);
}

function viewHealthAndSafety()
{
   openWindow('../upload/policy/H_&_S_Members_Notice.pdf','ChildPolicy',null);
}

function viewSmokingPolicy()
{
   openWindow('../upload/policy/MEGC_Smoking_Policy.pdf','SmokingPolicy',null);
}

function viewJuniorOpen()
{
   openWindow('../upload/opens/junior_open_entry_form.doc','_self',null);
}

function viewSeniorsOpen()
{
   openWindow('../upload/opens/seniors_open_entry_form.doc','_self',null);
}

function viewMixedOpen()
{
   openWindow('../upload/opens/open_mixed_foursomes_stableford_headed.doc','_self',null);
}
