How long can I stay in Mexico and still be a Canadian resident?

Hello,

My husband and I are in the processs of having a house build in Mexico, and would like to spend as much time there but dont want to loose our Canadian residency status.

Does anyone have the information on how long we can stay in Mexico.

Some say 180 days, but then if I go home lets say on the 175th day, can I return the following week for another 180 days?

Others say, you can stay for 5 years, but have to return for 2 years in Canada, before you can come back for another 5 years!!

Its quite confusing....I hope you can help me.

Thanks

I lived in mexico for 1 year and I lost my residency.  It took 3 months living back in canada to re-gain it. HTH