I see, all too often, Magento custom templates with hardcoded urls. The main problem with this, is it makes it hard to create a testing or staging environment. Magento's documentation is largely non-existent though, so I can understand why some template developers do it.

Still, it's very easy to get the baseurl directly from magento, below I've summarised the most common ones you'll want.

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
http://myshop.mydomain.com/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
http://myshop.mydomain.com/index.php/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); http://myshop.mydomain.com/js/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
http://myshop.mydomain.com/media/

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
http://myshop.mydomain.com/skin/

So, say you want to create a link to your store's checkout page you would use the following code:

<a href="<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>checkout/onepage/">Checkout</a>

It's well worth taking a look at the getBaseUrl function in the Mage class(app/Mage.php) and Mage_Core_Model_Store (app/code/core/Mage/Core/Model/Store.php)