<SCRIPT LANGUAGE=VBScript RUNAT=SERVER>
Function getAd()
  Dim loAd
  ' Create an instance of the Adrotator component 
  Set loAd = Server.CreateObject("MSWC.AdRotator") 

  ' Set the target frame, if any. This is the frame the where ad 
  ' URL will open up. If the HTML page does not find the target name
  ' the URL will be opened in a new window
  loAd.TargetFrame = "TARGET=new" 

  ' Get a random avertisement from the text file
  ' This file is in the /ad folder
  getAd = loAd.GetAdvertisement("oglasi1/adrot.txt")
End Function
</SCRIPT>

