working template now

added crosplatform shit needs conversion to jquery tho for
document.getelements by id functions hack away